-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.sh
executable file
·59 lines (50 loc) · 1.59 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
echo "Cloning dependencies"
git clone --depth=1 https://github.com/kdrag0n/proton-clang clang
git clone --depth=1 https://github.com/LineageOS/android_prebuilts_gcc_linux-x86_aarch64_aarch64-linux-android-4.9 gcc
git clone --depth=1 https://github.com/LineageOS/android_prebuilts_gcc_linux-x86_arm_arm-linux-androideabi-4.9 gcc32
git clone https://github.com/sm6115-dev/AnyKernel3.git --depth=1 AnyKernel
echo "Done"
KERNEL_DIR=$(pwd)
IMAGE="${KERNEL_DIR}/out/arch/arm64/boot/Image"
TANGGAL=$(date +"%Y%m%d-%H")
BRANCH="$(git rev-parse --abbrev-ref HEAD)"
PATH="${KERNEL_DIR}/clang/bin:${KERNEL_DIR}/gcc/bin:${KERNEL_DIR}/gcc32/bin:${PATH}"
export ARCH=arm64
export KBUILD_BUILD_USER=gagan
export KBUILD_BUILD_HOST=malvi
make O=out ARCH=arm64 vendor/bengal-perf_defconfig
# Compile plox
compile() {
make -j$(nproc) O=out \
ARCH=arm64 \
CC=clang \
CLANG_TRIPLE=aarch64-linux-gnu- \
CROSS_COMPILE=aarch64-linux-android- \
CROSS_COMPILE_ARM32=arm-linux-androideabi- $1 $2 $3
}
module() {
[ -d "modules" ] && rm -rf modules || mkdir -p modules
compile \
INSTALL_MOD_PATH=../modules \
INSTALL_MOD_STRIP=1 \
modules_install
}
# Zipping
zipping() {
cd AnyKernel || exit 1
cp ../out/arch/arm64/boot/Image .
cp ../out/arch/arm64/boot/dtb.img .
cp ../out/arch/arm64/boot/dtbo.img .
zip -r9 CartelProject-lime-BETA-${TANGGAL}.zip *
cd ..
}
# Upload
upload() {
cd AnyKernel && curl -sL https://git.io/file-transfer | sh && ./transfer wet *.zip
cd ..
}
compile
module
zipping
upload