huangcm
2024-11-25 22631b47c9e9052ebc7bdc07fa77b474bccc1312
build.sh
....@@ -1,38 +1,46 @@
11 #!/bin/bash
22
3
-if [ x"$1" == "xu" ] ;then
4
- cd longan/brandy/brandy-2.0
5
- ./build.sh -p sun50iw10p1
6
- cd -
3
+if [ x"$1" == "xuboot" ] || [ x"$1" == "xu" ] || [ x"$1" == "x" ] ;then
4
+ echo "Start build uboot"
5
+ cd longan/brandy/brandy-2.0 && ./build.sh -p sun50iw10p1 && cd -
6
+ if [ $? -eq 0 ]; then
7
+ echo "Build uboot ok!"
8
+ else
9
+ echo "Build uboot failed!"
10
+ exit 1
11
+ fi
712 fi
813
9
-if [ x"$1" == "xk" ] ;then
10
- cd longan
11
- ./build.sh
12
- cd -
13
-
14
- cd android
15
- . ./build/envsetup.sh
16
- lunch ceres_c3-userdebug
17
- extract-bsp && pack
18
- cd -
14
+if [ x"$1" == "xkernel" ] || [ x"$1" == "xk" ] || [ x"$1" == "x" ] ;then
15
+ echo "Start build kernel"
16
+ cd longan && ./build.sh autoconfig -o android -i a133 -b c3 && ./build.sh && cd -
17
+ if [ $? -eq 0 ]; then
18
+ echo "Build kernel ok!"
19
+ else
20
+ echo "Build kernel failed!"
21
+ exit 1
22
+ fi
1923 fi
2024
21
-if [ x"$1" == "xa" ] ;then
22
- cd android
23
- . ./build/envsetup.sh
24
- lunch ceres_c3-userdebug
25
- extract-bsp
26
- make BUILD_NUMBER=ido-a133 -j10 && pack
27
-# make -j10 && pack -v
28
- cd -
25
+# android envsetup
26
+cd android
27
+. ./build/envsetup.sh
28
+lunch ceres_c3-userdebug
29
+extract-bsp
30
+cd -
31
+
32
+if [ x"$1" == "xandroid" ] || [ x"$1" == "xa" ] || [ x"$1" == "x" ] ;then
33
+ echo "Start build Android"
34
+ cd android
35
+ make installclean
36
+ make BUILD_NUMBER=ido-a133 -j32
37
+ cd -
2938 fi
3039
31
-if [ x"$1" == "xp" ] ;then
32
- cd android
33
- . ./build/envsetup.sh
34
- lunch ceres_c3-userdebug
35
- extract-bsp && pack
36
- cd -
37
-fi
40
+# pack image
41
+echo "Start pack image"
42
+cd android
43
+pack
44
+cd -
45
+
3846