-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.sh
43 lines (36 loc) · 1.46 KB
/
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
41
42
43
#!/bin/bash
function compile()
{
source ~/.bashrc && source ~/.profile
export LC_ALL=C && export USE_CCACHE=1
ccache -M 100G
CROSS_COMPILE+="ccache clang"
CCACHE=true
export ARCH=arm64
export KBUILD_BUILD_HOST=ohing
export KBUILD_BUILD_USER="sakthivel"
git clone --depth=1 https://github.com/sarthakroy2002/clang-r353983c1 clang
git clone --depth=1 https://github.com/LineageOS/android_prebuilts_gcc_linux-x86_aarch64_aarch64-linux-android-4.9 los-4.9-64
git clone --depth=1 https://github.com/LineageOS/android_prebuilts_gcc_linux-x86_arm_arm-linux-androideabi-4.9 los-4.9-32
[ -d "out" ] && rm -rf out || mkdir -p out
make O=out ARCH=arm64 E7746_defconfig
PATH="${PWD}/clang/bin:${PATH}:${PWD}/los-4.9-32/bin:${PATH}:${PWD}/los-4.9-64/bin:${PATH}" \
make -j$(nproc --all) O=out \
ARCH=arm64 \
CC='ccache clang -Qunused-arguments -fcolor-diagnostics' \
CLANG_TRIPLE=aarch64-linux-gnu- \
CROSS_COMPILE="${PWD}/los-4.9-64/bin/aarch64-linux-android-" \
CROSS_COMPILE_ARM32="${PWD}/los-4.9-32/bin/arm-linux-androideabi-" \
CONFIG_NO_ERROR_ON_MISMATCH=y
}
function zupload()
{
git clone --depth=1 https://github.com/SakthivelNadar/AnyKernel3-2.git AnyKernel
cp out/arch/arm64/boot/Image.gz-dtb AnyKernel
cd AnyKernel
zip -r9 StormBreaker-r1.0-yogurt.zip *
curl -sL https://git.io/file-transfer | sh
./transfer wet StormBreaker-r1.0-yogurt.zip
}
compile
zupload