-
Notifications
You must be signed in to change notification settings - Fork 4
/
gcc.sh
37 lines (36 loc) · 1.23 KB
/
gcc.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
#!/usr/bin/env bash
echo "Cloning dependencies"
git clone https://github.com/mvaisakh/gcc-arm64 --depth=1
git clone https://github.com/mvaisakh/gcc-arm --depth=1
git clone --depth=1 https://gitlab.com/Baibhab34/AnyKernel3.git -b rmx1801 AnyKernel
echo "Done"
IMAGE=$(pwd)/out/arch/arm64/boot/Image.gz-dtb
TANGGAL=$(date +"%F-%S")
START=$(date +"%s")
export CONFIG_PATH=$PWD/arch/arm64/configs/RMX1801_defconfig
PATH="$(pwd)/gcc-arm64/bin:$(pwd)/gcc-arm/bin:${PATH}" \
export ARCH=arm64
export USE_CCACHE=1
export KBUILD_BUILD_HOST=GCC
export KBUILD_BUILD_USER="baibhab"
# Compile plox
function compile() {
make O=out ARCH=arm64 RMX1801_defconfig
PATH="$(pwd)/gcc-arm64/bin:$(pwd)/gcc-arm/bin:${PATH}" \
make -j$(nproc --all) O=out \
ARCH=arm64 \
CROSS_COMPILE=aarch64-elf- \
CROSS_COMPILE_ARM32=arm-eabi-
cp out/arch/arm64/boot/Image.gz-dtb AnyKernel
}
# Zipping
function zipping() {
cd AnyKernel || exit 1
zip -r9 Avalanche-RMX1801-EAS-${TANGGAL}.zip *
curl https://bashupload.com/Avalanche-RMX1801-EAS-${TANGGAL}.zip --data-binary @Avalanche-RMX1801-EAS-${TANGGAL}.zip
cd ..
}
compile
zipping
END=$(date +"%s")
DIFF=$(($END - $START))