forked from beagleboard/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jenkins_build.sh
executable file
·47 lines (39 loc) · 1.47 KB
/
jenkins_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
#!/bin/bash
#git clone -b 5.10 https://github.com/beagleboard/linux --depth=10
#cd ./linux
if [ ! -d ./gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/ ] ; then
rm -rf ./gcc-* || true
#wget -c ${site}/${version}/${filename}
wget -c http://192.168.3.125/jenkins/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf.tar.xz
tar xf gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf.tar.xz
fi
export CC=`pwd`/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
make ARCH=arm CROSS_COMPILE=${CC} clean
make ARCH=arm CROSS_COMPILE=${CC} bb.org_defconfig
echo "[make ARCH=arm -j4 CROSS_COMPILE=\"${binary}\" zImage]"
make ARCH=arm -j4 CROSS_COMPILE="ccache ${CC}" zImage
if [ ! -f arch/arm/boot/zImage ] ; then
echo "failed: [arch/arm/boot/zImage]"
exit 1
fi
echo "[make ARCH=arm -j4 CROSS_COMPILE=\"${binary}\" modules]"
make ARCH=arm -j4 CROSS_COMPILE="ccache ${CC}" modules
if [ ! -f drivers/spi/spidev.ko ] ; then
echo "failed: [drivers/spi/spidev.ko]"
exit 1
fi
echo "[make ARCH=arm CROSS_COMPILE=\"${binary}\" dtbs]"
make ARCH=arm CROSS_COMPILE="ccache ${CC}" dtbs
if [ ! -f arch/arm/boot/dts/am335x-boneblack.dtb ] ; then
echo "failed: [arch/arm/boot/dts/am335x-boneblack.dtb]"
exit 1
else
if [ -f arch/arm/boot/dts/am335x-pocketbeagle.dts ] ; then
if [ ! -f arch/arm/boot/dts/am335x-pocketbeagle.dtb ] ; then
echo "failed: [arch/arm/boot/dts/am335x-pocketbeagle.dtb]"
exit 1
fi
fi
fi
make ARCH=arm CROSS_COMPILE=${CC} clean
rm -rf ./gcc-* || true