3

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?

Eliyahu Mintz
  • 31
  • 1
  • 2

2 Answers2

9

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.).

Arnout
  • 2,927
  • 16
  • 24
1

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

MauriceS
  • 51
  • 4