forked from beagleboard/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jenkins_build.sh
executable file
·61 lines (48 loc) · 1.59 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
#gcc:
site="https://releases.linaro.org"
gcc_version="6.4"
gcc_minor=".1"
release="17.11"
target="arm-linux-gnueabihf"
version="components/toolchain/binaries/${gcc_version}-20${release}/${target}"
filename="gcc-linaro-${gcc_version}${gcc_minor}-20${release}-x86_64_${target}.tar.xz"
directory="gcc-linaro-${gcc_version}${gcc_minor}-20${release}-x86_64_${target}"
datestamp="${gcc_version}-20${release}-${target}"
binary="bin/${target}-"
#
if [ ! -d ${directory}/ ] ; then
rm -rf ./gcc-* || true
#wget -c ${site}/${version}/${filename}
wget -c http://rcn-ee.online/builds/jenkins-dl/${filename}
tar xf ${filename}
fi
export CC=`pwd`/${directory}/bin/arm-linux-gnueabihf-
make ARCH=arm clean
make ARCH=arm bb.org_defconfig
echo "[make ARCH=arm -j2 CROSS_COMPILE=\"${binary}\" zImage]"
make ARCH=arm -j2 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 -j2 CROSS_COMPILE=\"${binary}\" modules]"
make ARCH=arm -j2 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 -j2 CROSS_COMPILE=\"${binary}\" dtbs]"
make ARCH=arm -j2 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 clean