From: Felix Moessbauer <felix.moessbauer@siemens.com>
To: isar-users@googlegroups.com
Cc: jan.kiszka@siemens.com, Felix Moessbauer <felix.moessbauer@siemens.com>
Subject: [PATCH 1/1] add support for DEB_BUILD_OPTIONS in linux-module
Date: Tue, 29 Nov 2022 11:36:56 +0000 [thread overview]
Message-ID: <20221129113656.4067503-1-felix.moessbauer@siemens.com> (raw)
This patch reworks how concurrency is induced in the build of a custom
kernel module. Previously it was controlled via a hard-coded
DEB_BUILD_OPTIONS environment variable in the rules file. This made it
impossible to inject other build profiles from the calling environment.
In addition, the variable is only intended to be set from the outside,
not within a rules file.
Since debhelper 10, parallel builds are the default anyways, but when
overwriting the build target, manual passing of the argument is
required. Here, we now reference the standard PARALLEL_MAKE variable
which is nowadays used to control the concurrency within builds and is
also set by bitbake.
As the only relevant task for concurrency is the build of the modules,
we just apply it there.
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
meta/recipes-kernel/linux-module/files/debian/rules.tmpl | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/meta/recipes-kernel/linux-module/files/debian/rules.tmpl b/meta/recipes-kernel/linux-module/files/debian/rules.tmpl
index d3bd7dc..c1c2560 100755
--- a/meta/recipes-kernel/linux-module/files/debian/rules.tmpl
+++ b/meta/recipes-kernel/linux-module/files/debian/rules.tmpl
@@ -7,8 +7,6 @@
#
# SPDX-License-Identifier: MIT
-export DEB_BUILD_OPTIONS=parallel=$(shell nproc)
-
export CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)-
ifeq ($(DEB_HOST_GNU_CPU), arm)
@@ -51,10 +49,10 @@ override_dh_auto_clean:
$(MAKE) -C $(KDIR) M=$(PWD) clean
override_dh_auto_build:
- $(MAKE) -C $(KDIR) M=$(PWD) modules
+ $(MAKE) -C $(KDIR) M=$(PWD) $(PARALLEL_MAKE) modules
override_dh_auto_install:
$(MAKE) -C $(KDIR) M=$(PWD) INSTALL_MOD_PATH=$(PWD)/debian/${PN} modules_install
%:
- CFLAGS= LDFLAGS= dh $@ --parallel
+ CFLAGS= LDFLAGS= dh $@
--
2.34.1
next reply other threads:[~2022-11-29 11:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-29 11:36 Felix Moessbauer [this message]
2022-12-13 12:37 ` Anton Mikanovich
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=20221129113656.4067503-1-felix.moessbauer@siemens.com \
--to=felix.moessbauer@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@siemens.com \
/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