[Buildroot] [PATCH] linux-headers: allow use of headers from kernel "package" selected

Peter Korsgaard peter at korsgaard.com
Sun Oct 12 14:48:36 UTC 2014


>>>>> "Alexey" == Alexey Brodkin <alexey.brodkin at gmail.com> writes:

 > From: Karoly Kasza <kaszak at gmail.com>
 > This is a re-work of http://patchwork.ozlabs.org/patch/346823/

 > In buildroot kernel headers used for building toolchain come from upstream
 > kernel sources (even though user may specify version, but not origin).

 > This change makes it possible to use exactly the same sources for both
 > headers during toolchain building and for kernel building itself.

 > Moreover if "kernel" is selected to be built by defaut its sources will
 > be used for kernel headers on toolchain build.

 > That way user might be sure that ABI mismatch won't happen between toolchain
 > and kernel.

 > Signed-off-by: Alexey Brodkin <abrodkin at synopsys.com>
 > Signed-off-by: Karoly Kasza <kaszak at gmail.com>

 > Cc: Peter Korsgaard <peter at korsgaard.com>
 > ---
 >  package/linux-headers/Config.in.host   | 8 ++++++++
 >  package/linux-headers/linux-headers.mk | 7 +++++++
 >  2 files changed, 15 insertions(+)

 > diff --git a/package/linux-headers/Config.in.host b/package/linux-headers/Config.in.host
 > index 101136a..64d4b9e 100644
 > --- a/package/linux-headers/Config.in.host
 > +++ b/package/linux-headers/Config.in.host
 > @@ -5,6 +5,7 @@ comment "Kernel Header Options"
 
 >  choice
 >  	prompt "Kernel Headers"
 > +	default BR2_KERNEL_HEADERS_SAME_AS_KERNEL if BR2_LINUX_KERNEL
 >  	default BR2_KERNEL_HEADERS_3_17
 >  	help
 >  	  Select the version of kernel header files you wish to use.
 > @@ -69,6 +70,13 @@ choice
 
 >  	config BR2_KERNEL_HEADERS_VERSION
 >  		bool "Manually specified Linux version"
 > +
 > +	config BR2_KERNEL_HEADERS_SAME_AS_KERNEL
 > +		bool "Use Linux kernel specified for target"
 > +		depends on BR2_LINUX_KERNEL
 > +		help
 > +		  Use the Linux kernel specified for the target in
 > +		  the Kernel menu.

Thanks, but we also need to have the BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_XX
stuff working, so you need to show the version selection like we do for
BR2_KERNEL_HEADERS_VERSION (but probably with another description).

With that said, is this really helpful when you still need to provide
the kernel version for the _TOOLCHAIN_HEADERS_AT_LEAST_ stuff? The only
reason I can think of is if you have custom kernel which provides some
kind of extra userspace API (headers).

-- 
Peter Korsgaard 


More information about the buildroot mailing list