forked from FuxkTME/Kernel_Xiaomi_SM8150_R
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_crux.sh
executable file
·44 lines (35 loc) · 990 Bytes
/
build_crux.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
#!/bin/bash
yellow='\033[0;33m'
white='\033[0m'
red='\033[0;31m'
gre='\e[0;32m'
ANYKERNEL3_DIR=$PWD/AnyKernel3
FINAL_KERNEL_ZIP=kernel-Tucana-r-VoyagerIII-$(git rev-parse --short=7 HEAD).zip
IMAGE_GZ=$PWD/out/arch/arm64/boot/Image.gz
ccache_=`which ccache`
export ARCH=arm64
export SUBARCH=arm64
export HEADER_ARCH=arm64
export CLANG_PATH=
export KBUILD_BUILD_HOST="Voayger-sever"
export KBUILD_BUILD_USER="TheVoyager"
# make mrproper O=out_crux || exit 1
make crux_defconfig O=out_crux || exit 1
Start=$(date +"%s")
make -j$(nproc --all) \
O=out_crux \
CC="${ccache_} clang" \
AS=llvm-as \
LD=ld.lld \
AR=llvm-ar \
NM=llvm-nm \
STRIP=llvm-strip \
OBJCOPY=llvm-objcopy \
OBJDUMP=llvm-objdump \
CLANG_TRIPLE=aarch64-linux-gnu- \
CROSS_COMPILE=/bin/aarch64-linux-gnu- \
CROSS_COMPILE_ARM32=/bin/arm-linux-gnueabi-
exit_code=$?
End=$(date +"%s")
Diff=$(($End - $Start))
echo -e "$gre << Build completed in $(($Diff / 60)) minutes and $(($Diff % 60)) seconds >> \n $white"