-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild_kernel
executable file
·27 lines (18 loc) · 991 Bytes
/
build_kernel
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
#!/bin/bash -x
export ARCH=arm64
# The path to Broadcom wi-fi firmware won't be defined correctly without this.
# See drivers/net/wireless/broadcom/bcmdhd/dhd.h.
#
export ANDROID_VERSION=10.0.0
BUILD_CROSS_COMPILE=~/src/toolchains/aarch64-linux-android-4.9/bin/aarch64-linux-android-
KERNEL_LLVM_BIN=../toolchains/clang+llvm-8.0.11/bin/clang
CLANG_TRIPLE=aarch64-linux-gnu-
KERNEL_MAKE_ENV="DTC_EXT=$(pwd)/tools/dtc CONFIG_BUILD_ARM64_DT_OVERLAY=y"
# If not cleaning the tree between builds, the following command will be
# required on 2nd and subsequent builds to prevent a huge slowdown of the
# build.
#
# find techpack -type f -name \*.o | xargs rm -f
make mrproper
make $KERNEL_MAKE_ENV CROSS_COMPILE=$BUILD_CROSS_COMPILE REAL_CC=$KERNEL_LLVM_BIN CLANG_TRIPLE=$CLANG_TRIPLE CFP_CC=$KERNEL_LLVM_BIN winnerx_eur_open_caliban_defconfig
make -j$(nproc) $KERNEL_MAKE_ENV CROSS_COMPILE=$BUILD_CROSS_COMPILE REAL_CC=$KERNEL_LLVM_BIN CLANG_TRIPLE=$CLANG_TRIPLE CFP_CC=$KERNEL_LLVM_BIN