3 config BR2_LINUX_KERNEL
5 select BR2_PACKAGE_HOST_KMOD # Unconditional, even if modules not enabled
6 select BR2_PACKAGE_HOST_IMAGEMAGICK if BR2_LINUX_KERNEL_CUSTOM_LOGO_PATH != ""
8 Enable this option if you want to build a Linux kernel for
13 # Packages that need to have a kernel with support for loadable modules,
14 # but do not use the kernel-modules infrastructure, should select that
16 config BR2_LINUX_NEEDS_MODULES
20 # Version selection. We provide the choice between:
22 # 1. A single fairly recent stable kernel version
23 # 2. A custom stable version
25 # 4. A set of custom repository locations
28 prompt "Kernel version"
30 config BR2_LINUX_KERNEL_LATEST_VERSION
31 bool "Latest version (6.3)"
32 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_3 if BR2_KERNEL_HEADERS_AS_KERNEL
34 config BR2_LINUX_KERNEL_LATEST_CIP_VERSION
35 bool "Latest CIP SLTS version (5.10.162-cip24)"
36 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_10 if BR2_KERNEL_HEADERS_AS_KERNEL
38 CIP launched in the spring of 2016 to address the needs of
39 organizations in industries such as power generation and
40 distribution, water, oil and gas, transportation, building
41 automation and more for reliable and secure Linux-based
42 embedded systems that can be sustained over a period of
43 10 to as many as 60 years.
44 The project's goal is to provide an open source base layer
45 of industrial-grade software that permits the use and
46 implementation of software building blocks that meet
49 The CIP community plans to maintain 5.10 for security and
50 bug fixes for more than 10 years.
52 https://www.cip-project.org
54 config BR2_LINUX_KERNEL_LATEST_CIP_RT_VERSION
55 bool "Latest CIP RT SLTS version (5.10.162-cip24-rt10)"
56 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_10 if BR2_KERNEL_HEADERS_AS_KERNEL
58 Same as the CIP version, but this is the PREEMPT_RT realtime
61 The CIP community plans to maintain 5.10 for security and
62 bug fixes for more than 10 years.
64 https://www.cip-project.org
66 config BR2_LINUX_KERNEL_CUSTOM_VERSION
69 This option allows to use a specific official version from
70 kernel.org, like 2.6.x, 2.6.x.y, 3.x.y, ...
72 Note: you cannot use this option to select a _longterm_ 2.6
73 kernel, because these kernels are not located at the standard
74 URL at kernel.org. Instead, select "Custom tarball" and
75 specify the right URL directly.
77 config BR2_LINUX_KERNEL_CUSTOM_TARBALL
80 This option allows to specify a URL pointing to a kernel
81 source tarball. This URL can use any protocol recognized by
82 Buildroot, like http://, ftp://, file:// or scp://.
84 When pointing to a local tarball using file://, you may want
85 to use a make variable like $(TOPDIR) to reference the root of
88 config BR2_LINUX_KERNEL_CUSTOM_GIT
89 bool "Custom Git repository"
91 This option allows Buildroot to get the Linux kernel source
92 code from a Git repository.
94 config BR2_LINUX_KERNEL_CUSTOM_HG
95 bool "Custom Mercurial repository"
97 This option allows Buildroot to get the Linux kernel source
98 code from a Mercurial repository.
100 config BR2_LINUX_KERNEL_CUSTOM_SVN
101 bool "Custom Subversion repository"
103 This option allows Buildroot to get the Linux kernel source
104 code from a Subversion repository.
108 config BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE
109 string "Kernel version"
110 depends on BR2_LINUX_KERNEL_CUSTOM_VERSION
112 config BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION
113 string "URL of custom kernel tarball"
114 depends on BR2_LINUX_KERNEL_CUSTOM_TARBALL
116 if BR2_LINUX_KERNEL_CUSTOM_GIT || BR2_LINUX_KERNEL_CUSTOM_HG || BR2_LINUX_KERNEL_CUSTOM_SVN
118 config BR2_LINUX_KERNEL_CUSTOM_REPO_URL
119 string "URL of custom repository"
121 config BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION
122 string "Custom repository version"
124 Revision to use in the typical format used by
125 Git/Mercurial/Subversion E.G. a sha id, a tag, branch, ..
129 config BR2_LINUX_KERNEL_VERSION
131 default "6.3.10" if BR2_LINUX_KERNEL_LATEST_VERSION
132 default "5.10.162-cip24" if BR2_LINUX_KERNEL_LATEST_CIP_VERSION
133 default "5.10.162-cip24-rt10" if BR2_LINUX_KERNEL_LATEST_CIP_RT_VERSION
134 default BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE \
135 if BR2_LINUX_KERNEL_CUSTOM_VERSION
136 default "custom" if BR2_LINUX_KERNEL_CUSTOM_TARBALL
137 default BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION \
138 if BR2_LINUX_KERNEL_CUSTOM_GIT || BR2_LINUX_KERNEL_CUSTOM_HG || BR2_LINUX_KERNEL_CUSTOM_SVN
144 config BR2_LINUX_KERNEL_PATCH
145 string "Custom kernel patches"
147 A space-separated list of patches to apply to the
148 kernel. Each patch can be described as an URL, a local file
149 path, or a directory. In the case of a directory, all files
150 matching *.patch in the directory will be applied.
153 # Configuration selection
157 prompt "Kernel configuration"
158 default BR2_LINUX_KERNEL_USE_DEFCONFIG
160 config BR2_LINUX_KERNEL_USE_DEFCONFIG
161 bool "Using an in-tree defconfig file"
163 config BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG
164 bool "Use the architecture default configuration"
166 This option will use the default configuration for the
167 selected architecture. I.e, it is equivalent to running
168 "make ARCH=<foo> defconfig". This is useful on architectures
169 that have a single defconfig file, such as ARM64.
171 config BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG
172 bool "Using a custom (def)config file"
176 config BR2_LINUX_KERNEL_DEFCONFIG
177 string "Defconfig name"
178 depends on BR2_LINUX_KERNEL_USE_DEFCONFIG
180 Name of the kernel defconfig file to use, without the
181 trailing _defconfig. The defconfig is located in
182 arch/<arch>/configs in the kernel tree.
184 config BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE
185 string "Configuration file path"
186 depends on BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG
188 Path to the kernel configuration file
190 Note: this can be a defconfig file or a complete .config file,
191 which can later be saved back with make
192 linux-update-(def)config.
194 config BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES
195 string "Additional configuration fragment files"
197 A space-separated list of kernel configuration fragment files,
198 that will be merged to the main kernel configuration file.
200 config BR2_LINUX_KERNEL_CUSTOM_LOGO_PATH
201 string "Custom boot logo file path"
203 Use a custom Linux framebuffer boot logo.
204 Custom logo should be in PNG or JPEG format, it will be
205 converted to the linux kernel format (224 colors only)
206 and copied over the original logo file.
213 prompt "Kernel binary format"
214 default BR2_LINUX_KERNEL_ZIMAGE if BR2_arm || BR2_armeb
216 config BR2_LINUX_KERNEL_UIMAGE
218 depends on BR2_arc || BR2_arm || BR2_armeb || \
219 BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || \
220 BR2_sh || BR2_mips || BR2_mipsel || \
221 BR2_mips64 || BR2_mips64el || BR2_xtensa
222 select BR2_PACKAGE_HOST_UBOOT_TOOLS
224 config BR2_LINUX_KERNEL_APPENDED_UIMAGE
225 bool "uImage with appended DT"
226 depends on BR2_arm || BR2_armeb
227 select BR2_LINUX_KERNEL_DTS_SUPPORT
228 select BR2_LINUX_KERNEL_APPENDED_DTB
229 select BR2_PACKAGE_HOST_UBOOT_TOOLS
231 config BR2_LINUX_KERNEL_BZIMAGE
233 depends on BR2_i386 || BR2_x86_64 || BR2_s390x
235 config BR2_LINUX_KERNEL_ZIMAGE
237 depends on BR2_arm || BR2_armeb || BR2_powerpc || \
238 BR2_powerpc64 || BR2_powerpc64le || BR2_sparc || \
241 config BR2_LINUX_KERNEL_ZIMAGE_EPAPR
243 depends on BR2_powerpc64 || BR2_powerpc64le
245 config BR2_LINUX_KERNEL_APPENDED_ZIMAGE
246 bool "zImage with appended DT"
247 depends on BR2_arm || BR2_armeb
248 select BR2_LINUX_KERNEL_DTS_SUPPORT
249 select BR2_LINUX_KERNEL_APPENDED_DTB
251 config BR2_LINUX_KERNEL_CUIMAGE
253 depends on BR2_powerpc
254 select BR2_PACKAGE_HOST_UBOOT_TOOLS
255 select BR2_LINUX_KERNEL_DTS_SUPPORT
256 select BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT
258 config BR2_LINUX_KERNEL_SIMPLEIMAGE
260 depends on BR2_microblaze
261 select BR2_PACKAGE_HOST_UBOOT_TOOLS
262 select BR2_LINUX_KERNEL_DTS_SUPPORT
263 select BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT
265 config BR2_LINUX_KERNEL_IMAGE
267 depends on BR2_aarch64 || BR2_aarch64_be || BR2_riscv
269 config BR2_LINUX_KERNEL_IMAGEGZ
271 depends on BR2_aarch64 || BR2_aarch64_be || BR2_riscv
273 config BR2_LINUX_KERNEL_LINUX_BIN
275 depends on BR2_microblaze
276 select BR2_PACKAGE_HOST_UBOOT_TOOLS
278 config BR2_LINUX_KERNEL_VMLINUX_BIN
280 depends on BR2_mips || BR2_mipsel || BR2_sh
282 config BR2_LINUX_KERNEL_VMLINUX
285 config BR2_LINUX_KERNEL_VMLINUZ
287 depends on BR2_mips || BR2_mipsel
289 config BR2_LINUX_KERNEL_VMLINUZ_BIN
291 depends on BR2_mips || BR2_mipsel
293 config BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM
296 For certain cases a board-specific target image must be
297 used. For example, on powerPC where the OpenFirmware
298 description is attached in a board-specific kernel image
299 target like 'cuImage.mpc8379_rdb'.
301 Select this option and specify the make target in "Kernel
307 # Kernel compression format
311 prompt "Kernel compression format"
313 This selection will just ensure that the correct host tools
314 are built. The actual compression for the kernel should be
315 selected in the kernel configuration menu.
317 config BR2_LINUX_KERNEL_GZIP
318 bool "gzip compression"
320 config BR2_LINUX_KERNEL_LZ4
321 bool "lz4 compression"
323 config BR2_LINUX_KERNEL_LZMA
324 bool "lzma compression"
326 config BR2_LINUX_KERNEL_LZO
327 bool "lzo compression"
329 config BR2_LINUX_KERNEL_XZ
330 bool "xz compression"
332 config BR2_LINUX_KERNEL_ZSTD
333 bool "zstd compression"
335 config BR2_LINUX_KERNEL_UNCOMPRESSED
341 config BR2_LINUX_KERNEL_IMAGE_TARGET_NAME
342 string "Kernel image target name"
343 depends on BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM
345 Specify the kernel make target to build the kernel that you
348 config BR2_LINUX_KERNEL_IMAGE_NAME
349 string "Kernel image name"
350 depends on BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM
352 The filename of the kernel image, if it is different from
353 the make target (above). Defaults to
354 BR2_LINUX_KERNEL_IMAGE_TARGET_NAME. If specified, the
355 filename is relative to arch/ARCH/boot/.
357 If unsure, leave it empty.
359 config BR2_LINUX_KERNEL_UIMAGE_LOADADDR
360 string "load address (for 3.7+ multi-platform image)"
361 depends on BR2_arm || BR2_armeb
362 depends on BR2_LINUX_KERNEL_UIMAGE || BR2_LINUX_KERNEL_APPENDED_UIMAGE
364 If your ARM system's Linux kernel is configured with the new
365 (3.7+) multi-architecture support (CONFIG_ARCH_MULTIPLATFORM=y
366 in your kernel config), then it is necessary to specify a
367 kernel load address when building the uImage. This should be a
368 hexadecimal string beginning with 0x, for example: 0x00008000.
370 If unsure, let this option empty.
372 config BR2_LINUX_KERNEL_DTS_SUPPORT
373 bool "Build a Device Tree Blob (DTB)"
375 Compile one or more device tree sources into device tree
377 Select the dts files to compile in the options below.
379 if BR2_LINUX_KERNEL_DTS_SUPPORT
381 # We have mainly three cases when it comes to device tree support:
382 # 1) We don't want any support at all. Then the ..DTS_SUPPORT
383 # variable won't be set
384 # 2) We want device tree support, so we need the user to enter the
385 # device tree name or the path to the custom device he uses, but
386 # the kernel abstracts this from us and only build an image that
387 # looks like a regular kernel image. In this case, we only need
388 # to derive the kernel image name from the given device tree
389 # name, and all the rest is as usual
390 # 3) We want device tree support, but the kernel requires us to
391 # build the device tree blob separately. In this case, some
392 # more logic will be needed.
393 # The variable below address the second case, were you only want
394 # limited actions from buildroot.
395 config BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT
396 bool "DTB is built by kernel itself"
398 Normally, the device tree(s) to be built have to be passed
399 explicitly to the kernel build system. For some binary
400 formats, however, the kernel build system links in the
401 device tree directly in the kernel binary. Select this option
402 if you have such a kernel binary format.
404 config BR2_LINUX_KERNEL_APPENDED_DTB
407 config BR2_LINUX_KERNEL_INTREE_DTS_NAME
408 string "In-tree Device Tree Source file names"
410 Name of in-tree device tree source file, without
411 the trailing .dts. You can provide a list of
412 dts files to build, separated by spaces.
414 config BR2_LINUX_KERNEL_CUSTOM_DTS_PATH
415 string "Out-of-tree Device Tree Source file paths"
417 Paths to out-of-tree Device Tree Source (.dts) and Device Tree
418 Source Include (.dtsi) files, separated by spaces. These files
419 will be copied to the kernel sources and the .dts files will
420 be compiled from there.
422 config BR2_LINUX_KERNEL_DTB_KEEP_DIRNAME
423 bool "Keep the directory name of the Device Tree"
425 If enabled, the device tree blobs keep their
426 directory prefixes when they get copied to the
427 output image directory or the target directory.
429 config BR2_LINUX_KERNEL_DTB_OVERLAY_SUPPORT
430 bool "Build Device Tree with overlay support"
432 If enabled, pass the "-@" option to dtc, such that
433 symbols are generated in the compiled Device Tree.
434 Choose this option to support Device Tree overlays
435 on the target system.
439 config BR2_LINUX_KERNEL_INSTALL_TARGET
440 bool "Install kernel image to /boot in target"
441 depends on !BR2_TARGET_ROOTFS_INITRAMFS
443 Select this option to have the kernel image installed to
444 /boot in the target root filesystem, as is typically done on
447 Note that this option also installs the Device Tree Blobs to
448 /boot if DTBs have been generated by the kernel build
451 config BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL
452 bool "Needs host OpenSSL"
454 Some Linux kernel configuration options (such as
455 CONFIG_SYSTEM_TRUSTED_KEYRING) require building a host
456 program called extract-cert, which itself needs
457 OpenSSL. Enabling this option will ensure host-openssl gets
458 built before the Linux kernel.
460 Enable this option if you get a Linux kernel build failure
461 such as "scripts/extract-cert.c:21:25: fatal error:
462 openssl/bio.h: No such file or directory".
464 config BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF
465 bool "Needs host libelf"
467 Some Linux kernel configuration options (such as
468 CONFIG_UNWINDER_ORC) require building a host program that
469 needs libelf. Enabling this option will ensure host-elfutils
470 (which provides libelf) gets built before the Linux kernel.
472 Enable this option if you get a Linux kernel build failure
473 such as "Cannot generate ORC metadata for
474 CONFIG_UNWINDER_ORC=y, please install libelf-dev,
475 libelf-devel or elfutils-libelf-devel".
477 config BR2_LINUX_KERNEL_NEEDS_HOST_PAHOLE
478 bool "Needs host pahole"
480 Some Linux kernel configuration options (such as
481 CONFIG_DEBUG_INFO_BTF) require building a host program
482 called pahole. Enabling this option will ensure host-pahole
483 gets built before the Linux kernel.
485 Enable this option if you get a Linux kernel build failure
486 such as "BTF: .tmp_vmlinux.btf: pahole (pahole) is not
490 source "linux/Config.ext.in"
493 source "package/linux-tools/Config.in"
495 endif # BR2_LINUX_KERNEL