Configure the Linux Kernel - FrankBau/meta-marsboard-bsp GitHub Wiki

Prerequisites:

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 kernel
  • make KDIR=../kernel-build-artifacts/ menuconfig configure the kernel
  • make KDIR=../kernel-build-artifacts/ imx6q-marsboard.dtb build a specific device tree blob
  • make 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, or
  • bitbake -c compile_kernelmodules virtual/kernel build the "in-tree" loadable kernel modules.

Further reading