Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kernel source place in Buildroot

Tags:

buildroot

I am new in Buildroot. I have linux kernel sources for P2041RDB NXP board, so where I should to place it and how to set this location in configuration?

like image 737
Eliyahu Mintz Avatar asked Oct 28 '25 00:10

Eliyahu Mintz


2 Answers

There is currently no way to set the path to the kernel source from the Buildroot configuration.

You have two options to do it.

  1. Create a file local.mk in the directory that contains .config (i.e. the Buildroot source directory if you don't use the O= option, or the output directory if you do use O=). In local.mk, add a line with LINUX_OVERRIDE_SRCDIR= and fill in the path to the kernel source (either an absolute path, or a path relative to the Buildroot source directory).

  2. Create a tarball of the kernel source. In the Buildroot configuration menu, under "Kernel", set "Kernel version" to "Custom tarball". Then set "URL of custom kernel tarball" to the file-URL, so file:///path/to/the/tarball.tar.gz.

Obviously, in either case, you need to enable the kernel build ("Linux kernel" option in the Kernel menu) and also set the other kernel options (kernel config, device tree, etc.).

like image 96
Arnout Avatar answered Oct 31 '25 11:10

Arnout


using local.mk works, BUT you need to also include LINUX_HEADERS_OVERRIDE_SRCDIR = in the local.mk file if you're building the cross compiler as well...

like image 43
MauriceS Avatar answered Oct 31 '25 11:10

MauriceS