-
Notifications
You must be signed in to change notification settings - Fork 128
/
build-config
executable file
·67 lines (55 loc) · 1.36 KB
/
build-config
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
62
63
64
65
66
67
#!/bin/bash
cd `dirname $0`
MYNAME=`basename $0`
if [ "$MYNAME" == "build-test-config" ]; then
echo "Creating config for test image"
TEST=1
fi
if [ "$1" == "" ]; then
VERSION=`cat .piversion`
echo No version given, assuming Pi$VERSION
else
VERSION=$1
fi
echo $VERSION > .piversion
BRDIR=`./brdir $VERSION`
echo "Building in $BRDIR"
echo $VERSION > $BRDIR/.piversion
echo $VERSION > buildroot/PIVERSION
if [ "$VERSION" == "4" ]; then
CFG="raspberrypi4_64_defconfig"
UI=1
elif [ "$VERSION" == "3" ]; then
CFG="raspberrypi3_64_defconfig"
UI=1
elif [ "$VERSION" == "2" ]; then
CFG="raspberrypi2_defconfig"
UI=0
elif [ "$VERSION" == "02" ]; then
CFG="raspberrypizero2w_defconfig"
UI=0
elif [ "$VERSION" == "0" ]; then
CFG="raspberrypi0_defconfig"
UI=0
else
echo "Pi version $1 not supported"
exit 1
fi
pushd ../buildroot
make $CFG
popd
mv ../buildroot/.config $BRDIR/.config
cat configs/override.conf >> $BRDIR/.config
echo "BR2_PACKAGE_PIVERSION_$VERSION=y" >> $BRDIR/.config
# use full package set
echo "BR2_PACKAGE_HIFIBERRY_ALL=y" >> $BRDIR/.config
if [ "$UI" == "1" ]; then
echo "BR2_PACKAGE_HIFIBERRY_LOCALBROWSER=y" >> $BRDIR/.config
fi
if [ "$TEST" == "1" ]; then
echo "Changing to test config"
cat configs/override-test.conf >> $BRDIR/.config
fi
# Update version
TS=`date +%Y%m%d`
echo $TS > buildroot/VERSION