ec2-build.sh: add helper for downloading files after being built
[beagleboard-validation:scripts.git] / ec2-build / build-kernel.sh
1 #!/bin/sh
2 set -e
3 set -x
4 BUILD=/mnt/build
5 PATH=$BUILD/u-boot/tools:$PATH
6 TOOLS=arm-linux-gnueabi-
7 BRANCH=3.8
8 node --version
9 date
10 time git clone git://github.com/jadonk/kernel.git $BUILD/kernel
11 time git clone git://github.com/jadonk/u-boot.git $BUILD/u-boot
12 time git clone git://github.com/jadonk/am33x-cm3.git $BUILD/am33x-cm3
13 cd $BUILD/u-boot
14 time make -j16 tools
15 cd $BUILD/kernel
16 time git checkout $BRANCH
17 git show
18 date
19 time ./patch.sh
20 date
21 cp $BUILD/kernel/configs/beaglebone $BUILD/kernel/kernel/arch/arm/configs/beaglebone_defconfig
22 cp $BUILD/am33x-cm3/bin/am335x-pm-firmware.bin $BUILD/kernel/kernel/firmware/am335x-pm-firmware.bin
23 mkdir -p $BUILD/kernel/kernel/rootfs
24 cd $BUILD/kernel/kernel
25 time make ARCH=arm CROSS_COMPILE=$TOOLS beaglebone_defconfig
26 time make ARCH=arm CROSS_COMPILE=$TOOLS -j16 uImage
27 time make ARCH=arm CROSS_COMPILE=$TOOLS -j16 dtbs
28 time make ARCH=arm CROSS_COMPILE=$TOOLS -j16 modules
29 time make ARCH=arm CROSS_COMPILE=$TOOLS INSTALL_MOD_PATH=$BUILD/kernel/kernel/rootfs modules_install
30 time make ARCH=arm CROSS_COMPILE=$TOOLS uImage-dtb.am335x-bone
31 time make ARCH=arm CROSS_COMPILE=$TOOLS uImage-dtb.am335x-bonelt
32 cd $BUILD/kernel/kernel/rootfs
33 time tar -cvzf modules.tgz lib
34 cd $BUILD/kernel/kernel/arch/arm/boot/dts
35 time tar -cvzf dtb.tgz *.dtb
36 date
37 echo *** COMPLETED build-kernel.sh ***