[Buildroot] [PATCH v4] linux-headers: allow use of headers from kernel "package" selected
Peter Korsgaard
peter at korsgaard.com
Tue Jan 19 10:29:08 UTC 2016
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni at free-electrons.com> writes:
Hi,
>> So perhaps we need an option to use the linux source for our kernel
>> headers? It does mean that people need to jump back and forth between
>> the toolchain and linux menus.
> Adding the option is not the problem. The problem is that from
> package/linux-headers/linux-headers.mk, you can't use variables defined
> from linux/linux.mk. So all you can do in
> package/linux-headers/linux-headers.mk is duplicate the logic from
> linux/linux.mk that will calculate LINUX_HEADERS_{VERSION,SITE,SOURCE}
> and apply the custom patches from the BR2_LINUX_KERNEL_* Config.in
> values.
Well, linux-headers doesn't need to do much - So with a bit of care I
think you can.
E.G. something like (completely untested):
ifeq ($(LINUX_HEADERS_FROM_KERNEL),y)
# no source
LINUX_HEADERS_SOURCE =
LINUX_HEADERS_DEPENDENCIES += linux-configure
LINUX_HEADERS_BUILD_DIR = $(LINUX_DIR)
else
..
LINUX_HEADERS_BUILD_DIR = $(@D)
endif
..
define LINUX_HEADERS_INSTALL_STAGING_CMDS
(cd $(LINUX_HEADERS_BUILD_DIR); \
$(TARGET_MAKE_ENV) $(MAKE) \
But it isn't very pretty / robust.
--
Venlig hilsen,
Peter Korsgaard
More information about the buildroot
mailing list