ec2-build.sh: fixes based on a test
[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 date
18 time ./patch.sh
19 date
20 cp $BUILD/kernel/configs/beaglebone $BUILD/kernel/kernel/arch/arm/configs/beaglebone_defconfig
21 cp $BUILD/am33x-cm3/bin/am335x-pm-firmware.bin $BUILD/kernel/kernel/firmware/am335x-pm-firmware.bin
22 mkdir -p $BUILD/kernel/kernel/rootfs
23 cd $BUILD/kernel/kernel
24 time make ARCH=arm CROSS_COMPILE=$TOOLS beaglebone_defconfig
25 time make ARCH=arm CROSS_COMPILE=$TOOLS -j16 uImage dtbs
26 time make ARCH=arm CROSS_COMPILE=$TOOLS -j16 modules
27 time make ARCH=arm CROSS_COMPILE=$TOOLS INSTALL_MOD_PATH=$BUILD/kernel/kernel/rootfs modules_install
28 time make ARCH=arm CROSS_COMPILE=$TOOLS uImage-dtb.am335x-bone
29 time make ARCH=arm CROSS_COMPILE=$TOOLS uImage-dtb.am335x-bonelt
30 cd $BUILD/kernel/kernel/rootfs
31 time tar -cvzf modules.tgz lib
32 date