-
Notifications
You must be signed in to change notification settings - Fork 4
/
build_maple_dsds
executable file
·78 lines (61 loc) · 2.57 KB
/
build_maple_dsds
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
74
75
76
77
78
### GCC 4.9.x
### I'm using this: https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/
export ARCH=arm64
export PATH=~/aarch64-linux-android-4.9-aosp/bin/:$PATH
### See prefix of file names in the toolchain's bin directory
export CROSS_COMPILE=aarch64-linux-android-
if [ -e out/arch/arm64/boot ]; then
rm -rf out/arch/arm64/boot
fi
export KBUILD_DIFFCONFIG=maple_dsds_diffconfig
make msmcortex-perf_defconfig O=./out
time make -j16 O=./out
echo "checking for compiled kernel..."
if [ -f out/arch/arm64/boot/Image.gz-dtb ]
then
echo "DONE"
### G8142
../final_files/mkbootimg \
--kernel out/arch/arm64/boot/Image.gz-dtb \
--ramdisk ../final_files/ramdisk_maple_dsds.cpio.gz \
--cmdline "androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 sched_enable_hmp=1 sched_enable_power_aware=1 service_locator.enable=1 swiotlb=2048 androidboot.configfs=true androidboot.usbcontroller=a800000.dwc3 zram.backend=z3fold buildvariant=userdebug enforcing=0" \
--base 0x00000000 \
--kernel_offset 0x00008000 \
--ramdisk_offset 0x01000000 \
--tags_offset 0x00000100 \
--pagesize 4096 \
--output ../final_files/boot_G8142.img
# Make DRM patch supported version
../final_files/mkbootimg \
--kernel out/arch/arm64/boot/Image.gz-dtb \
--ramdisk ../final_files/ramdisk_maple_dsds_DRMP.cpio.gz \
--cmdline "androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 sched_enable_hmp=1 sched_enable_power_aware=1 service_locator.enable=1 swiotlb=2048 androidboot.configfs=true androidboot.usbcontroller=a800000.dwc3 zram.backend=z3fold buildvariant=userdebug enforcing=0" \
--base 0x00000000 \
--kernel_offset 0x00008000 \
--ramdisk_offset 0x01000000 \
--tags_offset 0x00000100 \
--pagesize 4096 \
--output ../final_files/boot_G8142_DRMP.img
### Version number
echo -n "Enter version number: "
read version
if [ -e ../final_files/boot_G8142.img ]
then
### Zip boot.img
cd ../final_files/
mv boot_G8142.img boot.img
zip XZP_AndroPlusKernel_v.zip boot.img
rm -f boot.img
### Copy zip to my desktop
dd if=XZP_AndroPlusKernel_v.zip of="/mnt/hgfs/VMShare/Desktop/XZP_AndroPlusKernel_v$version.zip"
fi
if [ -e boot_G8142_DRMP.img ]
then
### Zip boot.img
mv boot_G8142_DRMP.img boot.img
zip XZP_AndroPlusKernel_v.zip boot.img
rm -f boot.img
### Copy zip to my desktop
dd if=XZP_AndroPlusKernel_v.zip of="/mnt/hgfs/VMShare/Desktop/XZP_AndroPlusKernel_v${version}_for_DRMPatch.zip"
fi
fi