3 config BR2_LINUX_KERNEL
6 Enable this option if you want to build a Linux kernel for
11 # https://sourceware.org/bugzilla/show_bug.cgi?id=21458
12 comment "Linux kernel in thumb mode may be broken with binutils 2.30"
13 depends on BR2_arm || BR2_armeb
14 depends on BR2_BINUTILS_VERSION_2_30_X
16 # Packages that need to have a kernel with support for loadable modules,
17 # but do not use the kernel-modules infrastructure, should select that
19 config BR2_LINUX_NEEDS_MODULES
23 # Version selection. We provide the choice between:
25 # 1. A single fairly recent stable kernel version
26 # 2. A custom stable version
28 # 4. A set of custom repository locations
31 prompt "Kernel version"
33 config BR2_LINUX_KERNEL_LATEST_VERSION
34 bool "Latest version (5.0)"
36 config BR2_LINUX_KERNEL_LATEST_CIP_VERSION
37 bool "Latest CIP SLTS version (v4.19.13-cip1)"
39 CIP launched in the spring of 2016 to address the needs of
40 organizations in industries such as power generation and
41 distribution, water, oil and gas, transportation, building
42 automation and more for reliable and secure Linux-based
43 embedded systems that can be sustained over a period of
44 10 to as many as 60 years.
45 The project's goal is to provide an open source base layer
46 of industrial-grade software that permits the use and
47 implementation of software building blocks that meet
50 The CIP community plans to maintain 4.4 for security and
51 bug fixes for more than 10 years.
53 https://www.cip-project.org
55 config BR2_LINUX_KERNEL_CUSTOM_VERSION
58 This option allows to use a specific official version from
59 kernel.org, like 2.6.x, 2.6.x.y, 3.x.y, ...
61 Note: you cannot use this option to select a _longterm_ 2.6
62 kernel, because these kernels are not located at the standard
63 URL at kernel.org. Instead, select "Custom tarball" and
64 specify the right URL directly.
66 config BR2_LINUX_KERNEL_CUSTOM_TARBALL
69 This option allows to specify a URL pointing to a kernel
70 source tarball. This URL can use any protocol recognized by
71 Buildroot, like http://, ftp://, file:// or scp://.
73 When pointing to a local tarball using file://, you may want
74 to use a make variable like $(TOPDIR) to reference the root of
77 config BR2_LINUX_KERNEL_CUSTOM_GIT
78 bool "Custom Git repository"
80 This option allows Buildroot to get the Linux kernel source
81 code from a Git repository.
83 config BR2_LINUX_KERNEL_CUSTOM_HG
84 bool "Custom Mercurial repository"
86 This option allows Buildroot to get the Linux kernel source
87 code from a Mercurial repository.
89 config BR2_LINUX_KERNEL_CUSTOM_SVN
90 bool "Custom Subversion repository"
92 This option allows Buildroot to get the Linux kernel source
93 code from a Subversion repository.
97 config BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE
98 string "Kernel version"
99 depends on BR2_LINUX_KERNEL_CUSTOM_VERSION
101 config BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION
102 string "URL of custom kernel tarball"
103 depends on BR2_LINUX_KERNEL_CUSTOM_TARBALL
105 if BR2_LINUX_KERNEL_CUSTOM_GIT || BR2_LINUX_KERNEL_CUSTOM_HG || BR2_LINUX_KERNEL_CUSTOM_SVN
107 config BR2_LINUX_KERNEL_CUSTOM_REPO_URL
108 string "URL of custom repository"
109 default BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL \
110 if BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL != "" # legacy
112 config BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION
113 string "Custom repository version"
114 default BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION \
115 if BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION != "" # legacy
117 Revision to use in the typical format used by
118 Git/Mercurial/Subversion E.G. a sha id, a tag, branch, ..
122 config BR2_LINUX_KERNEL_VERSION
124 default "5.0.10" if BR2_LINUX_KERNEL_LATEST_VERSION
125 default "v4.19.13-cip1" if BR2_LINUX_KERNEL_LATEST_CIP_VERSION
126 default BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE \
127 if BR2_LINUX_KERNEL_CUSTOM_VERSION
128 default "custom" if BR2_LINUX_KERNEL_CUSTOM_TARBALL
129 default BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION \
130 if BR2_LINUX_KERNEL_CUSTOM_GIT || BR2_LINUX_KERNEL_CUSTOM_HG || BR2_LINUX_KERNEL_CUSTOM_SVN
136 config BR2_LINUX_KERNEL_PATCH
137 string "Custom kernel patches"
139 A space-separated list of patches to apply to the
140 kernel. Each patch can be described as an URL, a local file
141 path, or a directory. In the case of a directory, all files
142 matching *.patch in the directory will be applied.
145 # Configuration selection
149 prompt "Kernel configuration"
150 default BR2_LINUX_KERNEL_USE_DEFCONFIG
152 config BR2_LINUX_KERNEL_USE_DEFCONFIG
153 bool "Using an in-tree defconfig file"
155 config BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG
156 bool "Use the architecture default configuration"
158 This option will use the default configuration for the
159 selected architecture. I.e, it is equivalent to running
160 "make ARCH=<foo> defconfig". This is useful on architectures
161 that have a single defconfig file, such as ARM64.
163 config BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG
164 bool "Using a custom (def)config file"
168 config BR2_LINUX_KERNEL_DEFCONFIG
169 string "Defconfig name"
170 depends on BR2_LINUX_KERNEL_USE_DEFCONFIG
172 Name of the kernel defconfig file to use, without the
173 trailing _defconfig. The defconfig is located in
174 arch/<arch>/configs in the kernel tree.
176 config BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE
177 string "Configuration file path"
178 depends on BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG
180 Path to the kernel configuration file
182 Note: this can be a defconfig file or a complete .config file,
183 which can later be saved back with make
184 linux-update-(def)config.
186 config BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES
187 string "Additional configuration fragment files"
189 A space-separated list of kernel configuration fragment files,
190 that will be merged to the main kernel configuration file.
192 config BR2_LINUX_KERNEL_CUSTOM_LOGO_PATH
193 string "Custom boot logo file path"
195 Use a custom Linux framebuffer boot logo.
196 Custom logo should be in PNG or JPEG format, it will be
197 converted to the linux kernel format (224 colors only)
198 and copied over the original logo file.
205 prompt "Kernel binary format"
206 default BR2_LINUX_KERNEL_ZIMAGE if BR2_arm || BR2_armeb
208 config BR2_LINUX_KERNEL_UIMAGE
210 depends on BR2_arc || BR2_arm || BR2_armeb || \
211 BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || \
212 BR2_sh || BR2_mips || BR2_mipsel || \
213 BR2_mips64 || BR2_mips64el || BR2_xtensa
214 select BR2_PACKAGE_HOST_UBOOT_TOOLS
216 config BR2_LINUX_KERNEL_APPENDED_UIMAGE
217 bool "uImage with appended DT"
218 depends on BR2_arm || BR2_armeb
219 select BR2_LINUX_KERNEL_DTS_SUPPORT
220 select BR2_LINUX_KERNEL_APPENDED_DTB
221 select BR2_PACKAGE_HOST_UBOOT_TOOLS
223 config BR2_LINUX_KERNEL_BZIMAGE
225 depends on BR2_i386 || BR2_x86_64
227 config BR2_LINUX_KERNEL_ZIMAGE
229 depends on BR2_arm || BR2_armeb || BR2_powerpc || \
230 BR2_powerpc64 || BR2_powerpc64le || BR2_sparc || \
233 config BR2_LINUX_KERNEL_ZIMAGE_EPAPR
235 depends on BR2_powerpc64 || BR2_powerpc64le
237 config BR2_LINUX_KERNEL_APPENDED_ZIMAGE
238 bool "zImage with appended DT"
239 depends on BR2_arm || BR2_armeb
240 select BR2_LINUX_KERNEL_DTS_SUPPORT
241 select BR2_LINUX_KERNEL_APPENDED_DTB
243 config BR2_LINUX_KERNEL_CUIMAGE
245 depends on BR2_powerpc
246 select BR2_PACKAGE_HOST_UBOOT_TOOLS
247 select BR2_LINUX_KERNEL_DTS_SUPPORT
248 select BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT
250 config BR2_LINUX_KERNEL_SIMPLEIMAGE
252 depends on BR2_microblaze
253 select BR2_PACKAGE_HOST_UBOOT_TOOLS
254 select BR2_LINUX_KERNEL_DTS_SUPPORT
255 select BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT
257 config BR2_LINUX_KERNEL_IMAGE
259 depends on BR2_aarch64 || BR2_riscv
261 config BR2_LINUX_KERNEL_LINUX_BIN
263 depends on BR2_microblaze
264 select BR2_PACKAGE_HOST_UBOOT_TOOLS
266 config BR2_LINUX_KERNEL_VMLINUX_BIN
268 depends on BR2_mips || BR2_mipsel || BR2_sh
270 config BR2_LINUX_KERNEL_VMLINUX
273 config BR2_LINUX_KERNEL_VMLINUZ
275 depends on BR2_mips || BR2_mipsel
277 config BR2_LINUX_KERNEL_VMLINUZ_BIN
279 depends on BR2_mips || BR2_mipsel
281 config BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM
284 For certain cases a board-specific target image must be
285 used. For example, on powerPC where the OpenFirmware
286 description is attached in a board-specific kernel image
287 target like 'cuImage.mpc8379_rdb'.
289 Select this option and specify the make target in "Kernel
295 # Kernel compression format
299 prompt "Kernel compression format"
301 This selection will just ensure that the correct host tools
302 are built. The actual compression for the kernel should be
303 selected in the kernel configuration menu.
305 config BR2_LINUX_KERNEL_GZIP
306 bool "gzip compression"
308 config BR2_LINUX_KERNEL_LZ4
309 bool "lz4 compression"
311 config BR2_LINUX_KERNEL_LZMA
312 bool "lzma compression"
314 config BR2_LINUX_KERNEL_LZO
315 bool "lzo compression"
317 config BR2_LINUX_KERNEL_XZ
318 bool "xz compression"
322 config BR2_LINUX_KERNEL_IMAGE_TARGET_NAME
323 string "Kernel image target name"
324 depends on BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM
326 Specify the kernel make target to build the kernel that you
329 config BR2_LINUX_KERNEL_IMAGE_NAME
330 string "Kernel image name"
331 depends on BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM
333 The filename of the kernel image, if it is different from the
334 make target (above). Only Xtensa uses a filename different
335 from the make target. Defaults to
336 BR2_LINUX_KERNEL_IMAGE_TARGET_NAME.
338 If unsure, leave it empty.
340 config BR2_LINUX_KERNEL_UIMAGE_LOADADDR
341 string "load address (for 3.7+ multi-platform image)"
342 depends on BR2_arm || BR2_armeb
343 depends on BR2_LINUX_KERNEL_UIMAGE || BR2_LINUX_KERNEL_APPENDED_UIMAGE
345 If your ARM system's Linux kernel is configured with the new
346 (3.7+) multi-architecture support (CONFIG_ARCH_MULTIPLATFORM=y
347 in your kernel config), then it is necessary to specify a
348 kernel load address when building the uImage. This should be a
349 hexadecimal string beginning with 0x, for example: 0x00008000.
351 If unsure, let this option empty.
353 config BR2_LINUX_KERNEL_DTS_SUPPORT
354 bool "Build a Device Tree Blob (DTB)"
356 Compile one or more device tree sources into device tree
358 Select the dts files to compile in the options below.
360 if BR2_LINUX_KERNEL_DTS_SUPPORT
362 # We have mainly three cases when it comes to device tree support:
363 # 1) We don't want any support at all. Then the ..DTS_SUPPORT
364 # variable won't be set
365 # 2) We want device tree support, so we need the user to enter the
366 # device tree name or the path to the custom device he uses, but
367 # the kernel abstracts this from us and only build an image that
368 # looks like a regular kernel image. In this case, we only need
369 # to derive the kernel image name from the given device tree
370 # name, and all the rest is as usual
371 # 3) We want device tree support, but the kernel requires us to
372 # build the device tree blob separately. In this case, some
373 # more logic will be needed.
374 # The variable below address the second case, were you only want
375 # limited actions from buildroot.
376 config BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT
379 config BR2_LINUX_KERNEL_APPENDED_DTB
382 config BR2_LINUX_KERNEL_INTREE_DTS_NAME
383 string "In-tree Device Tree Source file names"
385 Name of in-tree device tree source file, without
386 the trailing .dts. You can provide a list of
387 dts files to build, separated by spaces.
389 config BR2_LINUX_KERNEL_CUSTOM_DTS_PATH
390 string "Out-of-tree Device Tree Source file paths"
392 Path to to out-of-tree device tree source files.
393 You can provide a list of dts paths to copy and
394 build, separated by spaces.
396 config BR2_LINUX_KERNEL_DTB_OVERLAY_SUPPORT
397 bool "Build Device Tree with overlay support"
399 If enabled, pass the "-@" option to dtc, such that
400 symbols are generated in the compiled Device Tree.
401 Choose this option to support Device Tree overlays
402 on the target system.
406 config BR2_LINUX_KERNEL_INSTALL_TARGET
407 bool "Install kernel image to /boot in target"
408 depends on !BR2_TARGET_ROOTFS_INITRAMFS
410 Select this option to have the kernel image installed to
411 /boot in the target root filesystem, as is typically done on
414 Note that this option also installs the Device Tree Blobs to
415 /boot if DTBs have been generated by the kernel build
418 config BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL
419 bool "Needs host OpenSSL"
421 Some Linux kernel configuration options (such as
422 CONFIG_SYSTEM_TRUSTED_KEYRING) require building a host
423 program called extract-cert, which itself needs
424 OpenSSL. Enabling this option will ensure host-openssl gets
425 built before the Linux kernel.
427 Enable this option if you get a Linux kernel build failure
428 such as "scripts/extract-cert.c:21:25: fatal error:
429 openssl/bio.h: No such file or directory".
431 config BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF
432 bool "Needs host libelf"
434 Some Linux kernel configuration options (such as
435 CONFIG_UNWINDER_ORC) require building a host program that
436 needs libelf. Enabling this option will ensure host-elfutils
437 (which provides libelf) gets built before the Linux kernel.
439 Enable this option if you get a Linux kernel build failure
440 such as "Cannot generate ORC metadata for
441 CONFIG_UNWINDER_ORC=y, please install libelf-dev,
442 libelf-devel or elfutils-libelf-devel".
445 source "linux/Config.ext.in"
448 source "package/linux-tools/Config.in"
450 endif # BR2_LINUX_KERNEL