Last active
April 10, 2017 09:55
-
-
Save shakalaca/3f2589bf1cd078c3c4ab17c6281da713 to your computer and use it in GitHub Desktop.
Environment setup for kernel building
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Paths: | |
# /home/prebuilts/aarch64-linux-android-4.9 : your toolchain | |
# /home/work/ZS570KL : your working directory | |
# /home/work/ZS570KL/kernel/msm-3.18 : your kernel source (with AndroidKernel.mk) | |
# /home/work/ZS570KL/out/KERNEL_OBJ : compiled kernel objects | |
# /home/work/ZS570KL/system/lib/modules : output modules | |
* execute 'source envsetup.sh' when login | |
* mkconfig to setup kernel config file for building | |
* mkkernel to build kernel image and modules | |
* modules will be at <working_dir>/system/lib/modules | |
* kernel will be at <working_dir>/out/kernel/msm-3.18/arch/arm64/boot/Image.gz-dtb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# basic environment setup | |
export LC_CTYPE=C | |
export PATH=/home/prebuilts/aarch64-linux-android-4.9/bin/:$PATH | |
export TARGET_OUT=system | |
export TARGET_OUT_INTERMEDIATES=out | |
export JOB_NUMBER=`grep "^processor" /proc/cpuinfo | wc -l` | |
# kernel compile flags | |
export TARGET_KERNEL_ARCH=arm64 | |
export TARGET_KERNEL_CROSS_COMPILE_PREFIX=aarch64-linux-android- | |
export TARGET_KERNEL_APPEND_DTB=true | |
export KERNEL_DEFCONFIG=zs570kl-perf_defconfig | |
# shortcuts | |
alias mkconfig='make -f kernel/msm-3.18/AndroidKernel.mk "$TARGET_OUT_INTERMEDIATES"/kernel/msm-3.18/.config' | |
alias mkkernel='make -f kernel/msm-3.18/AndroidKernel.mk "$TARGET_OUT_INTERMEDIATES"/kernel/msm-3.18/arch/arm64/boot/Image.gz-dtb -j"$JOB_NUMBER"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment