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 (5.15)"
33 config BR2_LINUX_KERNEL_LATEST_CIP_VERSION
34 bool "Latest CIP SLTS version (5.10.104-cip3)"
36 CIP launched in the spring of 2016 to address the needs of
37 organizations in industries such as power generation and
38 distribution, water, oil and gas, transportation, building
39 automation and more for reliable and secure Linux-based
40 embedded systems that can be sustained over a period of
41 10 to as many as 60 years.
42 The project's goal is to provide an open source base layer
43 of industrial-grade software that permits the use and
44 implementation of software building blocks that meet
47 The CIP community plans to maintain 5.10 for security and
48 bug fixes for more than 10 years.
50 https://www.cip-project.org
52 config BR2_LINUX_KERNEL_LATEST_CIP_RT_VERSION
53 bool "Latest CIP RT SLTS version (5.10.100-cip2-rt2)"
55 Same as the CIP version, but this is the PREEMPT_RT realtime
58 The CIP community plans to maintain 5.10 for security and
59 bug fixes for more than 10 years.
61 https://www.cip-project.org
63 config BR2_LINUX_KERNEL_CUSTOM_VERSION
66 This option allows to use a specific official version from
67 kernel.org, like 2.6.x, 2.6.x.y, 3.x.y, ...
69 Note: you cannot use this option to select a _longterm_ 2.6
70 kernel, because these kernels are not located at the standard
71 URL at kernel.org. Instead, select "Custom tarball" and
72 specify the right URL directly.
74 config BR2_LINUX_KERNEL_CUSTOM_TARBALL
77 This option allows to specify a URL pointing to a kernel
78 source tarball. This URL can use any protocol recognized by
79 Buildroot, like http://, ftp://, file:// or scp://.
81 When pointing to a local tarball using file://, you may want
82 to use a make variable like $(TOPDIR) to reference the root of
85 config BR2_LINUX_KERNEL_CUSTOM_GIT
86 bool "Custom Git repository"
88 This option allows Buildroot to get the Linux kernel source
89 code from a Git repository.
91 config BR2_LINUX_KERNEL_CUSTOM_HG
92 bool "Custom Mercurial repository"
94 This option allows Buildroot to get the Linux kernel source
95 code from a Mercurial repository.
97 config BR2_LINUX_KERNEL_CUSTOM_SVN
98 bool "Custom Subversion repository"
100 This option allows Buildroot to get the Linux kernel source
101 code from a Subversion repository.
105 config BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE
106 string "Kernel version"
107 depends on BR2_LINUX_KERNEL_CUSTOM_VERSION
109 config BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION
110 string "URL of custom kernel tarball"
111 depends on BR2_LINUX_KERNEL_CUSTOM_TARBALL
113 if BR2_LINUX_KERNEL_CUSTOM_GIT || BR2_LINUX_KERNEL_CUSTOM_HG || BR2_LINUX_KERNEL_CUSTOM_SVN
115 config BR2_LINUX_KERNEL_CUSTOM_REPO_URL
116 string "URL of custom repository"
118 config BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION
119 string "Custom repository version"
121 Revision to use in the typical format used by
122 Git/Mercurial/Subversion E.G. a sha id, a tag, branch, ..
126 config BR2_LINUX_KERNEL_VERSION
128 default "5.15.26" if BR2_LINUX_KERNEL_LATEST_VERSION
129 default "5.10.104-cip3" if BR2_LINUX_KERNEL_LATEST_CIP_VERSION
130 default "5.10.100-cip2-rt2" if BR2_LINUX_KERNEL_LATEST_CIP_RT_VERSION
131 default BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE \
132 if BR2_LINUX_KERNEL_CUSTOM_VERSION
133 default "custom" if BR2_LINUX_KERNEL_CUSTOM_TARBALL
134 default BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION \
135 if BR2_LINUX_KERNEL_CUSTOM_GIT || BR2_LINUX_KERNEL_CUSTOM_HG || BR2_LINUX_KERNEL_CUSTOM_SVN
141 config BR2_LINUX_KERNEL_PATCH
142 string "Custom kernel patches"
144 A space-separated list of patches to apply to the
145 kernel. Each patch can be described as an URL, a local file
146 path, or a directory. In the case of a directory, all files
147 matching *.patch in the directory will be applied.
150 # Configuration selection
154 prompt "Kernel configuration"
155 default BR2_LINUX_KERNEL_USE_DEFCONFIG
157 config BR2_LINUX_KERNEL_USE_DEFCONFIG
158 bool "Using an in-tree defconfig file"
160 config BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG
161 bool "Use the architecture default configuration"
163 This option will use the default configuration for the
164 selected architecture. I.e, it is equivalent to running
165 "make ARCH=<foo> defconfig". This is useful on architectures
166 that have a single defconfig file, such as ARM64.
168 config BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG
169 bool "Using a custom (def)config file"
173 config BR2_LINUX_KERNEL_DEFCONFIG
174 string "Defconfig name"
175 depends on BR2_LINUX_KERNEL_USE_DEFCONFIG
177 Name of the kernel defconfig file to use, without the
178 trailing _defconfig. The defconfig is located in
179 arch/<arch>/configs in the kernel tree.
181 config BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE
182 string "Configuration file path"
183 depends on BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG
185 Path to the kernel configuration file
187 Note: this can be a defconfig file or a complete .config file,
188 which can later be saved back with make
189 linux-update-(def)config.
191 config BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES
192 string "Additional configuration fragment files"
194 A space-separated list of kernel configuration fragment files,
195 that will be merged to the main kernel configuration file.
197 config BR2_LINUX_KERNEL_CUSTOM_LOGO_PATH
198 string "Custom boot logo file path"
200 Use a custom Linux framebuffer boot logo.
201 Custom logo should be in PNG or JPEG format, it will be
202 converted to the linux kernel format (224 colors only)
203 and copied over the original logo file.
210 prompt "Kernel binary format"
211 default BR2_LINUX_KERNEL_ZIMAGE if BR2_arm || BR2_armeb
213 config BR2_LINUX_KERNEL_UIMAGE
215 depends on BR2_arc || BR2_arm || BR2_armeb || \
216 BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || \
217 BR2_sh || BR2_mips || BR2_mipsel || \
218 BR2_mips64 || BR2_mips64el || BR2_xtensa
219 select BR2_PACKAGE_HOST_UBOOT_TOOLS
221 config BR2_LINUX_KERNEL_APPENDED_UIMAGE
222 bool "uImage with appended DT"
223 depends on BR2_arm || BR2_armeb
224 select BR2_LINUX_KERNEL_DTS_SUPPORT
225 select BR2_LINUX_KERNEL_APPENDED_DTB
226 select BR2_PACKAGE_HOST_UBOOT_TOOLS
228 config BR2_LINUX_KERNEL_BZIMAGE
230 depends on BR2_i386 || BR2_x86_64 || BR2_s390x
232 config BR2_LINUX_KERNEL_ZIMAGE
234 depends on BR2_arm || BR2_armeb || BR2_powerpc || \
235 BR2_powerpc64 || BR2_powerpc64le || BR2_sparc || \
238 config BR2_LINUX_KERNEL_ZIMAGE_EPAPR
240 depends on BR2_powerpc64 || BR2_powerpc64le
242 config BR2_LINUX_KERNEL_APPENDED_ZIMAGE
243 bool "zImage with appended DT"
244 depends on BR2_arm || BR2_armeb
245 select BR2_LINUX_KERNEL_DTS_SUPPORT
246 select BR2_LINUX_KERNEL_APPENDED_DTB
248 config BR2_LINUX_KERNEL_CUIMAGE
250 depends on BR2_powerpc
251 select BR2_PACKAGE_HOST_UBOOT_TOOLS
252 select BR2_LINUX_KERNEL_DTS_SUPPORT
253 select BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT
255 config BR2_LINUX_KERNEL_SIMPLEIMAGE
257 depends on BR2_microblaze
258 select BR2_PACKAGE_HOST_UBOOT_TOOLS
259 select BR2_LINUX_KERNEL_DTS_SUPPORT
260 select BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT
262 config BR2_LINUX_KERNEL_IMAGE
264 depends on BR2_aarch64 || BR2_aarch64_be || BR2_riscv
266 config BR2_LINUX_KERNEL_IMAGEGZ
268 depends on BR2_aarch64 || BR2_aarch64_be || BR2_riscv
270 config BR2_LINUX_KERNEL_LINUX_BIN
272 depends on BR2_microblaze
273 select BR2_PACKAGE_HOST_UBOOT_TOOLS
275 config BR2_LINUX_KERNEL_VMLINUX_BIN
277 depends on BR2_mips || BR2_mipsel || BR2_sh
279 config BR2_LINUX_KERNEL_VMLINUX
282 config BR2_LINUX_KERNEL_VMLINUZ
284 depends on BR2_mips || BR2_mipsel
286 config BR2_LINUX_KERNEL_VMLINUZ_BIN
288 depends on BR2_mips || BR2_mipsel
290 config BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM
293 For certain cases a board-specific target image must be
294 used. For example, on powerPC where the OpenFirmware
295 description is attached in a board-specific kernel image
296 target like 'cuImage.mpc8379_rdb'.
298 Select this option and specify the make target in "Kernel
304 # Kernel compression format
308 prompt "Kernel compression format"
310 This selection will just ensure that the correct host tools
311 are built. The actual compression for the kernel should be
312 selected in the kernel configuration menu.
314 config BR2_LINUX_KERNEL_GZIP
315 bool "gzip compression"
317 config BR2_LINUX_KERNEL_LZ4
318 bool "lz4 compression"
320 config BR2_LINUX_KERNEL_LZMA
321 bool "lzma compression"
323 config BR2_LINUX_KERNEL_LZO
324 bool "lzo compression"
326 config BR2_LINUX_KERNEL_XZ
327 bool "xz compression"
329 config BR2_LINUX_KERNEL_ZSTD
330 bool "zstd compression"
332 config BR2_LINUX_KERNEL_UNCOMPRESSED
338 config BR2_LINUX_KERNEL_IMAGE_TARGET_NAME
339 string "Kernel image target name"
340 depends on BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM
342 Specify the kernel make target to build the kernel that you
345 config BR2_LINUX_KERNEL_IMAGE_NAME
346 string "Kernel image name"
347 depends on BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM
349 The filename of the kernel image, if it is different from
350 the make target (above). Defaults to
351 BR2_LINUX_KERNEL_IMAGE_TARGET_NAME. If specified, the
352 filename is relative to arch/ARCH/boot/.
354 If unsure, leave it empty.
356 config BR2_LINUX_KERNEL_UIMAGE_LOADADDR
357 string "load address (for 3.7+ multi-platform image)"
358 depends on BR2_arm || BR2_armeb
359 depends on BR2_LINUX_KERNEL_UIMAGE || BR2_LINUX_KERNEL_APPENDED_UIMAGE
361 If your ARM system's Linux kernel is configured with the new
362 (3.7+) multi-architecture support (CONFIG_ARCH_MULTIPLATFORM=y
363 in your kernel config), then it is necessary to specify a
364 kernel load address when building the uImage. This should be a
365 hexadecimal string beginning with 0x, for example: 0x00008000.
367 If unsure, let this option empty.
369 config BR2_LINUX_KERNEL_DTS_SUPPORT
370 bool "Build a Device Tree Blob (DTB)"
372 Compile one or more device tree sources into device tree
374 Select the dts files to compile in the options below.
376 if BR2_LINUX_KERNEL_DTS_SUPPORT
378 # We have mainly three cases when it comes to device tree support:
379 # 1) We don't want any support at all. Then the ..DTS_SUPPORT
380 # variable won't be set
381 # 2) We want device tree support, so we need the user to enter the
382 # device tree name or the path to the custom device he uses, but
383 # the kernel abstracts this from us and only build an image that
384 # looks like a regular kernel image. In this case, we only need
385 # to derive the kernel image name from the given device tree
386 # name, and all the rest is as usual
387 # 3) We want device tree support, but the kernel requires us to
388 # build the device tree blob separately. In this case, some
389 # more logic will be needed.
390 # The variable below address the second case, were you only want
391 # limited actions from buildroot.
392 config BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT
393 bool "DTB is built by kernel itself"
395 Normally, the device tree(s) to be built have to be passed
396 explicitly to the kernel build system. For some binary
397 formats, however, the kernel build system links in the
398 device tree directly in the kernel binary. Select this option
399 if you have such a kernel binary format.
401 config BR2_LINUX_KERNEL_APPENDED_DTB
404 config BR2_LINUX_KERNEL_INTREE_DTS_NAME
405 string "In-tree Device Tree Source file names"
407 Name of in-tree device tree source file, without
408 the trailing .dts. You can provide a list of
409 dts files to build, separated by spaces.
411 config BR2_LINUX_KERNEL_CUSTOM_DTS_PATH
412 string "Out-of-tree Device Tree Source file paths"
414 Paths to out-of-tree Device Tree Source (.dts) and Device Tree
415 Source Include (.dtsi) files, separated by spaces. These files
416 will be copied to the kernel sources and the .dts files will
417 be compiled from there.
419 config BR2_LINUX_KERNEL_DTB_KEEP_DIRNAME
420 bool "Keep the directory name of the Device Tree"
422 If enabled, the device tree blobs keep their
423 directory prefixes when they get copied to the
424 output image directory or the target directory.
426 config BR2_LINUX_KERNEL_DTB_OVERLAY_SUPPORT
427 bool "Build Device Tree with overlay support"
429 If enabled, pass the "-@" option to dtc, such that
430 symbols are generated in the compiled Device Tree.
431 Choose this option to support Device Tree overlays
432 on the target system.
436 config BR2_LINUX_KERNEL_INSTALL_TARGET
437 bool "Install kernel image to /boot in target"
438 depends on !BR2_TARGET_ROOTFS_INITRAMFS
440 Select this option to have the kernel image installed to
441 /boot in the target root filesystem, as is typically done on
444 Note that this option also installs the Device Tree Blobs to
445 /boot if DTBs have been generated by the kernel build
448 config BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL
449 bool "Needs host OpenSSL"
451 Some Linux kernel configuration options (such as
452 CONFIG_SYSTEM_TRUSTED_KEYRING) require building a host
453 program called extract-cert, which itself needs
454 OpenSSL. Enabling this option will ensure host-openssl gets
455 built before the Linux kernel.
457 Enable this option if you get a Linux kernel build failure
458 such as "scripts/extract-cert.c:21:25: fatal error:
459 openssl/bio.h: No such file or directory".
461 config BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF
462 bool "Needs host libelf"
464 Some Linux kernel configuration options (such as
465 CONFIG_UNWINDER_ORC) require building a host program that
466 needs libelf. Enabling this option will ensure host-elfutils
467 (which provides libelf) gets built before the Linux kernel.
469 Enable this option if you get a Linux kernel build failure
470 such as "Cannot generate ORC metadata for
471 CONFIG_UNWINDER_ORC=y, please install libelf-dev,
472 libelf-devel or elfutils-libelf-devel".
474 config BR2_LINUX_KERNEL_NEEDS_HOST_PAHOLE
475 bool "Needs host pahole"
477 Some Linux kernel configuration options (such as
478 CONFIG_DEBUG_INFO_BTF) require building a host program
479 called pahole. Enabling this option will ensure host-pahole
480 gets built before the Linux kernel.
482 Enable this option if you get a Linux kernel build failure
483 such as "BTF: .tmp_vmlinux.btf: pahole (pahole) is not
487 source "linux/Config.ext.in"
490 source "package/linux-tools/Config.in"
492 endif # BR2_LINUX_KERNEL