From patchwork Wed May 7 21:16:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karoly Kasza X-Patchwork-Id: 346823 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 72BD61401B1 for ; Thu, 8 May 2014 07:16:46 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 7A89B87AF5; Wed, 7 May 2014 21:16:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yXpp-cwlIdtj; Wed, 7 May 2014 21:16:45 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 01BBB87B0B; Wed, 7 May 2014 21:16:45 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 3E5B21BFA58 for ; Wed, 7 May 2014 21:16:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 3A39F87AEA for ; Wed, 7 May 2014 21:16:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bEr0-7+DMpdo for ; Wed, 7 May 2014 21:16:42 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ee0-f51.google.com (mail-ee0-f51.google.com [74.125.83.51]) by hemlock.osuosl.org (Postfix) with ESMTPS id 9A3E687A02 for ; Wed, 7 May 2014 21:16:42 +0000 (UTC) Received: by mail-ee0-f51.google.com with SMTP id e51so1120754eek.38 for ; Wed, 07 May 2014 14:16:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=um8Tu8e/3ys88LFHT/ekPGSQIbUy+SE9UkdaTFS/+g0=; b=rSA+LWzF73Z7iBx4NazzJML+/RB2hLDjTKvqCBc+hdfohq3gCMKHKWATWrxXw5qeUz EduC7GbQlFFi6rMEe3vofH7btc719/aJyuhHO1Fv3bBKMThled4GG/j2gs5nbHmjMg4o khGkiyVyD8ocO82j3iu2Zfght5hVzhna2ce7bGX06xNPLs5lqLLmJ5uKgjuSR9+EkaPr b3XAoH9pxJtXqpXXrW0uQsZHsojKZBOqXG0KTa1e4EqYKX+9wkuqhKc+SH4qmRDp/itY ZSBvNZ0Ip1PJaqPgF777z0yJi/ESMmZ0GGINUSBA7Y7zMHWY34hkoNqN30hTAVcXUwOO zHfw== X-Received: by 10.15.101.9 with SMTP id bo9mr169576eeb.75.1399497400829; Wed, 07 May 2014 14:16:40 -0700 (PDT) Received: from localhost.localdomain (94-21-79-70.pool.digikabel.hu. [94.21.79.70]) by mx.google.com with ESMTPSA id cb5sm48862508eeb.18.2014.05.07.14.16.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 May 2014 14:16:40 -0700 (PDT) From: Karoly Kasza To: buildroot@buildroot.org Date: Wed, 7 May 2014 23:16:35 +0200 Message-Id: <1399497395-20994-1-git-send-email-kaszak@gmail.com> X-Mailer: git-send-email 1.7.10.4 Subject: [Buildroot] [PATCH 1/1] BR2_KERNEL_HEADERS_SAME_AS_KERNEL X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Allows the usage of the custom target kernel as headers for the internal toolchain. Signed-off-by: Karoly Kasza --- Originally by Magnus Edenhill & Thomas Petazzoni. package/linux-headers/Config.in.host | 10 +++++++++- package/linux-headers/linux-headers.mk | 7 +++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/package/linux-headers/Config.in.host b/package/linux-headers/Config.in.host index 177f0c2..7e711b8 100644 --- a/package/linux-headers/Config.in.host +++ b/package/linux-headers/Config.in.host @@ -58,6 +58,14 @@ 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. + endchoice config BR2_DEFAULT_KERNEL_VERSION @@ -69,7 +77,7 @@ config BR2_DEFAULT_KERNEL_VERSION choice bool "Custom kernel headers series" - depends on BR2_KERNEL_HEADERS_VERSION + depends on BR2_KERNEL_HEADERS_VERSION || BR2_KERNEL_HEADERS_SAME_AS_KERNEL default BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_REALLY_OLD help Set to the kernel headers series you manually set above. diff --git a/package/linux-headers/linux-headers.mk b/package/linux-headers/linux-headers.mk index 7b3edf4..f63632c 100644 --- a/package/linux-headers/linux-headers.mk +++ b/package/linux-headers/linux-headers.mk @@ -7,6 +7,12 @@ # This package is used to provide Linux kernel headers for the # internal toolchain backend. +ifeq ($(BR2_KERNEL_HEADERS_SAME_AS_KERNEL),y) +LINUX_HEADERS_VERSION = $(BR2_LINUX_KERNEL_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/ @@ -14,6 +20,7 @@ else LINUX_HEADERS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v3.x/ endif LINUX_HEADERS_SOURCE = linux-$(LINUX_HEADERS_VERSION).tar.xz +endif LINUX_HEADERS_INSTALL_STAGING = YES