Configure the Linux Kernel - FrankBau/meta-marsboard-bsp GitHub Wiki
Prerequisites:
- a working bitbake shell
using a devshell
Enter
bitbake -c devshell virtual/kernel
A new shell will open and put you to the kernel source folder:
root@FrankBuntuSSD:~/MarSBoard/fido/build/tmp/work-shared/marsboard/kernel-source#
Now you can use make
to (re-)build the kernel or make help
to see more make targets.
Note that, depending on your kernel, the output is possibly in another folder (like ../kernel-build-artifacts/
) which must be specified on the make command line using KDIR
.
Examples:
make KDIR=../kernel-build-artifacts/
build the kernelmake KDIR=../kernel-build-artifacts/ menuconfig
configure the kernelmake KDIR=../kernel-build-artifacts/ imx6q-marsboard.dtb
build a specific device tree blobmake make KDIR=../kernel-build-artifacts/ modules M=/home/frank/my_module
build a loadable kernel module "out-of-tree"
using bitbake
Some of the make targets are wrapped by the kernel recipe an can be build using bitbake. For example
bitbake -c menuconfig virtual/kernel
build the kernel, orbitbake -c compile_kernelmodules virtual/kernel
build the "in-tree" loadable kernel modules.
Further reading
- Yocto Kernel Lab: https://www.yoctoproject.org/sites/default/files/elc2013-kernel-lab.pdf