forked from StefanescuCristian/hammerhead
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·40 lines (30 loc) · 983 Bytes
/
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
#!/bin/bash
rm *.img
rm *.zip
make mrproper
make big-bum_defconfig
if [ $# -gt 0 ]; then
echo $1 > .version
fi
J=$(echo $(($(grep processor /proc/cpuinfo | wc -l) + 1)))
make -j"$J"
if [ -e arch/arm/boot/zImage-dtb ]; then
cp arch/arm/boot/zImage-dtb ../ramdisk_hammerhead/
cd ../ramdisk_hammerhead/
version=$(cat ../hammerhead/.version)
for branch in ext4 f2fs f2fs-all; do
git checkout $branch
echo "making $branch ramdisk"
./mkbootfs boot.img-ramdisk | gzip > ramdisk.gz
echo "making $branch boot image"
./mkbootimg --kernel zImage-dtb --cmdline 'console=ttyHSL0,115200,n8 androidboot.hardware=hammerhead user_debug=31 msm_watchdog_v2.enable=1' --base 0x00000000 --pagesize 2048 --ramdisk_offset 0x02900000 --tags_offset 0x02700000 --ramdisk ramdisk.gz --output ../hammerhead/boot-"$branch"-v"$version".img
rm -rf ramdisk.gz
done
rm -rf zImage*
cd ../hammerhead
fi
if [ -e "boot-ext4-v"$version".img" ]; then
./zip.sh
./private_push
fi
rm arch/arm/boot/zImage*