From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-ot1-x343.google.com ([2607:f8b0:4864:20::343]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j6c0s-00062h-Ky for ptxdist@pengutronix.de; Tue, 25 Feb 2020 16:20:47 +0100 Received: by mail-ot1-x343.google.com with SMTP id 66so12370003otd.9 for ; Tue, 25 Feb 2020 07:20:46 -0800 (PST) MIME-Version: 1.0 From: Sandy Patterson Date: Tue, 25 Feb 2020 10:20:34 -0500 Message-ID: Subject: [ptxdist] [PATCH] kernel-headers: build out-of-tree List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: multipart/mixed; boundary="===============1563527012==" Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: Michael Olbrich , Marc Kleine-Budde Cc: ptxdist@pengutronix.de --===============1563527012== Content-Type: multipart/alternative; boundary="0000000000001bfcd0059f680832" --0000000000001bfcd0059f680832 Content-Type: text/plain; charset="UTF-8" I am not sure if the following patch is what was intended with the change to OOT=KEEP change for kernel. We have a folder within our BSP with a kernel tree and we symlink to that folder using local_src/kernel. and local_src/kernel-header.. We use an external kernel source tree and kernel headers from the same folder. It seems with our kernel at least building the kernel-headers in tree causes the out-of-tree kernel to fail to build. --- rules/kernel-header.make | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rules/kernel-header.make b/rules/kernel-header.make index c173eb74b..6f540409f 100644 --- a/rules/kernel-header.make +++ b/rules/kernel-header.make @@ -25,8 +25,10 @@ KERNEL_HEADER_URL := https://git.kernel.org/torvalds/t/$(KERNEL_HEADER).$(KERNE endif KERNEL_HEADER_SOURCE := $(SRCDIR)/linux-$(KERNEL_HEADER_VERSION).$(KERNEL_HEADER_SUFFIX) KERNEL_HEADER_DIR := $(BUILDDIR)/kernel-header-$(KERNEL_HEADER_VERSION) +KERNEL_HEADER_BUILD_DIR := $(KERNEL_HEADER_DIR)-build KERNEL_HEADER_PKGDIR := $(PKGDIR)/kernel-header-$(KERNEL_HEADER_VERSION) KERNEL_HEADER_LICENSE := GPL-2.0-only +KERNEL_HEADER_BUILD_OOT := KEEP # ---------------------------------------------------------------------------- # Prepare @@ -37,6 +39,7 @@ KERNEL_HEADER_PATH := PATH=$(CROSS_PATH) KERNEL_HEADER_CONF_TOOL := NO KERNEL_HEADER_MAKE_OPT := \ V=$(PTXDIST_VERBOSE) \ + O=$(KERNEL_HEADER_BUILD_DIR) \ HOSTCC=$(HOSTCC) \ ARCH=$(GENERIC_KERNEL_ARCH) \ CROSS_COMPILE=$(PTXCONF_COMPILER_PREFIX) -- 2.20.1 --0000000000001bfcd0059f680832 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I am not sure if the following patch= is what was intended with the change to OOT=3DKEEP change for kernel. We h= ave a folder within our BSP with a kernel tree and we symlink to that folde= r using local_src/kernel.<platformname>=C2=A0and local_src/kernel-header.<platformname>.

We use an external kernel source tree and kernel head= ers from the same
folder. It seems with our kernel at least building the= kernel-headers in
tree causes the out-of-tree kernel to fail to build.<= div>---
=C2=A0rules/kernel-header.make | 3 +++
=C2=A01 file changed, = 3 insertions(+)

diff --git a/rules/kernel-header.make b/rules/kernel= -header.make
index c173eb74b..6f540409f 100644
--- a/rules/kernel-hea= der.make
+++ b/rules/kernel-header.make
@@ -25,8 +25,10 @@ KERNEL_HEA= DER_URL :=3D https://git.kernel.org/torvalds/t/$(KERNEL_HEAD= ER).$(KERNE
=C2=A0endif
=C2=A0KERNEL_HEADER_SOURCE :=3D $(SRCDIR= )/linux-$(KERNEL_HEADER_VERSION).$(KERNEL_HEADER_SUFFIX)
=C2=A0KERNEL_HE= ADER_DIR :=3D $(BUILDDIR)/kernel-header-$(KERNEL_HEADER_VERSION)
+KERNE= L_HEADER_BUILD_DIR :=3D $(KERNEL_HEADER_DIR)-build
=C2=A0KERNEL_HEADER_P= KGDIR :=3D $(PKGDIR)/kernel-header-$(KERNEL_HEADER_VERSION)
=C2=A0KERNE= L_HEADER_LICENSE :=3D GPL-2.0-only
+KERNEL_HEADER_BUILD_OOT :=3D KEEP=C2=A0
=C2=A0# -------------------------------------------------------= ---------------------
=C2=A0# Prepare
@@ -37,6 +39,7 @@ KERNEL_HEADER= _PATH :=3D PATH=3D$(CROSS_PATH)
=C2=A0KERNEL_HEADER_CONF_TOOL :=3D NO<= br>=C2=A0KERNEL_HEADER_MAKE_OPT :=3D \
=C2=A0 V=3D$(PTXDIST_VERBOSE) \<= br>+ O=3D$(KERNEL_HEADER_BUILD_DIR) \
=C2=A0 HOSTCC=3D$(HOSTCC) \
=C2= =A0 ARCH=3D$(GENERIC_KERNEL_ARCH) \
=C2=A0 CROSS_COMPILE=3D$(PTXCONF_COM= PILER_PREFIX)
--
2.20.1
--0000000000001bfcd0059f680832-- --===============1563527012== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de --===============1563527012==--