Build Linux kernel manually in Yocto project for LS2080A

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Build Linux kernel manually in Yocto project for LS2080A

3,194 Views
thomasculverhou
Contributor III


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?

Labels (1)
3 Replies

1,736 Views
yipingwang
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

1,736 Views
thomasculverhou
Contributor III

Also, can you please give instructions for building u-boot from source?

Thanks,

Tom

0 Kudos

1,736 Views
thomasculverhou
Contributor III

Hi Yiping,

Can you please update these instructions to work with the NXP Linux SDK v2.0 released last month? These instructions are for v1.0.

Kind regards,

Tom

0 Kudos