forked from whatawurst/android_kernel_sony_msm8998
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild_maple.sh
63 lines (52 loc) · 1.53 KB
/
build_maple.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
echo
echo "Setup"
echo
branch=$(git symbolic-ref --short HEAD)
branch_name=$(git rev-parse --abbrev-ref HEAD)
last_commit=$(git rev-parse --verify --short=8 HEAD)
export LOCALVERSION="-Pop-Kernel-${branch_name}/${last_commit}"
mkdir -p out
export ARCH=arm64
export SUBARCH=arm64
make O=out clean
make O=out mrproper
echo
echo "Set DEFCONFIG"
echo
make CC=clang O=out lineage-msm8998-yoshino-maple_dsds_defconfig
echo
echo "Issue Build Commands"
echo
PATH=""$HOME"/Android-dev/toolchains/aosp-clang/clang-r522817/bin:"$HOME"/Android-dev/toolchains/aosp-clang/aarch64-linux-android-4.9/bin:"$HOME"/Android-dev/toolchains/aosp-clang/arm-linux-androideabi-4.9/bin:${PATH}" \
echo
echo "Build The Good Stuff"
echo
make -j$(nproc --all) O=out \
ARCH=arm64 \
SUBARCH=arm64 \
CC=clang \
CLANG_TRIPLE=aarch64-linux-gnu- \
CROSS_COMPILE=aarch64-linux-android- \
CROSS_COMPILE_ARM32=arm-linux-androideabi- \
HOSTCFLAGS="-fuse-ld=lld -Wno-unused-command-line-argument" \
LLVM=1 \
LLVM_IAS=1
echo
echo "Making flashable zip"
echo
echo
echo "Clean up"
echo
rm ./AnyKernel3/maple/*.zip
rm ./AnyKernel3/maple/Image.gz-dtb
echo
echo "copying new files"
echo
cp ./out/arch/arm64/boot/Image.gz-dtb ./AnyKernel3/maple/
cd ./AnyKernel3/maple/
zip -r9 Pop_kernel-maple"$version"-"$branch"-"$last_commit"-EAS.zip * -x .git README.md *placeholder
echo
echo "End"
echo
cd ..
cd ..