* [PATCH v3 0/3] Kbuild follow-up
@ 2024-05-13 4:17 Adriaan Schmidt
2024-05-13 4:17 ` [PATCH v3 1/3] module.inc: fix kbuild dependency Adriaan Schmidt
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Adriaan Schmidt @ 2024-05-13 4:17 UTC (permalink / raw)
To: isar-users; +Cc: jan.kiszka, stefan-koch, Adriaan Schmidt
Based on the Stefan's "[PATCH] linux-module: Support emulated module build
with cross-compiled kernel", and on the result of staring at dependency
graphs with Jan, this mainly addresses corner cases of the refactored
kbuild packaging when cross-compiling.
I've tested
- cross-compiled custom kernel and cross module build
- cross-compiled custom kernel and emulated module build
- distro kernel and emulated module build
Let me know if one of your use-cases is still missing.
Also including some fixups brought up in recent reviews on the ML.
Adriaan
changes since v2:
- removed a forgotten line of testing code
changes since v1:
- always use linux-kbuild-native as build dependency, even for emulated
builds, because the multiarch logic will select the correct package
*** BLURB HERE ***
Adriaan Schmidt (3):
module.inc: fix kbuild dependency
linux-custom: use to_boolean when checking ISAR_CROSS_COMPILE
kbuildtarget.bbclass: add missing license header
meta/recipes-kernel/linux-module/module.inc | 3 ++-
meta/recipes-kernel/linux/classes/kbuildtarget.bbclass | 5 +++++
meta/recipes-kernel/linux/linux-custom.inc | 5 +----
meta/recipes-kernel/linux/linux-distro.bb | 1 +
4 files changed, 9 insertions(+), 5 deletions(-)
--
2.39.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3 1/3] module.inc: fix kbuild dependency
2024-05-13 4:17 [PATCH v3 0/3] Kbuild follow-up Adriaan Schmidt
@ 2024-05-13 4:17 ` Adriaan Schmidt
2024-05-13 5:24 ` Jan Kiszka
2024-05-13 4:17 ` [PATCH v3 2/3] linux-custom: use to_boolean when checking ISAR_CROSS_COMPILE Adriaan Schmidt
2024-05-13 4:17 ` [PATCH v3 3/3] kbuildtarget.bbclass: add missing license header Adriaan Schmidt
2 siblings, 1 reply; 8+ messages in thread
From: Adriaan Schmidt @ 2024-05-13 4:17 UTC (permalink / raw)
To: isar-users; +Cc: jan.kiszka, stefan-koch, Adriaan Schmidt
This achieves two things:
* Module builds explicitly depend on linux-kbuild-* as build dependency.
Previously we only had an implicit RDEPENDS in linux-custom, which is
not sufficient. For linux-distro, this means we need to PROVIDE linux-kbuild.
* Remove the unconditional building of native kbuild when it is
not needed, i.e. when we're not actually cross-building a module
Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
---
meta/recipes-kernel/linux-module/module.inc | 3 ++-
meta/recipes-kernel/linux/linux-custom.inc | 3 ---
meta/recipes-kernel/linux/linux-distro.bb | 1 +
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/meta/recipes-kernel/linux-module/module.inc b/meta/recipes-kernel/linux-module/module.inc
index eddbf177..1cca9cfb 100644
--- a/meta/recipes-kernel/linux-module/module.inc
+++ b/meta/recipes-kernel/linux-module/module.inc
@@ -17,7 +17,8 @@ PN .= "-${KERNEL_NAME}"
KERNEL_IMAGE_PKG ??= "linux-image-${KERNEL_NAME}"
KERNEL_HEADERS_PKG ??= "linux-headers-${KERNEL_NAME}"
-DEPENDS += "${KERNEL_HEADERS_PKG}"
+KERNEL_KBUILD_PKG ??= "linux-kbuild-${KERNEL_NAME}"
+DEPENDS += "${KERNEL_HEADERS_PKG} ${KERNEL_KBUILD_PKG}-native"
DEBIAN_BUILD_DEPENDS = "${KERNEL_HEADERS_PKG}"
SIGNATURE_KEYFILE ??= ""
diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
index 0d222332..35c61187 100644
--- a/meta/recipes-kernel/linux/linux-custom.inc
+++ b/meta/recipes-kernel/linux/linux-custom.inc
@@ -148,9 +148,6 @@ PROVIDES += "${RECIPE_PROVIDES}"
# Append build profiles
DEB_BUILD_PROFILES += "${BUILD_PROFILES}"
-# Add dependency to build -kbuildtarget and -native automatically
-RDEPENDS:append:cross-profile = " ${BPN}-native"
-
def get_kernel_arch(d):
distro_arch = d.getVar("DISTRO_ARCH")
if distro_arch in ["amd64", "i386"]:
diff --git a/meta/recipes-kernel/linux/linux-distro.bb b/meta/recipes-kernel/linux/linux-distro.bb
index bc43528c..13b8dc7e 100644
--- a/meta/recipes-kernel/linux/linux-distro.bb
+++ b/meta/recipes-kernel/linux/linux-distro.bb
@@ -10,6 +10,7 @@ python() {
for kernel in distro_kernels.split():
d.appendVar('PROVIDES', ' linux-image-' + kernel)
d.appendVar('PROVIDES', ' linux-headers-' + kernel)
+ d.appendVar('PROVIDES', ' linux-kbuild-' + kernel)
if d.getVar('KERNEL_IMAGE_PKG'):
d.appendVar('PROVIDES', ' ' + d.getVar('KERNEL_IMAGE_PKG'))
if d.getVar('KERNEL_HEADERS_PKG'):
--
2.39.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3 2/3] linux-custom: use to_boolean when checking ISAR_CROSS_COMPILE
2024-05-13 4:17 [PATCH v3 0/3] Kbuild follow-up Adriaan Schmidt
2024-05-13 4:17 ` [PATCH v3 1/3] module.inc: fix kbuild dependency Adriaan Schmidt
@ 2024-05-13 4:17 ` Adriaan Schmidt
2024-05-13 7:45 ` Koch, Stefan
2024-05-13 9:06 ` Koch, Stefan
2024-05-13 4:17 ` [PATCH v3 3/3] kbuildtarget.bbclass: add missing license header Adriaan Schmidt
2 siblings, 2 replies; 8+ messages in thread
From: Adriaan Schmidt @ 2024-05-13 4:17 UTC (permalink / raw)
To: isar-users; +Cc: jan.kiszka, stefan-koch, Adriaan Schmidt
we've changed style/convention in Isar sometime during the review of the
kbuild series, and this was missed.
Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
---
meta/recipes-kernel/linux/linux-custom.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
index 35c61187..53516ef3 100644
--- a/meta/recipes-kernel/linux/linux-custom.inc
+++ b/meta/recipes-kernel/linux/linux-custom.inc
@@ -97,7 +97,7 @@ KERNEL_NAME_PROVIDED ?= "${@ d.getVar('BPN').partition('linux-')[2]}"
# Determine cross-profile override
python() {
- if d.getVar("DISTRO_ARCH") != d.getVar("HOST_ARCH") and d.getVar("ISAR_CROSS_COMPILE", True) == "1" and "class-native" not in d.getVar("OVERRIDES", True).split(":"):
+ if d.getVar("DISTRO_ARCH") != d.getVar("HOST_ARCH") and bb.utils.to_boolean(d.getVar("ISAR_CROSS_COMPILE")) and "class-native" not in d.getVar("OVERRIDES", True).split(":"):
d.appendVar("OVERRIDES", ":cross-profile")
}
--
2.39.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3 3/3] kbuildtarget.bbclass: add missing license header
2024-05-13 4:17 [PATCH v3 0/3] Kbuild follow-up Adriaan Schmidt
2024-05-13 4:17 ` [PATCH v3 1/3] module.inc: fix kbuild dependency Adriaan Schmidt
2024-05-13 4:17 ` [PATCH v3 2/3] linux-custom: use to_boolean when checking ISAR_CROSS_COMPILE Adriaan Schmidt
@ 2024-05-13 4:17 ` Adriaan Schmidt
2 siblings, 0 replies; 8+ messages in thread
From: Adriaan Schmidt @ 2024-05-13 4:17 UTC (permalink / raw)
To: isar-users; +Cc: jan.kiszka, stefan-koch, Adriaan Schmidt
Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
---
meta/recipes-kernel/linux/classes/kbuildtarget.bbclass | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/meta/recipes-kernel/linux/classes/kbuildtarget.bbclass b/meta/recipes-kernel/linux/classes/kbuildtarget.bbclass
index 26369861..648825e4 100644
--- a/meta/recipes-kernel/linux/classes/kbuildtarget.bbclass
+++ b/meta/recipes-kernel/linux/classes/kbuildtarget.bbclass
@@ -1,3 +1,8 @@
+# This software is a part of ISAR.
+# Copyright (C) 2024 Siemens AG
+#
+# SPDX-License-Identifier: MIT
+
python kbuildtarget_virtclass_handler() {
pn = e.data.getVar('PN')
if pn.endswith('-kbuildtarget'):
--
2.39.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 1/3] module.inc: fix kbuild dependency
2024-05-13 4:17 ` [PATCH v3 1/3] module.inc: fix kbuild dependency Adriaan Schmidt
@ 2024-05-13 5:24 ` Jan Kiszka
2024-05-13 7:02 ` Jan Kiszka
0 siblings, 1 reply; 8+ messages in thread
From: Jan Kiszka @ 2024-05-13 5:24 UTC (permalink / raw)
To: Adriaan Schmidt, isar-users; +Cc: stefan-koch
On 13.05.24 06:17, Adriaan Schmidt wrote:
> This achieves two things:
>
> * Module builds explicitly depend on linux-kbuild-* as build dependency.
> Previously we only had an implicit RDEPENDS in linux-custom, which is
> not sufficient. For linux-distro, this means we need to PROVIDE linux-kbuild.
> * Remove the unconditional building of native kbuild when it is
> not needed, i.e. when we're not actually cross-building a module
>
> Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
> ---
> meta/recipes-kernel/linux-module/module.inc | 3 ++-
> meta/recipes-kernel/linux/linux-custom.inc | 3 ---
> meta/recipes-kernel/linux/linux-distro.bb | 1 +
> 3 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/meta/recipes-kernel/linux-module/module.inc b/meta/recipes-kernel/linux-module/module.inc
> index eddbf177..1cca9cfb 100644
> --- a/meta/recipes-kernel/linux-module/module.inc
> +++ b/meta/recipes-kernel/linux-module/module.inc
> @@ -17,7 +17,8 @@ PN .= "-${KERNEL_NAME}"
>
> KERNEL_IMAGE_PKG ??= "linux-image-${KERNEL_NAME}"
> KERNEL_HEADERS_PKG ??= "linux-headers-${KERNEL_NAME}"
> -DEPENDS += "${KERNEL_HEADERS_PKG}"
> +KERNEL_KBUILD_PKG ??= "linux-kbuild-${KERNEL_NAME}"
> +DEPENDS += "${KERNEL_HEADERS_PKG} ${KERNEL_KBUILD_PKG}-native"
> DEBIAN_BUILD_DEPENDS = "${KERNEL_HEADERS_PKG}"
>
> SIGNATURE_KEYFILE ??= ""
> diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
> index 0d222332..35c61187 100644
> --- a/meta/recipes-kernel/linux/linux-custom.inc
> +++ b/meta/recipes-kernel/linux/linux-custom.inc
> @@ -148,9 +148,6 @@ PROVIDES += "${RECIPE_PROVIDES}"
> # Append build profiles
> DEB_BUILD_PROFILES += "${BUILD_PROFILES}"
>
> -# Add dependency to build -kbuildtarget and -native automatically
> -RDEPENDS:append:cross-profile = " ${BPN}-native"
> -
> def get_kernel_arch(d):
> distro_arch = d.getVar("DISTRO_ARCH")
> if distro_arch in ["amd64", "i386"]:
> diff --git a/meta/recipes-kernel/linux/linux-distro.bb b/meta/recipes-kernel/linux/linux-distro.bb
> index bc43528c..13b8dc7e 100644
> --- a/meta/recipes-kernel/linux/linux-distro.bb
> +++ b/meta/recipes-kernel/linux/linux-distro.bb
> @@ -10,6 +10,7 @@ python() {
> for kernel in distro_kernels.split():
> d.appendVar('PROVIDES', ' linux-image-' + kernel)
> d.appendVar('PROVIDES', ' linux-headers-' + kernel)
> + d.appendVar('PROVIDES', ' linux-kbuild-' + kernel)
> if d.getVar('KERNEL_IMAGE_PKG'):
> d.appendVar('PROVIDES', ' ' + d.getVar('KERNEL_IMAGE_PKG'))
> if d.getVar('KERNEL_HEADERS_PKG'):
There is another change coming with this: In order to install
linux-headers into your target image, you now need to explicitly depend
on linux-${KERNEL_NAME}-kbuildtarget in the image recipe.
linux-headers-${KERNEL_NAME} will not pull the kbuildtarget, and the
latter is not auto-built anymore.
I'm testing some idea (some may call it hack) to resolve that by moving
the linux-headers provider to kbuildtarget and native and then let those
two depend on the base recipe. Not straightforward, but it seems to work.
Jan
--
Siemens AG, Technology
Linux Expert Center
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 1/3] module.inc: fix kbuild dependency
2024-05-13 5:24 ` Jan Kiszka
@ 2024-05-13 7:02 ` Jan Kiszka
0 siblings, 0 replies; 8+ messages in thread
From: Jan Kiszka @ 2024-05-13 7:02 UTC (permalink / raw)
To: Adriaan Schmidt, isar-users; +Cc: stefan-koch
On 13.05.24 07:24, Jan Kiszka wrote:
> On 13.05.24 06:17, Adriaan Schmidt wrote:
>> This achieves two things:
>>
>> * Module builds explicitly depend on linux-kbuild-* as build dependency.
>> Previously we only had an implicit RDEPENDS in linux-custom, which is
>> not sufficient. For linux-distro, this means we need to PROVIDE linux-kbuild.
>> * Remove the unconditional building of native kbuild when it is
>> not needed, i.e. when we're not actually cross-building a module
>>
>> Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
>> ---
>> meta/recipes-kernel/linux-module/module.inc | 3 ++-
>> meta/recipes-kernel/linux/linux-custom.inc | 3 ---
>> meta/recipes-kernel/linux/linux-distro.bb | 1 +
>> 3 files changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/meta/recipes-kernel/linux-module/module.inc b/meta/recipes-kernel/linux-module/module.inc
>> index eddbf177..1cca9cfb 100644
>> --- a/meta/recipes-kernel/linux-module/module.inc
>> +++ b/meta/recipes-kernel/linux-module/module.inc
>> @@ -17,7 +17,8 @@ PN .= "-${KERNEL_NAME}"
>>
>> KERNEL_IMAGE_PKG ??= "linux-image-${KERNEL_NAME}"
>> KERNEL_HEADERS_PKG ??= "linux-headers-${KERNEL_NAME}"
>> -DEPENDS += "${KERNEL_HEADERS_PKG}"
>> +KERNEL_KBUILD_PKG ??= "linux-kbuild-${KERNEL_NAME}"
>> +DEPENDS += "${KERNEL_HEADERS_PKG} ${KERNEL_KBUILD_PKG}-native"
>> DEBIAN_BUILD_DEPENDS = "${KERNEL_HEADERS_PKG}"
>>
>> SIGNATURE_KEYFILE ??= ""
>> diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
>> index 0d222332..35c61187 100644
>> --- a/meta/recipes-kernel/linux/linux-custom.inc
>> +++ b/meta/recipes-kernel/linux/linux-custom.inc
>> @@ -148,9 +148,6 @@ PROVIDES += "${RECIPE_PROVIDES}"
>> # Append build profiles
>> DEB_BUILD_PROFILES += "${BUILD_PROFILES}"
>>
>> -# Add dependency to build -kbuildtarget and -native automatically
>> -RDEPENDS:append:cross-profile = " ${BPN}-native"
>> -
>> def get_kernel_arch(d):
>> distro_arch = d.getVar("DISTRO_ARCH")
>> if distro_arch in ["amd64", "i386"]:
>> diff --git a/meta/recipes-kernel/linux/linux-distro.bb b/meta/recipes-kernel/linux/linux-distro.bb
>> index bc43528c..13b8dc7e 100644
>> --- a/meta/recipes-kernel/linux/linux-distro.bb
>> +++ b/meta/recipes-kernel/linux/linux-distro.bb
>> @@ -10,6 +10,7 @@ python() {
>> for kernel in distro_kernels.split():
>> d.appendVar('PROVIDES', ' linux-image-' + kernel)
>> d.appendVar('PROVIDES', ' linux-headers-' + kernel)
>> + d.appendVar('PROVIDES', ' linux-kbuild-' + kernel)
>> if d.getVar('KERNEL_IMAGE_PKG'):
>> d.appendVar('PROVIDES', ' ' + d.getVar('KERNEL_IMAGE_PKG'))
>> if d.getVar('KERNEL_HEADERS_PKG'):
>
> There is another change coming with this: In order to install
> linux-headers into your target image, you now need to explicitly depend
> on linux-${KERNEL_NAME}-kbuildtarget in the image recipe.
> linux-headers-${KERNEL_NAME} will not pull the kbuildtarget, and the
> latter is not auto-built anymore.
>
> I'm testing some idea (some may call it hack) to resolve that by moving
> the linux-headers provider to kbuildtarget and native and then let those
> two depend on the base recipe. Not straightforward, but it seems to work.
>
The following changes on top of the this patch is apparently working
fine, and you can simply do
IMAGE_INSTALL += "linux-headers-${KERNEL_NAME}"
again.
diff --git a/meta/recipes-kernel/linux-module/module.inc b/meta/recipes-kernel/linux-module/module.inc
index 1cca9cfb..229e6a5c 100644
--- a/meta/recipes-kernel/linux-module/module.inc
+++ b/meta/recipes-kernel/linux-module/module.inc
@@ -17,8 +17,7 @@ PN .= "-${KERNEL_NAME}"
KERNEL_IMAGE_PKG ??= "linux-image-${KERNEL_NAME}"
KERNEL_HEADERS_PKG ??= "linux-headers-${KERNEL_NAME}"
-KERNEL_KBUILD_PKG ??= "linux-kbuild-${KERNEL_NAME}"
-DEPENDS += "${KERNEL_HEADERS_PKG} ${KERNEL_KBUILD_PKG}-native"
+DEPENDS += "${KERNEL_HEADERS_PKG}-native"
DEBIAN_BUILD_DEPENDS = "${KERNEL_HEADERS_PKG}"
SIGNATURE_KEYFILE ??= ""
diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
index af3504dd..00b169bc 100644
--- a/meta/recipes-kernel/linux/linux-custom.inc
+++ b/meta/recipes-kernel/linux/linux-custom.inc
@@ -113,11 +113,19 @@ BUILD_PROFILES:cross-profile = "kernel"
# -native: kbuild package for host
BUILD_PROFILES:class-native = "kbuild"
-RECIPE_PROVIDES:class-native = "linux-kbuild-${KERNEL_NAME_PROVIDED}-native"
+RECIPE_PROVIDES:class-native = " \
+ linux-headers-${KERNEL_NAME_PROVIDED}-native \
+ linux-kbuild-${KERNEL_NAME_PROVIDED}-native"
+# Use pseudo target. We cannot use ${BPN} because it will be auto-extended
+# with -native by multiarch.bbclass.
+RDEPENDS:class-native = "${BPN}-pseudo-native"
# -kbuildtarget: kbuild package for target, enforcing non-cross-build
BUILD_PROFILES:class-kbuildtarget = "kbuild"
-RECIPE_PROVIDES:class-kbuildtarget = "linux-kbuild-${KERNEL_NAME_PROVIDED}"
+RECIPE_PROVIDES:class-kbuildtarget = " \
+ linux-headers-${KERNEL_NAME_PROVIDED} \
+ linux-kbuild-${KERNEL_NAME_PROVIDED}"
+RDEPENDS:class-kbuildtarget = "${BPN}"
ISAR_CROSS_COMPILE:class-kbuildtarget = "0"
# Make bitbake know we will be producing linux-image and linux-headers packages
@@ -125,15 +133,21 @@ ISAR_CROSS_COMPILE:class-kbuildtarget = "0"
RECIPE_PROVIDES = " \
linux-image-${KERNEL_NAME_PROVIDED} \
linux-headers-${KERNEL_NAME_PROVIDED} \
+ linux-headers-${KERNEL_NAME_PROVIDED}-native \
linux-libc-dev \
linux-libc-dev-${DISTRO_ARCH}-cross \
linux-image-${KERNEL_NAME_PROVIDED}-dbg \
linux-kbuild-${KERNEL_NAME_PROVIDED} \
+ ${BPN}-pseudo-native \
"
# When cross-profile is active:
-# kbuild package is provided by -native or -kbuildtarget variant
-# Otherwise it's provided by the default variant
-RECIPE_PROVIDES:remove:cross-profile = "linux-kbuild-${KERNEL_NAME_PROVIDED}"
+# kbuild package is provided by -native or -kbuildtarget variant. Also headers
+# provisioning moves over to ensure those variants are pulled, although the
+# package itself is still built by the base recipe.
+RECIPE_PROVIDES:remove:cross-profile = " \
+ linux-headers-${KERNEL_NAME_PROVIDED} \
+ linux-headers-${KERNEL_NAME_PROVIDED}-native \
+ linux-kbuild-${KERNEL_NAME_PROVIDED}"
# Append headers depends
HEADERS_DEPENDS = ", linux-kbuild-${KERNEL_NAME_PROVIDED} | linux-kbuild-${KERNEL_NAME_PROVIDED}-${DISTRO_ARCH}-cross"
Jan
--
Siemens AG, Technology
Linux Expert Center
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 2/3] linux-custom: use to_boolean when checking ISAR_CROSS_COMPILE
2024-05-13 4:17 ` [PATCH v3 2/3] linux-custom: use to_boolean when checking ISAR_CROSS_COMPILE Adriaan Schmidt
@ 2024-05-13 7:45 ` Koch, Stefan
2024-05-13 9:06 ` Koch, Stefan
1 sibling, 0 replies; 8+ messages in thread
From: Koch, Stefan @ 2024-05-13 7:45 UTC (permalink / raw)
To: Schmidt, Adriaan, isar-users; +Cc: Kiszka, Jan
This is already included in:
[PATCH] linux-module: Support emulated module build with cross-compiled
kernel
On Mon, 2024-05-13 at 06:17 +0200, Adriaan Schmidt wrote:
> we've changed style/convention in Isar sometime during the review of
> the
> kbuild series, and this was missed.
>
> Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
> ---
> meta/recipes-kernel/linux/linux-custom.inc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-kernel/linux/linux-custom.inc
> b/meta/recipes-kernel/linux/linux-custom.inc
> index 35c61187..53516ef3 100644
> --- a/meta/recipes-kernel/linux/linux-custom.inc
> +++ b/meta/recipes-kernel/linux/linux-custom.inc
> @@ -97,7 +97,7 @@ KERNEL_NAME_PROVIDED ?= "${@
> d.getVar('BPN').partition('linux-')[2]}"
>
> # Determine cross-profile override
> python() {
> - if d.getVar("DISTRO_ARCH") != d.getVar("HOST_ARCH") and
> d.getVar("ISAR_CROSS_COMPILE", True) == "1" and "class-native" not in
> d.getVar("OVERRIDES", True).split(":"):
> + if d.getVar("DISTRO_ARCH") != d.getVar("HOST_ARCH") and
> bb.utils.to_boolean(d.getVar("ISAR_CROSS_COMPILE")) and "class-
> native" not in d.getVar("OVERRIDES", True).split(":"):
> d.appendVar("OVERRIDES", ":cross-profile")
> }
>
--
Stefan Koch
Siemens AG
www.siemens.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 2/3] linux-custom: use to_boolean when checking ISAR_CROSS_COMPILE
2024-05-13 4:17 ` [PATCH v3 2/3] linux-custom: use to_boolean when checking ISAR_CROSS_COMPILE Adriaan Schmidt
2024-05-13 7:45 ` Koch, Stefan
@ 2024-05-13 9:06 ` Koch, Stefan
1 sibling, 0 replies; 8+ messages in thread
From: Koch, Stefan @ 2024-05-13 9:06 UTC (permalink / raw)
To: Schmidt, Adriaan, isar-users; +Cc: Kiszka, Jan
Good improvement, when this similar cross-profile OVERRIDE is not
needed anymore for module.inc
On Mon, 2024-05-13 at 06:17 +0200, Adriaan Schmidt wrote:
> we've changed style/convention in Isar sometime during the review of
> the
> kbuild series, and this was missed.
>
> Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
> ---
> meta/recipes-kernel/linux/linux-custom.inc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-kernel/linux/linux-custom.inc
> b/meta/recipes-kernel/linux/linux-custom.inc
> index 35c61187..53516ef3 100644
> --- a/meta/recipes-kernel/linux/linux-custom.inc
> +++ b/meta/recipes-kernel/linux/linux-custom.inc
> @@ -97,7 +97,7 @@ KERNEL_NAME_PROVIDED ?= "${@
> d.getVar('BPN').partition('linux-')[2]}"
>
> # Determine cross-profile override
> python() {
> - if d.getVar("DISTRO_ARCH") != d.getVar("HOST_ARCH") and
> d.getVar("ISAR_CROSS_COMPILE", True) == "1" and "class-native" not in
> d.getVar("OVERRIDES", True).split(":"):
> + if d.getVar("DISTRO_ARCH") != d.getVar("HOST_ARCH") and
> bb.utils.to_boolean(d.getVar("ISAR_CROSS_COMPILE")) and "class-
> native" not in d.getVar("OVERRIDES", True).split(":"):
> d.appendVar("OVERRIDES", ":cross-profile")
> }
>
--
Stefan Koch
Siemens AG
www.siemens.com
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-05-13 9:06 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-13 4:17 [PATCH v3 0/3] Kbuild follow-up Adriaan Schmidt
2024-05-13 4:17 ` [PATCH v3 1/3] module.inc: fix kbuild dependency Adriaan Schmidt
2024-05-13 5:24 ` Jan Kiszka
2024-05-13 7:02 ` Jan Kiszka
2024-05-13 4:17 ` [PATCH v3 2/3] linux-custom: use to_boolean when checking ISAR_CROSS_COMPILE Adriaan Schmidt
2024-05-13 7:45 ` Koch, Stefan
2024-05-13 9:06 ` Koch, Stefan
2024-05-13 4:17 ` [PATCH v3 3/3] kbuildtarget.bbclass: add missing license header Adriaan Schmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox