aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Thompson <daniel.thompson@linaro.org>2019-12-12 15:57:39 +0000
committerDaniel Thompson <daniel.thompson@linaro.org>2020-08-12 16:56:42 +0100
commitdcfaabf987b72fdffde8056cc263cc9c5c5a4f9a (patch)
tree40ac740090e716d7f390d8c040a02ac51cea8e80
parent29cbf6133ea68854db707cacdc79d16095a52115 (diff)
kbuild: deb-pkg: Honour DEB_BUILD_OPTIONS/parallel if presentpinebookpro/hacking-5.8
Currently if we rebuild the orig, diff and dsc triplet outside of the kernel build system then it will not honour the requested level of parallelism. Fix this by parsing DEB_BUILD_OPTIONS. Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
-rwxr-xr-xscripts/package/mkdebian9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index 53319e168e41..5833f17f47e0 100755
--- a/scripts/package/mkdebian
+++ b/scripts/package/mkdebian
@@ -224,6 +224,15 @@ cat <<EOF > debian/rules
srctree ?= .
+ifneq (,\$(filter parallel=%,\$(DEB_BUILD_OPTIONS)))
+ DEBIAN_KERNEL_JOBS := \$(subst parallel=,,\$(filter parallel=%,\$(DEB_BUILD_OPTIONS)))
+endif
+ifdef DEBIAN_KERNEL_JOBS
+ MAKEFLAGS += -j\$(DEBIAN_KERNEL_JOBS)
+endif
+
+.NOTPARALLEL:
+
build:
\$(MAKE) KERNELRELEASE=${version} ARCH=${ARCH} \
KBUILD_BUILD_VERSION=${revision} KBUILD_IMAGE=${KBUILD_IMAGE} \