forked from ivendor/samsung-kernel-msm7x30
-
Notifications
You must be signed in to change notification settings - Fork 7
/
build_bootimg
executable file
·73 lines (56 loc) · 2.15 KB
/
build_bootimg
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
72
73
#!/bin/bash
clear
echo " "
echo "Building boot.img for 4.1.x"
echo " "
echo "Cleaning possible previous remains"
rm -f build/4.1.x/zImage
rm -f build/4.1.x/boot.img-ramdisk/lib/modules/dhd.ko
rm -f build/4.1.x/boot.img-ramdisk/lib/modules/cifs.ko
rm -f build/4.1.x/ramdisk.gz
echo "Copying zImage and modules"
cp arch/arm/boot/zImage build/4.1.x/zImage
cp drivers/net/wireless/bcmdhd/dhd.ko build/4.1.x/boot.img-ramdisk/lib/modules/dhd.ko
cp fs/cifs/cifs.ko build/4.1.x/boot.img-ramdisk/lib/modules/cifs.ko
cd build/4.1.x
echo "Packing ramdisk"
../mkbootfs ./boot.img-ramdisk | gzip > ramdisk.gz
echo "Packing boot.img"
../mkbootimg --kernel zImage --ramdisk ramdisk.gz --cmdline "no_console_suspend=1 console=null androidboot.hardware=qcom androidboot.emmc=true hw=6" -o boot.img --base "0x00400000" --ramdiskaddr "0x01400000"
echo "Cleaning left overs"
rm -f zImage
rm -f boot.img-ramdisk/lib/modules/dhd.ko
rm -f boot.img-ramdisk/lib/modules/cifs.ko
rm -f ramdisk.gz
echo "Moving boot.img to build/4.1.x/output/boot.img"
mv -f boot.img output/boot.img
cd ../..
echo " "
echo "Building boot.img for 4.2.x"
echo " "
echo "Cleaning possible previous remains"
rm -f build/4.2.x/zImage
rm -f build/4.2.x/boot.img-ramdisk/lib/modules/dhd.ko
rm -f build/4.2.x/boot.img-ramdisk/lib/modules/cifs.ko
rm -f build/4.2.x/ramdisk.gz
echo "Copying zImage and modules"
cp arch/arm/boot/zImage build/4.2.x/zImage
cp drivers/net/wireless/bcmdhd/dhd.ko build/4.2.x/boot.img-ramdisk/lib/modules/dhd.ko
cp fs/cifs/cifs.ko build/4.2.x/boot.img-ramdisk/lib/modules/cifs.ko
cd build/4.2.x
echo "Packing ramdisk"
../mkbootfs ./boot.img-ramdisk | gzip > ramdisk.gz
echo "Packing boot.img"
../mkbootimg --kernel zImage --ramdisk ramdisk.gz --cmdline "no_console_suspend=1 console=null androidboot.hardware=qcom androidboot.emmc=true hw=6" -o boot.img --base "0x00400000" --ramdiskaddr "0x01400000"
echo "Cleaning left overs"
rm -f zImage
rm -f boot.img-ramdisk/lib/modules/dhd.ko
rm -f boot.img-ramdisk/lib/modules/cifs.ko
rm -f ramdisk.gz
echo "Moving boot.img to build/4.2.x/output/boot.img"
mv -f boot.img output/boot.img
cd ..
echo " "
echo " "
echo " "
echo "boot.img created for JB v4.1.x and JB 4.2.x"