-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkernel-build.sh
More file actions
executable file
·71 lines (56 loc) · 1.28 KB
/
kernel-build.sh
File metadata and controls
executable file
·71 lines (56 loc) · 1.28 KB
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
68
69
70
71
#!/bin/bash
#
# TheArkenstone
#
rm arch/arm/boot/zImage-dtb
rm boot.img
rm kernel.log
rm zip/boot.img
rm zip/TheArkenstone-KK.zip
clear
echo ""
echo ""
echo "Start kernel build"
echo ""
echo ""
git checkout mainstream
make clean
make mrproper
export ARCH=arm
export CROSS_COMPILE=~/tmp/arm-eabi-4.9/bin/arm-eabi-
export ENABLE_GRAPHITE=true
make hammerhead_defconfig
time make -j8 2>&1 | tee kernel.log
echo ""
echo "Building boot.img"
cp arch/arm/boot/zImage-dtb ../ramdisk_hammerhead/
cd ../ramdisk_hammerhead/
echo ""
echo "building ramdisk"
./mkbootfs ramdisk | gzip > ramdisk.gz
echo ""
echo "making boot image"
./mkbootimg --base 0x00000000 --ramdisk_offset 0x02900000 --second_offset 0x00F00000 --tags_offset 0x02700000 --cmdline 'console=ttyHSL0 androidboot.hardware=hammerhead user_debug=31 maxcpus=2 msm_watchdog_v2.enable=1 earlyprintk' --kernel zImage-dtb --ramdisk ramdisk.gz --output ../hammerhead/boot.img
rm -rf ramdisk.gz
rm -rf zImage
cd ../hammerhead/
zipfile="TheArkenstone-KK.zip"
echo ""
echo "zipping kernel"
cp boot.img zip/
rm -rf ../ramdisk_hammerhead/boot.img
cd zip/
rm -f *.zip
zip -r -9 $zipfile *
rm -f /tmp/*.zip
cp *.zip /tmp
cd ..
rm arch/arm/boot/zImage-dtb
rm boot.img
rm kernel.log
rm zip/boot.img
echo ""
echo ""
echo "Kernel build done"
echo ""
echo ""