package/linux-headers: add help text for manual header selection
PATCH v2 1/3 package/linux-headers: add help text for manual header selection
Add kconfig help text that explains how to manually specify an official Linux version to use for the kernel headers.
--- package/linux-headers/Config.in.host | 8 ++++++++ 1 file changed, 8 insertions(+)
package/linux-headers/Config.in.host +8 -0
@@ -77,6 +77,14 @@ config BR2_KERNEL_HEADERS_4_17 config BR2_KERNEL_HEADERS_VERSION bool "Manually specified Linux version" + help + This option allows you to use a specific official version from + kernel.org, like 2.6.x, 2.6.x.y, 3.x.y, ... + + Note: you cannot use this option to select a _longterm_ 2.6 + kernel, because these kernels are not located at the standard + URL at kernel.org. Instead, select "Custom tarball" and + specify the right URL directly. endchoice
Signature · 1 line
2.17.1
PATCH v2 2/3 linux: add hash file
Added a hash file for the Linux kernel. Hashes have been copied from the appropriate sha256sums.asc files on kernel.org. The Linux hash file is also shared with the linux-headers package via a symbolic link.
---
Changes v1 -> v2:
- use sha256 hashes from kernel.org instead of calculating values locally (Baruch)
--- linux/linux.hash | 14 ++++++++++++++ package/linux-headers/linux-headers.hash | 1 + 2 files changed, 15 insertions(+) create mode 100644 linux/linux.hash create mode 120000 package/linux-headers/linux-headers.hash
linux/linux.hash new file +14 -0
@@ -0,0 +1,14 @@ +# From https://www.kernel.org/pub/linux/kernel/v4.x/sha256sums.asc +sha256 4d8b5e3772771b60c9c6d875af8e59fbcd34d4291827c110501611da09b79b0f linux-4.17.18.tar.xz +sha256 41026d713ba4f7a5e9d514b876ce4ed28a1d993c0c58b42b2a2597d6a0e83021 linux-4.16.18.tar.xz +sha256 3f89cd717e0d497ba4818e145a33002f4c15032e355c1ad6d3d7f31f122caf41 linux-4.15.18.tar.xz +sha256 a38061ca4c864d11a72beb3dc5918a99f13372fe9ee35508d004fdfabd460413 linux-4.14.66.tar.xz +sha256 b025f3fc40801aff1a2d3438d50be56502eb5bf51a7094e85b5205fa71bec731 linux-4.13.16.tar.xz +sha256 86ab3f45b1aff5f8a9ec72c232bccf5a314edb2a09fb8664c5902b03edacfd27 linux-4.12.14.tar.xz +sha256 2e37d4e18094f66b8bd632cac0a3c08a39a14a1ada4a1c78a5e336c4d3036192 linux-4.11.12.tar.xz +sha256 1ae7056b5b6a3fb653b065503afeb514afc870e103b0f857d0d13a6d06fd66ee linux-4.10.17.tar.xz +sha256 8d12ceab9f8cbfd0555c881b35ed4384cf3ea8e223d894c030b04786005e5071 linux-4.9.123.tar.xz +sha256 5fea8c318626de61e99869eb6dde77e8af2419c5cf6f346280da4be1ab8089e8 linux-4.4.151.tar.xz +sha256 6ad9389e55e0ea57768eae173747058a4487fa3630e10a7999cfec9f945e559c linux-4.1.52.tar.xz +# From https://www.kernel.org/pub/linux/kernel/v3.x/sha256sums.asc +sha256 ad96d797571496c969aa71bf5d08e9d2a8c84458090d29a120f1b2981185a99e linux-3.2.102.tar.xz
package/linux-headers/linux-headers.hash new file +1 -0
@@ -0,0 +1 @@ +../../linux/linux.hash
Signature · 1 line
2.17.1
PATCH v2 3/3 package/linux-headers: add support for custom headers
In reply to Mark CorbinAdd support for building toolchains against custom headers. Allows the selection of a manual version, custom tarball or custom git repository for the kernel headers. This enables toolchains to be built against custom kernel headers without having to build a full kernel.
This is particularly useful for new architectures, such as RISC-V where updated kernel headers may not have made it into the mainline kernel yet.
--- package/linux-headers/Config.in.host | 40 ++++++++++- package/linux-headers/linux-headers.mk | 94 +++++++++++++++----------- 2 files changed, 93 insertions(+), 41 deletions(-)
package/linux-headers/Config.in.host +39 -1
@@ -86,6 +86,23 @@ config BR2_KERNEL_HEADERS_VERSION URL at kernel.org. Instead, select "Custom tarball" and specify the right URL directly. +config BR2_KERNEL_HEADERS_CUSTOM_TARBALL + bool "Custom tarball" + help + This option allows you to specify a URL pointing to a kernel + source tarball. This URL can use any protocol recognized by + Buildroot, like http://, ftp://, file:// or scp://. + + When pointing to a local tarball using file://, you may want + to use a make variable like $(TOPDIR) to reference the root of + the Buildroot tree. + +config BR2_KERNEL_HEADERS_CUSTOM_GIT + bool "Custom Git repository" + help + This option allows Buildroot to get the Linux kernel source + code from a Git repository. + endchoice config BR2_DEFAULT_KERNEL_VERSION
@@ -95,9 +112,27 @@ config BR2_DEFAULT_KERNEL_VERSION Specify the version you want to use. E.G.: 3.6.10 +config BR2_KERNEL_HEADERS_CUSTOM_TARBALL_LOCATION + string "URL of custom kernel tarball" + depends on BR2_KERNEL_HEADERS_CUSTOM_TARBALL + +if BR2_KERNEL_HEADERS_CUSTOM_GIT + +config BR2_KERNEL_HEADERS_CUSTOM_REPO_URL + string "URL of custom repository" + +config BR2_KERNEL_HEADERS_CUSTOM_REPO_VERSION + string "Custom repository version" + help + Revision to use in the typical format used by + Git/Mercurial/Subversion E.G. a sha id, a tag, branch, .. + +endif + choice bool "Custom kernel headers series" - depends on BR2_KERNEL_HEADERS_VERSION || BR2_KERNEL_HEADERS_AS_KERNEL + depends on BR2_KERNEL_HEADERS_VERSION || BR2_KERNEL_HEADERS_AS_KERNEL || \ + BR2_KERNEL_HEADERS_CUSTOM_TARBALL || BR2_KERNEL_HEADERS_CUSTOM_GIT help Specify the kernel headers series you manually selected, above.
@@ -277,3 +312,6 @@ config BR2_DEFAULT_KERNEL_HEADERS default "4.16.18" if BR2_KERNEL_HEADERS_4_16 default "4.17.18" if BR2_KERNEL_HEADERS_4_17 default BR2_DEFAULT_KERNEL_VERSION if BR2_KERNEL_HEADERS_VERSION + default "custom" if BR2_KERNEL_HEADERS_CUSTOM_TARBALL + default BR2_KERNEL_HEADERS_CUSTOM_REPO_VERSION \ + if BR2_KERNEL_HEADERS_CUSTOM_GIT
package/linux-headers/linux-headers.mk +54 -40
136 lines not on this page · raw message
Signature · 1 line
2.17.1
Thomas Petazzoni
AppliedPATCH v2 1/3 package/linux-headers: add help text for manual header selection
In reply to Mark CorbinHello,
Quoted 7 lines · Mark Corbin
Add kconfig help text that explains how to manually specify an official Linux version to use for the kernel headers.
Signed-off-by Mark Corbin <[email protected]>--- package/linux-headers/Config.in.host | 8 ++++++++ 1 file changed, 8 insertions(+)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com