I want to be able to build the linux kernel for my LS2080A RDB manually from within the Yocto project.
Following the Freescale Yocto Project Quick Start Guide, if I do
bitbake -c cleansstate virtual/kernel
bitbake -c compile virtual/kernel
I get a directory tmp/work-shared/ls2080ardb/kernel-source which is filled with all the kernel source code, a Makefile and so on.
Within the kernel-source directory, normal kernel compilation would allow something like
make ARCH=arm64 CROSS-COMPILE=/path/to/cross/compiler/aarch64-fsl-linux- vmlinux
but this gives errors when I run it.
Can anyone point to how I can build the kernel manually? Better still, how can I build the kernel completely outside the Yocto project?
Hello Thomas Culverhouse,
Please run the following commands to get the clean Kernel source.
$ bitbake virtual/kernel -c cleansstate
$ bitbake virtual/kernel -c patch -f
Get the Kernel source in build_<platform>_release/tmp/work/<platform>-fsl-linux/linux-ls2-sdk/4.1-r0/git.
Configure Kernel with menuconfig.
Go to Kernel source folder.
$cp arch/arm64/configs/defconfig .config
$ make ARCH=arm64 menuconfig
Assume Toolchain is installed in /opt/fsl-networking/LS2080A-SDK/sysroots/x86_64-fsl-linux/usr/bin/aarch64-fsl-linux/.
Build Kernel image with the following commands.
$ make ARCH=arm64 CROSS_COMPILE="/opt/fsl-networking/LS2080A-SDK/sysroots/x86_64-fsl-linux/usr/bin/aarch64-fsl-linux/aarch64-fsl-linux-" LD=aarch64-fsl-linux-ld.bfd
Have a great day,
Yiping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------