-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
60 lines (44 loc) · 1.06 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
#!/bin/bash
CRTDIR=$(pwd)
base=$1
profile=$2
ui=$3
echo $base
if [ ! -e "$base" ]; then
echo "Please enter base folder"
exit 1
else
if [ ! -d $base ]; then
echo "Openwrt base folder not exist"
exit 1
fi
fi
if [ ! -n "$profile" ]; then
profile=target_wlan_ap-gl-axt1800
fi
if [ ! -n "$ui" ]; then
ui=true
fi
echo "Start..."
#clone source tree
git clone https://github.com/gl-inet/gl-infra-builder.git $base/gl-infra-builder
cp -r *.yml $base/gl-infra-builder/profiles
cd $base/gl-infra-builder
#setup
if [[ $profile == *5-4* ]]; then
python3 setup.py -c configs/config-wlan-ap-5.4.yml
else
python3 setup.py -c configs/config-wlan-ap.yml
fi
cd wlan-ap/openwrt
./scripts/gen_config.py $profile glinet_depends custom
git clone https://github.com/gl-inet/glinet4.x.git $base/glinet
./scripts/feeds update -a
./scripts/feeds install -a
make defconfig
make -j$(expr $(nproc) + 1) download V=s >/dev/null
if [[ $ui == true ]]; then
make -j$(expr $(nproc) + 1) GL_PKGDIR=$base/glinet/ipq60xx/ V=s 1>/dev/null
else
make -j$(expr $(nproc) + 1) V=s 1>/dev/null
fi