1menu "Kernel" 2 3config BR2_LINUX_KERNEL 4 bool "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 != "" 7 help 8 Enable this option if you want to build a Linux kernel for 9 your embedded device 10 11if BR2_LINUX_KERNEL 12 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 15# option. 16config BR2_LINUX_NEEDS_MODULES 17 bool 18 19endif # BR2_LINUX_KERNEL 20 21# 22# Version selection. We provide the choice between: 23# 24# 1. A single fairly recent stable kernel version 25# 2. A custom stable version 26# 3. A custom tarball 27# 4. A set of custom repository locations 28# 5. A custom local version 29# 30choice 31 prompt "Kernel version" 32 33config BR2_LINUX_KERNEL_LATEST_VERSION 34 bool "Latest version (6.1)" 35 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_1 if BR2_KERNEL_HEADERS_AS_KERNEL 36 37config BR2_LINUX_KERNEL_LATEST_CIP_VERSION 38 bool "Latest CIP SLTS version (5.10.162-cip24)" 39 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_10 if BR2_KERNEL_HEADERS_AS_KERNEL 40 help 41 CIP launched in the spring of 2016 to address the needs of 42 organizations in industries such as power generation and 43 distribution, water, oil and gas, transportation, building 44 automation and more for reliable and secure Linux-based 45 embedded systems that can be sustained over a period of 46 10 to as many as 60 years. 47 The project's goal is to provide an open source base layer 48 of industrial-grade software that permits the use and 49 implementation of software building blocks that meet 50 these requirements. 51 52 The CIP community plans to maintain 5.10 for security and 53 bug fixes for more than 10 years. 54 55 https://www.cip-project.org 56 57config BR2_LINUX_KERNEL_LATEST_CIP_RT_VERSION 58 bool "Latest CIP RT SLTS version (5.10.162-cip24-rt10)" 59 select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_10 if BR2_KERNEL_HEADERS_AS_KERNEL 60 help 61 Same as the CIP version, but this is the PREEMPT_RT realtime 62 variant. 63 64 The CIP community plans to maintain 5.10 for security and 65 bug fixes for more than 10 years. 66 67 https://www.cip-project.org 68 69config BR2_LINUX_KERNEL_CUSTOM_VERSION 70 bool "Custom version" 71 help 72 This option allows to use a specific official version from 73 kernel.org, like 2.6.x, 2.6.x.y, 3.x.y, ... 74 75 Note: you cannot use this option to select a _longterm_ 2.6 76 kernel, because these kernels are not located at the standard 77 URL at kernel.org. Instead, select "Custom tarball" and 78 specify the right URL directly. 79 80config BR2_LINUX_KERNEL_CUSTOM_TARBALL 81 bool "Custom tarball" 82 help 83 This option allows to specify a URL pointing to a kernel 84 source tarball. This URL can use any protocol recognized by 85 Buildroot, like http://, ftp://, file:// or scp://. 86 87 When pointing to a local tarball using file://, you may want 88 to use a make variable like $(TOPDIR) to reference the root of 89 the Buildroot tree. 90 91config BR2_LINUX_KERNEL_CUSTOM_LOCAL 92 bool "Custom local" 93 help 94 This option allows to specify path of local kernel source. 95 96 You may want to use a make variable like $(TOPDIR) to reference 97 the root of the Buildroot tree. 98 99config BR2_LINUX_KERNEL_CUSTOM_GIT 100 bool "Custom Git repository" 101 help 102 This option allows Buildroot to get the Linux kernel source 103 code from a Git repository. 104 105config BR2_LINUX_KERNEL_CUSTOM_HG 106 bool "Custom Mercurial repository" 107 help 108 This option allows Buildroot to get the Linux kernel source 109 code from a Mercurial repository. 110 111config BR2_LINUX_KERNEL_CUSTOM_SVN 112 bool "Custom Subversion repository" 113 help 114 This option allows Buildroot to get the Linux kernel source 115 code from a Subversion repository. 116 117endchoice 118 119config BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE 120 string "Kernel version" 121 depends on BR2_LINUX_KERNEL_CUSTOM_VERSION 122 123config BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION 124 string "URL of custom kernel tarball" 125 depends on BR2_LINUX_KERNEL_CUSTOM_TARBALL 126 127config BR2_LINUX_KERNEL_CUSTOM_LOCAL_LOCATION 128 string "URL of custom local kernel" 129 depends on BR2_LINUX_KERNEL_CUSTOM_LOCAL 130 131if BR2_LINUX_KERNEL_CUSTOM_GIT || BR2_LINUX_KERNEL_CUSTOM_HG || BR2_LINUX_KERNEL_CUSTOM_SVN 132 133config BR2_LINUX_KERNEL_CUSTOM_REPO_URL 134 string "URL of custom repository" 135 136config BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION 137 string "Custom repository version" 138 help 139 Revision to use in the typical format used by 140 Git/Mercurial/Subversion E.G. a sha id, a tag, branch, .. 141 142endif 143 144config BR2_LINUX_KERNEL_VERSION 145 string 146 default "6.1.14" if BR2_LINUX_KERNEL_LATEST_VERSION 147 default "5.10.162-cip24" if BR2_LINUX_KERNEL_LATEST_CIP_VERSION 148 default "5.10.162-cip24-rt10" if BR2_LINUX_KERNEL_LATEST_CIP_RT_VERSION 149 default BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE \ 150 if BR2_LINUX_KERNEL_CUSTOM_VERSION 151 default "custom" if BR2_LINUX_KERNEL_CUSTOM_TARBALL || BR2_LINUX_KERNEL_CUSTOM_LOCAL 152 default BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION \ 153 if BR2_LINUX_KERNEL_CUSTOM_GIT || BR2_LINUX_KERNEL_CUSTOM_HG || BR2_LINUX_KERNEL_CUSTOM_SVN 154 155# 156# Patch selection 157# 158 159config BR2_LINUX_KERNEL_PATCH 160 string "Custom kernel patches" 161 help 162 A space-separated list of patches to apply to the 163 kernel. Each patch can be described as an URL, a local file 164 path, or a directory. In the case of a directory, all files 165 matching *.patch in the directory will be applied. 166 167if BR2_LINUX_KERNEL 168 169# 170# Configuration selection 171# 172 173choice 174 prompt "Kernel configuration" 175 default BR2_LINUX_KERNEL_USE_DEFCONFIG 176 177config BR2_LINUX_KERNEL_USE_DEFCONFIG 178 bool "Using an in-tree defconfig file" 179 180config BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG 181 bool "Use the architecture default configuration" 182 help 183 This option will use the default configuration for the 184 selected architecture. I.e, it is equivalent to running 185 "make ARCH=<foo> defconfig". This is useful on architectures 186 that have a single defconfig file, such as ARM64. 187 188config BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG 189 bool "Using a custom (def)config file" 190 191endchoice 192 193config BR2_LINUX_KERNEL_DEFCONFIG 194 string "Defconfig name" 195 depends on BR2_LINUX_KERNEL_USE_DEFCONFIG 196 help 197 Name of the kernel defconfig file to use, without the 198 trailing _defconfig. The defconfig is located in 199 arch/<arch>/configs in the kernel tree. 200 201config BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE 202 string "Configuration file path" 203 depends on BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG 204 help 205 Path to the kernel configuration file 206 207 Note: this can be a defconfig file or a complete .config file, 208 which can later be saved back with make 209 linux-update-(def)config. 210 211config BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES 212 string "Additional configuration fragment files" 213 help 214 A space-separated list of kernel configuration fragment files, 215 that will be merged to the main kernel configuration file. 216 217config BR2_LINUX_KERNEL_CUSTOM_LOGO_PATH 218 string "Custom boot logo file path" 219 help 220 Use a custom Linux framebuffer boot logo. 221 Custom logo should be in PNG or JPEG format, it will be 222 converted to the linux kernel format (224 colors only) 223 and copied over the original logo file. 224 225# 226# Binary format 227# 228 229choice 230 prompt "Kernel binary format" 231 default BR2_LINUX_KERNEL_ZIMAGE if BR2_arm || BR2_armeb 232 233config BR2_LINUX_KERNEL_UIMAGE 234 bool "uImage" 235 depends on BR2_arc || BR2_arm || BR2_armeb || \ 236 BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || \ 237 BR2_sh || BR2_mips || BR2_mipsel || \ 238 BR2_mips64 || BR2_mips64el || BR2_xtensa 239 select BR2_PACKAGE_HOST_UBOOT_TOOLS 240 241config BR2_LINUX_KERNEL_APPENDED_UIMAGE 242 bool "uImage with appended DT" 243 depends on BR2_arm || BR2_armeb 244 select BR2_LINUX_KERNEL_DTS_SUPPORT 245 select BR2_LINUX_KERNEL_APPENDED_DTB 246 select BR2_PACKAGE_HOST_UBOOT_TOOLS 247 248config BR2_LINUX_KERNEL_BZIMAGE 249 bool "bzImage" 250 depends on BR2_i386 || BR2_x86_64 || BR2_s390x 251 252config BR2_LINUX_KERNEL_ZIMAGE 253 bool "zImage" 254 depends on BR2_arm || BR2_armeb || BR2_powerpc || \ 255 BR2_powerpc64 || BR2_powerpc64le || BR2_sparc || \ 256 BR2_sh || BR2_xtensa 257 258config BR2_LINUX_KERNEL_ZIMAGE_EPAPR 259 bool "zImage.epapr" 260 depends on BR2_powerpc64 || BR2_powerpc64le 261 262config BR2_LINUX_KERNEL_APPENDED_ZIMAGE 263 bool "zImage with appended DT" 264 depends on BR2_arm || BR2_armeb 265 select BR2_LINUX_KERNEL_DTS_SUPPORT 266 select BR2_LINUX_KERNEL_APPENDED_DTB 267 268config BR2_LINUX_KERNEL_CUIMAGE 269 bool "cuImage" 270 depends on BR2_powerpc 271 select BR2_PACKAGE_HOST_UBOOT_TOOLS 272 select BR2_LINUX_KERNEL_DTS_SUPPORT 273 select BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT 274 275config BR2_LINUX_KERNEL_SIMPLEIMAGE 276 bool "simpleImage" 277 depends on BR2_microblaze 278 select BR2_PACKAGE_HOST_UBOOT_TOOLS 279 select BR2_LINUX_KERNEL_DTS_SUPPORT 280 select BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT 281 282config BR2_LINUX_KERNEL_IMAGE 283 bool "Image" 284 depends on BR2_aarch64 || BR2_aarch64_be || BR2_riscv 285 286config BR2_LINUX_KERNEL_IMAGEGZ 287 bool "Image.gz" 288 depends on BR2_aarch64 || BR2_aarch64_be || BR2_riscv 289 290config BR2_LINUX_KERNEL_LINUX_BIN 291 bool "linux.bin" 292 depends on BR2_microblaze 293 select BR2_PACKAGE_HOST_UBOOT_TOOLS 294 295config BR2_LINUX_KERNEL_VMLINUX_BIN 296 bool "vmlinux.bin" 297 depends on BR2_mips || BR2_mipsel || BR2_sh 298 299config BR2_LINUX_KERNEL_VMLINUX 300 bool "vmlinux" 301 302config BR2_LINUX_KERNEL_VMLINUZ 303 bool "vmlinuz" 304 depends on BR2_mips || BR2_mipsel 305 306config BR2_LINUX_KERNEL_VMLINUZ_BIN 307 bool "vmlinuz.bin" 308 depends on BR2_mips || BR2_mipsel 309 310config BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM 311 bool "custom target" 312 help 313 For certain cases a board-specific target image must be 314 used. For example, on powerPC where the OpenFirmware 315 description is attached in a board-specific kernel image 316 target like 'cuImage.mpc8379_rdb'. 317 318 Select this option and specify the make target in "Kernel 319 image target name". 320 321endchoice 322 323# 324# Kernel compression format 325# 326 327choice 328 prompt "Kernel compression format" 329 help 330 This selection will just ensure that the correct host tools 331 are built. The actual compression for the kernel should be 332 selected in the kernel configuration menu. 333 334config BR2_LINUX_KERNEL_GZIP 335 bool "gzip compression" 336 337config BR2_LINUX_KERNEL_LZ4 338 bool "lz4 compression" 339 340config BR2_LINUX_KERNEL_LZMA 341 bool "lzma compression" 342 343config BR2_LINUX_KERNEL_LZO 344 bool "lzo compression" 345 346config BR2_LINUX_KERNEL_XZ 347 bool "xz compression" 348 349config BR2_LINUX_KERNEL_ZSTD 350 bool "zstd compression" 351 352config BR2_LINUX_KERNEL_UNCOMPRESSED 353 bool "uncompressed" 354 depends on BR2_s390x 355 356endchoice 357 358config BR2_LINUX_KERNEL_IMAGE_TARGET_NAME 359 string "Kernel image target name" 360 depends on BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM 361 help 362 Specify the kernel make target to build the kernel that you 363 need. 364 365config BR2_LINUX_KERNEL_IMAGE_NAME 366 string "Kernel image name" 367 depends on BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM 368 help 369 The filename of the kernel image, if it is different from 370 the make target (above). Defaults to 371 BR2_LINUX_KERNEL_IMAGE_TARGET_NAME. If specified, the 372 filename is relative to arch/ARCH/boot/. 373 374 If unsure, leave it empty. 375 376config BR2_LINUX_KERNEL_UIMAGE_LOADADDR 377 string "load address (for 3.7+ multi-platform image)" 378 depends on BR2_arm || BR2_armeb 379 depends on BR2_LINUX_KERNEL_UIMAGE || BR2_LINUX_KERNEL_APPENDED_UIMAGE 380 help 381 If your ARM system's Linux kernel is configured with the new 382 (3.7+) multi-architecture support (CONFIG_ARCH_MULTIPLATFORM=y 383 in your kernel config), then it is necessary to specify a 384 kernel load address when building the uImage. This should be a 385 hexadecimal string beginning with 0x, for example: 0x00008000. 386 387 If unsure, let this option empty. 388 389config BR2_LINUX_KERNEL_DTS_SUPPORT 390 bool "Build a Device Tree Blob (DTB)" 391 help 392 Compile one or more device tree sources into device tree 393 blobs. 394 Select the dts files to compile in the options below. 395 396if BR2_LINUX_KERNEL_DTS_SUPPORT 397 398# We have mainly three cases when it comes to device tree support: 399# 1) We don't want any support at all. Then the ..DTS_SUPPORT 400# variable won't be set 401# 2) We want device tree support, so we need the user to enter the 402# device tree name or the path to the custom device he uses, but 403# the kernel abstracts this from us and only build an image that 404# looks like a regular kernel image. In this case, we only need 405# to derive the kernel image name from the given device tree 406# name, and all the rest is as usual 407# 3) We want device tree support, but the kernel requires us to 408# build the device tree blob separately. In this case, some 409# more logic will be needed. 410# The variable below address the second case, were you only want 411# limited actions from buildroot. 412config BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT 413 bool "DTB is built by kernel itself" 414 help 415 Normally, the device tree(s) to be built have to be passed 416 explicitly to the kernel build system. For some binary 417 formats, however, the kernel build system links in the 418 device tree directly in the kernel binary. Select this option 419 if you have such a kernel binary format. 420 421config BR2_LINUX_KERNEL_APPENDED_DTB 422 bool 423 424config BR2_LINUX_KERNEL_INTREE_DTS_NAME 425 string "In-tree Device Tree Source file names" 426 help 427 Name of in-tree device tree source file, without 428 the trailing .dts. You can provide a list of 429 dts files to build, separated by spaces. 430 431config BR2_LINUX_KERNEL_CUSTOM_DTS_PATH 432 string "Out-of-tree Device Tree Source file paths" 433 help 434 Paths to out-of-tree Device Tree Source (.dts) and Device Tree 435 Source Include (.dtsi) files, separated by spaces. These files 436 will be copied to the kernel sources and the .dts files will 437 be compiled from there. 438 439config BR2_LINUX_KERNEL_DTB_KEEP_DIRNAME 440 bool "Keep the directory name of the Device Tree" 441 help 442 If enabled, the device tree blobs keep their 443 directory prefixes when they get copied to the 444 output image directory or the target directory. 445 446config BR2_LINUX_KERNEL_DTB_OVERLAY_SUPPORT 447 bool "Build Device Tree with overlay support" 448 help 449 If enabled, pass the "-@" option to dtc, such that 450 symbols are generated in the compiled Device Tree. 451 Choose this option to support Device Tree overlays 452 on the target system. 453 454endif 455 456config BR2_LINUX_KERNEL_INSTALL_TARGET 457 bool "Install kernel image to /boot in target" 458 depends on !BR2_TARGET_ROOTFS_INITRAMFS 459 help 460 Select this option to have the kernel image installed to 461 /boot in the target root filesystem, as is typically done on 462 x86/x86_64 systems. 463 464 Note that this option also installs the Device Tree Blobs to 465 /boot if DTBs have been generated by the kernel build 466 process. 467 468config BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL 469 bool "Needs host OpenSSL" 470 help 471 Some Linux kernel configuration options (such as 472 CONFIG_SYSTEM_TRUSTED_KEYRING) require building a host 473 program called extract-cert, which itself needs 474 OpenSSL. Enabling this option will ensure host-openssl gets 475 built before the Linux kernel. 476 477 Enable this option if you get a Linux kernel build failure 478 such as "scripts/extract-cert.c:21:25: fatal error: 479 openssl/bio.h: No such file or directory". 480 481config BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF 482 bool "Needs host libelf" 483 help 484 Some Linux kernel configuration options (such as 485 CONFIG_UNWINDER_ORC) require building a host program that 486 needs libelf. Enabling this option will ensure host-elfutils 487 (which provides libelf) gets built before the Linux kernel. 488 489 Enable this option if you get a Linux kernel build failure 490 such as "Cannot generate ORC metadata for 491 CONFIG_UNWINDER_ORC=y, please install libelf-dev, 492 libelf-devel or elfutils-libelf-devel". 493 494config BR2_LINUX_KERNEL_NEEDS_HOST_PAHOLE 495 bool "Needs host pahole" 496 help 497 Some Linux kernel configuration options (such as 498 CONFIG_DEBUG_INFO_BTF) require building a host program 499 called pahole. Enabling this option will ensure host-pahole 500 gets built before the Linux kernel. 501 502 Enable this option if you get a Linux kernel build failure 503 such as "BTF: .tmp_vmlinux.btf: pahole (pahole) is not 504 available". 505 506# Linux extensions 507source "linux/Config.ext.in" 508 509endif # BR2_LINUX_KERNEL 510 511# Linux tools 512source "package/linux-tools/Config.in" 513 514endmenu 515