* [PATCH 1/1] add support for DEB_BUILD_OPTIONS in linux-module
@ 2022-11-29 11:36 Felix Moessbauer
2022-12-13 12:37 ` Anton Mikanovich
0 siblings, 1 reply; 2+ messages in thread
From: Felix Moessbauer @ 2022-11-29 11:36 UTC (permalink / raw)
To: isar-users; +Cc: jan.kiszka, Felix Moessbauer
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] add support for DEB_BUILD_OPTIONS in linux-module
2022-11-29 11:36 [PATCH 1/1] add support for DEB_BUILD_OPTIONS in linux-module Felix Moessbauer
@ 2022-12-13 12:37 ` Anton Mikanovich
0 siblings, 0 replies; 2+ messages in thread
From: Anton Mikanovich @ 2022-12-13 12:37 UTC (permalink / raw)
To: Felix Moessbauer, isar-users; +Cc: jan.kiszka
29.11.2022 14:36, Felix Moessbauer wrote:
> 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>
Applied to next, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-12-13 12:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-29 11:36 [PATCH 1/1] add support for DEB_BUILD_OPTIONS in linux-module Felix Moessbauer
2022-12-13 12:37 ` Anton Mikanovich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox