forked from kaiostech/B2G
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathbuild-gsi.sh
executable file
·62 lines (54 loc) · 1.7 KB
/
build-gsi.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/bash
case `uname` in
"Darwin")
# Should also work on other BSDs
CORE_COUNT=`sysctl -n hw.ncpu`
;;
"Linux")
CORE_COUNT=`grep processor /proc/cpuinfo | wc -l`
;;
*)
echo Unsupported platform: `uname`
exit -1
esac
echo MAKE_FLAGS=-j$((CORE_COUNT + 2)) > .tmp-config
case "$1" in
"gsi_arm64_ab")
echo PRODUCT_NAME=treble_arm64_bvN >> .tmp-config &&
echo TARGET_NAME=phhgsi_arm64_ab >> .tmp-config &&
echo DEVICE_NAME=phhgsi_arm64_ab >> .tmp-config &&
echo BINSUFFIX=64 >> .tmp-config
;;
"gsi_arm_ab")
echo PRODUCT_NAME=treble_arm_bvN >> .tmp-config &&
echo TARGET_NAME=phhgsi_arm_ab >> .tmp-config &&
echo DEVICE_NAME=phhgsi_arm_ab >> .tmp-config
;;
"gsi_arm64_a")
echo PRODUCT_NAME=treble_arm64_avN >> .tmp-config &&
echo TARGET_NAME=phhgsi_arm64_a >> .tmp-config &&
echo DEVICE_NAME=phhgsi_arm64_a >> .tmp-config &&
echo BINSUFFIX=64 >> .tmp-config
;;
"gsi_arm_a")
echo PRODUCT_NAME=treble_arm_avN >> .tmp-config &&
echo TARGET_NAME=phhgsi_arm_a >> .tmp-config &&
echo DEVICE_NAME=phhgsi_arm_a >> .tmp-config
;;
*)
echo "Usage: $0 [device name] [other]"
echo Valid devices to configure are:
echo - gsi_arm64_ab \(arm64 partitionA/B \)
echo - gsi_arm_ab \(arm partitionA/B \)
echo - gsi_arm64_a \(arm64 partitionAonly \)
echo - gsi_arm_a \(arm partitionAonly \)
exit -1
;;
esac
echo GECKO_OBJDIR=$PWD/objdir-gecko-\$PRODUCT_NAME >> .tmp-config
if [ -d "./.config" ];then
rm ./.config
fi
mv .tmp-config .config
export SKIP_ABI_CHECKS=true
./build.sh ${@:2}