-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·59 lines (48 loc) · 1.5 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
while getopts 'acshj:' flag; do
case "${flag}" in
h)
echo "Build script for Yun/Yun101/Yun Shield Openwrt"
echo " "
echo "options:"
echo "-h, show brief help"
echo "-a, compile all packages"
echo "-c, clean before building"
echo "-s, safe mode, single job and verbose output"
exit 0
;;
a)
export COMPILEALL=1
;;
s)
export JOBS=1
export EXTRAFLAGS="V=s"
;;
c)
export CLEAN=1
;;
*)
export COMPILEALL=0
export CLEAN=0
export JOBS=`ls -d /sys/devices/system/cpu/cpu[[:digit:]]* | wc -w `
;;
esac
done
if [ x$CLEAN == x1 ] || [ ! -f .config ]; then
./scripts/feeds uninstall -a
./scripts/feeds update -a
./scripts/feeds install -a
rm -rf ./package/feeds/packages/rng-tools
rm -rf ./package/feeds/packages/avrdude
ln -s $PWD/feeds/arduino/avrdude/ package/feeds/arduino/avrdude
ln -s $PWD/feeds/arduino/rng-tools package/feeds/arduino/rng-tools
./scripts/feeds uninstall libfreecwmp libmicroxml sslh libesmtp luajit tracertools pcre linknx vala
make clean
fi
cp ~/openwrtyun-gpg-signing-keys/key-build* .
if [ x$COMPILEALL == x1 ]; then
cp config.full .config
else
cp config.default .config
fi
make oldconfig
make IGNORE_ERRORS=m $EXTRAFLAGS -j$JOBS