forked from BPI-SINOVOIP/BPI-M64-bsp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·62 lines (52 loc) · 1.36 KB
/
build.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
#!/bin/bash
# (c) 2015, 2016, Leo Xu <otakunekop@banana-pi.org.cn>
# Build script for BPI-M64-BSP 2016.09.10
MACH="sun50iw1p1"
BOARD=BPI-M64
MODE=$1
list_boards() {
cat <<-EOT
NOTICE:
new build.sh default select $BOARD and pack all boards
supported boards:
EOT
(cd sunxi-pack/allwinner/${MACH}/configs; ls -1d BPI* )
echo
}
list_boards
./configure $BOARD
if [ -f env.sh ] ; then
. env.sh
fi
echo "This tool support following building mode(s):"
echo "--------------------------------------------------------------------------------"
echo " 1. Build all, uboot and kernel and pack to download images."
echo " 2. Build uboot only."
echo " 3. Build kernel only."
echo " 4. kernel configure."
echo " 5. Pack the builds to target download image, this step must execute after u-boot,"
echo " kernel and rootfs build out"
echo " 6. update local build to SD with bpi image flashed"
echo " 7. Clean all build."
echo "--------------------------------------------------------------------------------"
if [ -z "$MODE" ]; then
read -p "Please choose a mode(1-7): " mode
echo
else
mode=$MODE
fi
if [ -z "$mode" ]; then
echo -e "\033[31m No build mode choose, using Build all default \033[0m"
mode=1
fi
case $mode in
1) make &&
make pack;;
2) make u-boot;;
3) make kernel;;
4) make kernel-config;;
5) make pack;;
6) make install;;
7) make clean;;
esac
echo