summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2019-09-16 12:40:17 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2019-09-16 16:27:04 +0200
commitd29acf52bea060c19a3ecbea266fc80945af57cd (patch)
tree90479226ef9a1fe8b4cf640eb854655fee367a6f
parent5f9b816785f3362a64f13ab9dbe7b9cf4e2d2982 (diff)
downloadptxdist-d29acf52bea060c19a3ecbea266fc80945af57cd.tar.gz
ptxdist-d29acf52bea060c19a3ecbea266fc80945af57cd.tar.xz
template-kernel: build out-of-tree
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--rules/templates/template-kernel-make11
1 files changed, 8 insertions, 3 deletions
diff --git a/rules/templates/template-kernel-make b/rules/templates/template-kernel-make
index 23dfa0c84..66c67b70b 100644
--- a/rules/templates/template-kernel-make
+++ b/rules/templates/template-kernel-make
@@ -19,10 +19,12 @@ KERNEL_@PACKAGE@_MD5 :=
KERNEL_@PACKAGE@ := linux-$(KERNEL_@PACKAGE@_VERSION)
KERNEL_@PACKAGE@_SUFFIX := tar.xz
KERNEL_@PACKAGE@_DIR := $(BUILDDIR)/linux-@package@-$(KERNEL_@PACKAGE@_VERSION)
+KERNEL_@PACKAGE@_BUILD_DIR := $(KERNEL_@PACKAGE@_DIR)-build
KERNEL_@PACKAGE@_CONFIG := $(call ptx/in-platformconfigdir, kernelconfig-@package@)
KERNEL_@PACKAGE@_LICENSE := GPL-2.0
KERNEL_@PACKAGE@_URL := $(call kernel-url, KERNEL_@PACKAGE@)
KERNEL_@PACKAGE@_SOURCE := $(SRCDIR)/$(KERNEL_@PACKAGE@).$(KERNEL_@PACKAGE@_SUFFIX)
+KERNEL_@PACKAGE@_BUILD_OOT := KEEP
# ----------------------------------------------------------------------------
# Prepare
@@ -34,10 +36,13 @@ KERNEL_@PACKAGE@_WRAPPER_BLACKLIST := \
KERNEL_@PACKAGE@_PATH := PATH=$(CROSS_PATH)
KERNEL_@PACKAGE@_ENV := KCONFIG_NOTIMESTAMP=1
-KERNEL_@PACKAGE@_CONF_OPT := $(call kernel-opts, KERNEL_@PACKAGE@)
+KERNEL_@PACKAGE@_CONF_OPT := \
+ -C $(KERNEL_@PACKAGE@_DIR) \
+ O=$(KERNEL_@PACKAGE@_BUILD_DIR) \
+ $(call kernel-opts, KERNEL_@PACKAGE@)
KERNEL_@PACKAGE@_IMAGES := @image@
-KERNEL_@PACKAGE@_IMAGES := $(addprefix $(KERNEL_@PACKAGE@_DIR)/arch/$(GENERIC_KERNEL_ARCH)/boot/,$(KERNEL_@PACKAGE@_IMAGES))
+KERNEL_@PACKAGE@_IMAGES := $(addprefix $(KERNEL_@PACKAGE@_BUILD_DIR)/arch/$(GENERIC_KERNEL_ARCH)/boot/,$(KERNEL_@PACKAGE@_IMAGES))
ifdef PTXCONF_KERNEL_@PACKAGE@
$(KERNEL_@PACKAGE@_CONFIG):
@@ -57,7 +62,7 @@ $(STATEDIR)/kernel-@package@.prepare:
# ----------------------------------------------------------------------------
KERNEL_@PACKAGE@_MAKE_OPT := \
- $(call kernel-opts, KERNEL_@PACKAGE@) \
+ $(KERNEL_@PACKAGE@_CONF_OPT) \
@image@ modules
# ----------------------------------------------------------------------------