-
Notifications
You must be signed in to change notification settings - Fork 1
/
compile.sh
executable file
·58 lines (42 loc) · 1.57 KB
/
compile.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
#!/bin/bash
# copy right by zetaxbyte
# you can rich me on telegram t.me/@zetaxbyte
cyan="\033[96m"
green="\033[92m"
red="\033[91m"
blue="\033[94m"
yellow="\033[93m"
echo -e "$cyan===========================\033[0m"
echo -e "$cyan= START COMPILING KERNEL =\033[0m"
echo -e "$cyan===========================\033[0m"
echo -e "$blue...LOADING...\033[0m"
echo -e -ne "$green## (10%\r"
sleep 0.7
echo -e -ne "$green##### (33%)\r"
sleep 0.7
echo -e -ne "$green############# (66%)\r"
sleep 0.7
echo -e -ne "$green####################### (100%)\r"
echo -ne "\n"
echo -e -n "$yellow\033[104mPRESS ENTER TO CONTINUE\033[0m"
read P
echo $P
# change DEFCONFIG to you are defconfig name or device codename
DEFCONFIG="tama_aurora_kddi_defconfig"
# you can set you name or host name(optional)
export KBUILD_BUILD_USER=kanonify
export KBUILD_BUILD_HOST=android-build
# change TC_DIR(directory) with your clang
TC_DIR="/workspace"
# do not modify export PATCH it's been including with TC_DIR
export PATH="$TC_DIR/bin:$PATH"
mkdir -p out
make O=out ARCH=arm64 $DEFCONFIG
make -j$(nproc --all) O=out ARCH=arm64 CC=clang LD=ld.lld AR=llvm-ar AS=llvm-as NM=llvm-nm OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump STRIP=llvm-strip CROSS_COMPILE=aarch64-linux-gnu- CROSS_COMPILE_ARM32=arm-linux-gnueabi- 2>&1 | tee log.txt
if [ -f out/arch/arm64/boot/Image.gz ] ; then
echo -e "$cyan===========================\033[0m"
echo -e "$cyan= SUCCESS COMPILE KERNEL =\033[0m"
echo -e "$cyan===========================\033[0m"
else
echo -e "$red!ups...something wrong!?\033[0m"
fi