OpenWrt Buildroot – Technical Reference

The available Kernel version are listed in include/


# Use the default kernel version if the Makefile doesn't override it


LINUX_VERSION-3.18 = .20

LINUX_KERNEL_MD5SUM-3.18.20 = 952c9159acdf4efbc96e08a27109d994
LINUX_KERNEL_MD5SUM-4.0.9 = 40fc5f6e2d718e539b45e6601c71985b
LINUX_KERNEL_MD5SUM-4.1.5 = f23e1d4ce8f63e46db81d56e36281885


split_version=$(subst ., ,$(1))
merge_version=$(subst $(space),.,$(1))
KERNEL_BASE=$(firstword $(subst -, ,$(LINUX_VERSION)))
KERNEL=$(call merge_version,$(wordlist 1,2,$(call split_version,$(KERNEL_BASE))))

# disable the md5sum check for unknown kernel versions

Kernel code is added with contents of generic/files and selectively <arch>/files/ subdirs.

It is patched with generic/patches-<Kernel version> and <arch>/patches-<Kernel version>

OpenWrt will create a symlink to a Kernel repository in the file system.

The target can be a local git kernel repository.

:!: You should patch your tree to contain OpenWrt changes - builds might fail to compile or fail at boot.

:!: Musl libc need patches to kernel headers that fix redifinitions errors with user space headers. uclibc and glibc don't need these changes.




  tools – automake, autoconf, sed, cmake
  toolchain/binutils – as, ld, …
  toolchain/gcc – gcc, g++, cpp, …
  target/linux – kernel modules
  package – core and feed packages
  target/linux – kernel image
  target/linux/image – firmware image file generation

Top command make world calls the following sequence of the commands:
make target/compile
make package/cleanup
make package/compile
make package/install
make package/preconfig
make target/install
make package/index

You may run each command independently. For example, if the process of compilation of packages stops on error, you may fix the problem and next continue without cleanup:
make package/compile
make package/install
make package/preconfig
make target/install
make package/index

see packages

The parameter V=x specifies level of messages in the process of the build.

    V=99 and V=1 are now deprecated in favor of a new verbosity class system,
    though the old flags are still supported.
    You can set the V variable on the command line (or OPENWRT_VERBOSE in the
    environment) to one or more of the following characters:
    - s: stdout+stderr (equal to the old V=99)
    - c: commands (for build systems that suppress commands by default, e.g. kbuild, cmake)
    - w: warnings/errors only (equal to the old V=1)


old options:

  • 1 - print a messages containing the working directory before and after other processing.
  • 99 - trace of the build, ordinary messages yellow, error messages red, debug - black;


make V=sc
make V=sw
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
  • Last modified: 2023/12/29 01:12
  • by alexceltare2