blob: eede8f41855ca7cd80e2b77f10a2523b2f1d3a36 [file] [log] [blame]
b.liud440f9f2025-04-18 10:44:31 +08001#!/bin/bash
2
3DECONFIG_FILE=defconfig_asr1803p401
4
5help()
6{
7 echo "./asr_build.sh 1803/1806/1903/clean"
8}
9
10build_init()
11{
12 if [ ! -d "feeds/" ]; then
13 echo "Start build inti..."
14 ./scripts/feeds update -a
15 ./scripts/feeds install -a
16 fi
17}
18
19build_code()
20{
21 echo "$DECONFIG_FILE"
22 make $DECONFIG_FILE
23 make -j8 V=99 2>&1 | tee build.log
24}
25
26if [ -n "$1" ] ;then #有参数
27 case "$1" in
28 clean)
29 make distclean
30 ;;
31 1806)
32 build_init
33
34 DECONFIG_FILE=defconfig_asr1806p301
35
36 build_code
37 ;;
38 1803)
39 build_init
40
41 DECONFIG_FILE=defconfig_asr1803p401
42
43 build_code
44 ;;
45 1903)
46 build_init
47
48 DECONFIG_FILE=defconfig_asr1903p501
49
50 build_code
51 ;;
52 *)
53 help
54 ;;
55 esac
56else # 全编
57 help
58fi