Skip to content
This repository was archived by the owner on Dec 2, 2020. It is now read-only.

Commit bd5c819

Browse files
committed
ci:Fix and improve the buildscript
Signed-off-by: dracarys18 <karthihegde010@gmail.com>
1 parent e558944 commit bd5c819

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

.circleci/build.sh

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
echo "Cloning dependencies"
33
git clone --depth=1 https://github.com/dracarys18/NotKernel kernel
44
cd kernel
5-
git clone -q -j32 https://github.com/dracarys18/toolchain.git
6-
git clone -q -j32 https://github.com/dracarys18/toolchain32.git
5+
git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 -b android-9.0.0_r39 toolchain
6+
git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9 -b android-9.0.0_r39 toolchain32
77
git clone --depth=1 https://github.com/dracarys18/AnyKernel3.git Anykernel
88
echo "Done"
99
GCC="$(pwd)/aarch64-linux-android-"
@@ -13,6 +13,7 @@ START=$(date +"%s")
1313
export CONFIG_PATH=$PWD/arch/arm64/configs/mido_defconfig
1414
PATH="${PWD}/toolchain/bin:${PWD}/toolchain32/bin:${PATH}"
1515
export CROSS_COMPILE_ARM32="$(pwd)/toolchain32/bin/arm-linux-androideabi-"
16+
export CROSS_COMPILE="aarch64-linux-android-"
1617
export ARCH=arm64
1718
export KBUILD_BUILD_HOST=NotKernel
1819
export KBUILD_BUILD_USER="root"
@@ -32,7 +33,7 @@ function sendinfo() {
3233
}
3334
# Push kernel to channel
3435
function push() {
35-
cd AnyKernel
36+
cd Anykernel
3637
ZIP=$(echo *.zip)
3738
curl -F document=@$ZIP "https://api.telegram.org/bot$token/sendDocument" \
3839
-F chat_id="$chat_id" \
@@ -46,23 +47,27 @@ function finerr() {
4647
-d chat_id="$chat_id" \
4748
-d "disable_web_page_preview=true" \
4849
-d "parse_mode=markdown" \
49-
-d text="Build throw an error(s)"
50+
-d text="Build is throwing error(s)"
5051
exit 1
5152
}
5253
# Compile plox
5354
function compile() {
5455
make O=out clean && make O=out mrproper && make O=out mido_defconfig
5556
make O=out -j$(nproc --all) 2>&1| tee build.log
56-
cp out/arch/arm64/boot/Image.gz-dtb AnyKernel/zImage
57+
if ! [ -a $IMAGE ]; then
58+
finerr
59+
exit 1
60+
else
61+
cp $PWD/out/arch/arm64/boot/Image.gz-dtb $PWD/Anykernel/zImage
62+
fi
5763
}
5864

5965
# Zipping
6066
function zipping() {
61-
cd AnyKernel || exit 1
67+
cd Anykernel || exit 1
6268
zip -r9 NotKernel-Mido-${TANGGAL}.zip *
6369
cd ..
6470
}
65-
sticker
6671
sendinfo
6772
compile
6873
zipping

0 commit comments

Comments
 (0)