From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] linux: add an option to install kernel headers into staging
Date: Tue, 24 Mar 2015 21:57:09 +0100 [thread overview]
Message-ID: <20150324205709.GC4023@free.fr> (raw)
In-Reply-To: <1427191230-23152-1-git-send-email-nicolas.serafini@sensefly.com>
Nicolas, All,
On 2015-03-24 11:00 +0100, Nicolas Serafini spake thusly:
> The kernel headers are installed into /usr/src/linux-headers-version
> of the staging folder.
>
> These headers can be used, for example, by a post build script to
> install or update some new headers from the kernel in /usr/include of
> the staging.
No, no. The kernel headers in staging are those that come from the
toolchain.
When the toolchain has been compiled, parts of it (notably the C
library) have been configured according to whatever API/ABI the kernel
headers where exporting to userland. Those headers can *not* be changed
after the fact.
So, this is a big NAK from me, sorry.
Regards,
Yann E. MORIN.
> Signed-off-by: Nicolas Serafini <nicolas.serafini@sensefly.com>
> ---
> linux/Config.in | 6 ++++++
> linux/linux.mk | 9 +++++++++
> 2 files changed, 15 insertions(+)
>
> diff --git a/linux/Config.in b/linux/Config.in
> index fa3232f..dd97211 100644
> --- a/linux/Config.in
> +++ b/linux/Config.in
> @@ -354,6 +354,12 @@ config BR2_LINUX_KERNEL_INSTALL_TARGET
> /boot if DTBs have been generated by the kernel build
> process.
>
> +config BR2_LINUX_KERNEL_INSTALL_HEADERS
> + bool "Install kernel headers to staging"
> + help
> + Select this option to have the kernel headers installed to
> + staging in /usr/src/linux-headers-version folder.
> +
> # Linux extensions
> source "linux/Config.ext.in"
>
> diff --git a/linux/linux.mk b/linux/linux.mk
> index 5a0ba01..c7792d4 100644
> --- a/linux/linux.mk
> +++ b/linux/linux.mk
> @@ -7,6 +7,9 @@
> LINUX_VERSION = $(call qstrip,$(BR2_LINUX_KERNEL_VERSION))
> LINUX_LICENSE = GPLv2
> LINUX_LICENSE_FILES = COPYING
> +ifeq ($(BR2_LINUX_KERNEL_INSTALL_HEADERS),y)
> +LINUX_INSTALL_STAGING=YES
> +endif
>
> # Compute LINUX_SOURCE and LINUX_SITE from the configuration
> ifeq ($(BR2_LINUX_KERNEL_CUSTOM_TARBALL),y)
> @@ -54,6 +57,7 @@ LINUX_MAKE_FLAGS = \
> HOSTCFLAGS="$(HOSTCFLAGS)" \
> ARCH=$(KERNEL_ARCH) \
> INSTALL_MOD_PATH=$(TARGET_DIR) \
> + INSTALL_HDR_PATH="$(STAGING_DIR)/usr/src/linux-headers-$(LINUX_VERSION)" \
> CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)" \
> DEPMOD=$(HOST_DIR)/sbin/depmod
>
> @@ -297,6 +301,11 @@ define LINUX_INSTALL_KERNEL_IMAGE_TO_TARGET
> endef
> endif
>
> +ifeq ($(BR2_LINUX_KERNEL_INSTALL_HEADERS),y)
> +define LINUX_INSTALL_STAGING_CMDS
> + $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_TARGET_NAME) headers_install
> +endef
> +endif
>
> define LINUX_INSTALL_HOST_TOOLS
> # Installing dtc (device tree compiler) as host tool, if selected
> --
> 2.3.4
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2015-03-24 20:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-24 10:00 [Buildroot] [PATCH] linux: add an option to install kernel headers into staging Nicolas Serafini
2015-03-24 19:45 ` Danomi Manchego
2015-03-25 10:00 ` Nicolas Serafini
2015-03-24 20:57 ` Yann E. MORIN [this message]
2015-03-25 10:00 ` Nicolas Serafini
2015-03-24 23:57 ` Thomas Petazzoni
2015-03-25 10:00 ` Nicolas Serafini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150324205709.GC4023@free.fr \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox