Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] [RFC] BR2_KERNEL_HEADERS_TARGET: Add support for using target kernel for toolchain kernel headers.
Date: Tue, 4 Feb 2014 17:08:22 +0100	[thread overview]
Message-ID: <20140204170822.34f57774@skate> (raw)
In-Reply-To: <CAHCQUcAoruaNKt98BFU=fHpF2V6x4VbNg0J+kiuZ2n8zzKP9Hw@mail.gmail.com>

Dear Magnus Edenhill,

On Wed, 17 Apr 2013 12:51:09 +0200, Magnus Edenhill wrote:

> This patch allows the toolchain to use the target kernel's headers instead
> of having to download an  additional linux tree just for the toolchain.
> 
> Tested with the internal toolchain.
> 
> Only problem observed is that the kernel-headers..../.unpacked target is
> recreated on sub-sequent 'make' invocations, which recreates uclibc. But
> someone with more make-wizardry may be able to solve that.
> 
> It also copies the linux source, which may not be strictly required, but it
> seemed to be the safest option for now.
> 
> ---
>  toolchain/kernel-headers/Config.in         |    8 ++++++++
>  toolchain/kernel-headers/kernel-headers.mk |    8 ++++++++
>  2 files changed, 16 insertions(+)

Thanks for this contribution, and sorry for the long delay. During the
current Buildroot meeting, we have looked at this patch, and came up
with some suggestions before it can be merged:

 1/ It should be rebased on top of the latest master, in which a number
    of changes have been made to the internal toolchain backend.

 2/ Instead of copying the Linux kernel sources from LINUX_DIR,
    LINUX_HEADERS_DIR should do its own download and extract of the
    kernel sources. So package/linux-headers/linux-headers.mk should
    look like:

ifeq ($(BR2_KERNEL_HEADERS_SAME_AS_KERNEL),y)
LINUX_HEADERS_VERSION = $(LINUX_VERSION)
LINUX_HEADERS_SOURCE = $(LINUX_SOURCE)
LINUX_HEADERS_SITE = $(LINUX_SITE)
LINUX_HEADERS_SITE_METHOD = $(LINUX_SITE_METHOD)
else
LINUX_HEADERS_VERSION = $(call qstrip,$(BR2_DEFAULT_KERNEL_HEADERS))
ifeq ($(findstring x2.6.,x$(LINUX_HEADERS_VERSION)),x2.6.)
LINUX_HEADERS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v2.6/
else
LINUX_HEADERS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v3.x/
endif
LINUX_HEADERS_SOURCE = linux-$(LINUX_HEADERS_VERSION).tar.xz
endif

The idea is that when we want to use the same kernel sources for the
kernel headers and the kernel itself, we define the version, source,
site and site method variables to be the same.

> 
> diff --git a/toolchain/kernel-headers/Config.in
> b/toolchain/kernel-headers/Config.in
> index 6155ef1..dc04fd2 100644
> --- a/toolchain/kernel-headers/Config.in
> +++ b/toolchain/kernel-headers/Config.in
> @@ -52,6 +52,13 @@ choice
> 
>   config BR2_KERNEL_HEADERS_SNAP
>   bool "Local Linux snapshot (linux-2.6.tar.bz2)"
> +
> + config BR2_KERNEL_HEADERS_TARGET
> + bool "Target Linux kernel"
> + depends on BR2_LINUX_KERNEL
> + help

Your patch was broken in terms of tabs. Can you make sure to use "git
send-email" instead, so that your patch doesn't get modified by your
e-mail client?

Would you mind working on this and submit an updated patch?

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

      reply	other threads:[~2014-02-04 16:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-17 10:51 [Buildroot] [PATCH] [RFC] BR2_KERNEL_HEADERS_TARGET: Add support for using target kernel for toolchain kernel headers Magnus Edenhill
2014-02-04 16:08 ` Thomas Petazzoni [this message]

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=20140204170822.34f57774@skate \
    --to=thomas.petazzoni@free-electrons.com \
    --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