* [PATCH 1/7] Revert "base: Fix HOST_ARCH for native builds"
2023-10-05 18:31 [PATCH 0/7] HOST_ARCH, -native, riscv64, and all the rest Jan Kiszka
@ 2023-10-05 18:31 ` Jan Kiszka
2023-10-06 5:44 ` Uladzimir Bely
2023-10-06 6:04 ` Uladzimir Bely
2023-10-05 18:31 ` [PATCH 2/7] multiarch: Downgrade native dependencies when building in emulated environment Jan Kiszka
` (5 subsequent siblings)
6 siblings, 2 replies; 14+ messages in thread
From: Jan Kiszka @ 2023-10-05 18:31 UTC (permalink / raw)
To: isar-users; +Cc: Adriaan Schmidt, Felix Moessbauer, Uladzimir Bely
From: Jan Kiszka <jan.kiszka@siemens.com>
This reverts commit 7bc68bb27f562257977bb5f701564ab08d4c5b3a.
It was the wrong assumption that HOST_ARCH should depend on
ISAR_CROSS_COMPILE - too much code assumes that it is statically bound
to the builder machine. Instead, code that needs effective builder
arch should use BUILD_HOST_ARCH.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta/classes/base.bbclass | 6 ++----
meta/classes/imagetypes.bbclass | 6 ++----
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index f315a9d5..88004120 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -49,15 +49,13 @@ def oe_import(d):
# We need the oe module name space early (before INHERITs get added)
OE_IMPORTED := "${@oe_import(d)}"
-def get_deb_host_arch(d):
+def get_deb_host_arch():
import subprocess
- if d.getVar("ISAR_CROSS_COMPILE") != "1":
- return d.getVar("DISTRO_ARCH")
host_arch = subprocess.check_output(
["dpkg", "--print-architecture"]
).decode('utf-8').strip()
return host_arch
-HOST_ARCH ??= "${@get_deb_host_arch(d)}"
+HOST_ARCH ??= "${@get_deb_host_arch()}"
HOST_DISTRO ??= "${DISTRO}"
die() {
diff --git a/meta/classes/imagetypes.bbclass b/meta/classes/imagetypes.bbclass
index 205377b1..a3be0a1d 100644
--- a/meta/classes/imagetypes.bbclass
+++ b/meta/classes/imagetypes.bbclass
@@ -65,10 +65,8 @@ UBIFS_IMG ?= "${PP_DEPLOY}/${IMAGE_FULLNAME}.ubifs"
# glibc bug 23960 https://sourceware.org/bugzilla/show_bug.cgi?id=23960
# should not use QEMU on armhf target with mkfs.ubifs < v2.1.3
-python() {
- if d.getVar('DISTRO_ARCH') == 'armhf' and bb.utils.contains('IMAGE_BASETYPES', 'ubifs', True, False, d):
- d.setVar('ISAR_CROSS_COMPILE', '1')
-}
+THIS_ISAR_CROSS_COMPILE := "${ISAR_CROSS_COMPILE}"
+ISAR_CROSS_COMPILE:armhf = "${@bb.utils.contains('IMAGE_BASETYPES', 'ubifs', '1', '${THIS_ISAR_CROSS_COMPILE}', d)}"
IMAGE_CMD:ubifs() {
${SUDO_CHROOT} /usr/sbin/mkfs.ubifs ${MKUBIFS_ARGS} \
--
2.35.3
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/7] Revert "base: Fix HOST_ARCH for native builds"
2023-10-05 18:31 ` [PATCH 1/7] Revert "base: Fix HOST_ARCH for native builds" Jan Kiszka
@ 2023-10-06 5:44 ` Uladzimir Bely
2023-10-06 5:59 ` Jan Kiszka
2023-10-06 6:04 ` Uladzimir Bely
1 sibling, 1 reply; 14+ messages in thread
From: Uladzimir Bely @ 2023-10-06 5:44 UTC (permalink / raw)
To: Jan Kiszka, isar-users
On Thu, 2023-10-05 at 20:31 +0200, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> This reverts commit 7bc68bb27f562257977bb5f701564ab08d4c5b3a.
>
> It was the wrong assumption that HOST_ARCH should depend on
> ISAR_CROSS_COMPILE - too much code assumes that it is statically
> bound
> to the builder machine. Instead, code that needs effective builder
> arch should use BUILD_HOST_ARCH.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> meta/classes/base.bbclass | 6 ++----
> meta/classes/imagetypes.bbclass | 6 ++----
> 2 files changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
> index f315a9d5..88004120 100644
> --- a/meta/classes/base.bbclass
> +++ b/meta/classes/base.bbclass
> @@ -49,15 +49,13 @@ def oe_import(d):
> # We need the oe module name space early (before INHERITs get added)
> OE_IMPORTED := "${@oe_import(d)}"
>
> -def get_deb_host_arch(d):
> +def get_deb_host_arch():
> import subprocess
> - if d.getVar("ISAR_CROSS_COMPILE") != "1":
> - return d.getVar("DISTRO_ARCH")
> host_arch = subprocess.check_output(
> ["dpkg", "--print-architecture"]
> ).decode('utf-8').strip()
> return host_arch
> -HOST_ARCH ??= "${@get_deb_host_arch(d)}"
> +HOST_ARCH ??= "${@get_deb_host_arch()}"
> HOST_DISTRO ??= "${DISTRO}"
>
> die() {
> diff --git a/meta/classes/imagetypes.bbclass
> b/meta/classes/imagetypes.bbclass
> index 205377b1..a3be0a1d 100644
> --- a/meta/classes/imagetypes.bbclass
> +++ b/meta/classes/imagetypes.bbclass
> @@ -65,10 +65,8 @@ UBIFS_IMG ?=
> "${PP_DEPLOY}/${IMAGE_FULLNAME}.ubifs"
>
> # glibc bug 23960
> https://sourceware.org/bugzilla/show_bug.cgi?id=23960
> # should not use QEMU on armhf target with mkfs.ubifs < v2.1.3
> -python() {
> - if d.getVar('DISTRO_ARCH') == 'armhf' and
> bb.utils.contains('IMAGE_BASETYPES', 'ubifs', True, False, d):
> - d.setVar('ISAR_CROSS_COMPILE', '1')
> -}
> +THIS_ISAR_CROSS_COMPILE := "${ISAR_CROSS_COMPILE}"
> +ISAR_CROSS_COMPILE:armhf = "${@bb.utils.contains('IMAGE_BASETYPES',
> 'ubifs', '1', '${THIS_ISAR_CROSS_COMPILE}', d)}"
>
> IMAGE_CMD:ubifs() {
> ${SUDO_CHROOT} /usr/sbin/mkfs.ubifs ${MKUBIFS_ARGS} \
To bring CI to working state again, we tend to apply this revert today.
(as soon as possible). Is it OK?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/7] Revert "base: Fix HOST_ARCH for native builds"
2023-10-06 5:44 ` Uladzimir Bely
@ 2023-10-06 5:59 ` Jan Kiszka
0 siblings, 0 replies; 14+ messages in thread
From: Jan Kiszka @ 2023-10-06 5:59 UTC (permalink / raw)
To: Uladzimir Bely, isar-users
On 06.10.23 07:44, Uladzimir Bely wrote:
> On Thu, 2023-10-05 at 20:31 +0200, Jan Kiszka wrote:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> This reverts commit 7bc68bb27f562257977bb5f701564ab08d4c5b3a.
>>
>> It was the wrong assumption that HOST_ARCH should depend on
>> ISAR_CROSS_COMPILE - too much code assumes that it is statically
>> bound
>> to the builder machine. Instead, code that needs effective builder
>> arch should use BUILD_HOST_ARCH.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>> meta/classes/base.bbclass | 6 ++----
>> meta/classes/imagetypes.bbclass | 6 ++----
>> 2 files changed, 4 insertions(+), 8 deletions(-)
>>
>> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
>> index f315a9d5..88004120 100644
>> --- a/meta/classes/base.bbclass
>> +++ b/meta/classes/base.bbclass
>> @@ -49,15 +49,13 @@ def oe_import(d):
>> # We need the oe module name space early (before INHERITs get added)
>> OE_IMPORTED := "${@oe_import(d)}"
>>
>> -def get_deb_host_arch(d):
>> +def get_deb_host_arch():
>> import subprocess
>> - if d.getVar("ISAR_CROSS_COMPILE") != "1":
>> - return d.getVar("DISTRO_ARCH")
>> host_arch = subprocess.check_output(
>> ["dpkg", "--print-architecture"]
>> ).decode('utf-8').strip()
>> return host_arch
>> -HOST_ARCH ??= "${@get_deb_host_arch(d)}"
>> +HOST_ARCH ??= "${@get_deb_host_arch()}"
>> HOST_DISTRO ??= "${DISTRO}"
>>
>> die() {
>> diff --git a/meta/classes/imagetypes.bbclass
>> b/meta/classes/imagetypes.bbclass
>> index 205377b1..a3be0a1d 100644
>> --- a/meta/classes/imagetypes.bbclass
>> +++ b/meta/classes/imagetypes.bbclass
>> @@ -65,10 +65,8 @@ UBIFS_IMG ?=
>> "${PP_DEPLOY}/${IMAGE_FULLNAME}.ubifs"
>>
>> # glibc bug 23960
>> https://sourceware.org/bugzilla/show_bug.cgi?id=23960
>> # should not use QEMU on armhf target with mkfs.ubifs < v2.1.3
>> -python() {
>> - if d.getVar('DISTRO_ARCH') == 'armhf' and
>> bb.utils.contains('IMAGE_BASETYPES', 'ubifs', True, False, d):
>> - d.setVar('ISAR_CROSS_COMPILE', '1')
>> -}
>> +THIS_ISAR_CROSS_COMPILE := "${ISAR_CROSS_COMPILE}"
>> +ISAR_CROSS_COMPILE:armhf = "${@bb.utils.contains('IMAGE_BASETYPES',
>> 'ubifs', '1', '${THIS_ISAR_CROSS_COMPILE}', d)}"
>>
>> IMAGE_CMD:ubifs() {
>> ${SUDO_CHROOT} /usr/sbin/mkfs.ubifs ${MKUBIFS_ARGS} \
>
> To bring CI to working state again, we tend to apply this revert today.
> (as soon as possible). Is it OK?
Sure!
Jan
--
Siemens AG, Technology
Linux Expert Center
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/7] Revert "base: Fix HOST_ARCH for native builds"
2023-10-05 18:31 ` [PATCH 1/7] Revert "base: Fix HOST_ARCH for native builds" Jan Kiszka
2023-10-06 5:44 ` Uladzimir Bely
@ 2023-10-06 6:04 ` Uladzimir Bely
1 sibling, 0 replies; 14+ messages in thread
From: Uladzimir Bely @ 2023-10-06 6:04 UTC (permalink / raw)
To: Jan Kiszka, isar-users; +Cc: Adriaan Schmidt, Felix Moessbauer
On Thu, 2023-10-05 at 20:31 +0200, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> This reverts commit 7bc68bb27f562257977bb5f701564ab08d4c5b3a.
>
> It was the wrong assumption that HOST_ARCH should depend on
> ISAR_CROSS_COMPILE - too much code assumes that it is statically
> bound
> to the builder machine. Instead, code that needs effective builder
> arch should use BUILD_HOST_ARCH.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> meta/classes/base.bbclass | 6 ++----
> meta/classes/imagetypes.bbclass | 6 ++----
> 2 files changed, 4 insertions(+), 8 deletions(-)
>
Revert applied to next, thanks.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 2/7] multiarch: Downgrade native dependencies when building in emulated environment
2023-10-05 18:31 [PATCH 0/7] HOST_ARCH, -native, riscv64, and all the rest Jan Kiszka
2023-10-05 18:31 ` [PATCH 1/7] Revert "base: Fix HOST_ARCH for native builds" Jan Kiszka
@ 2023-10-05 18:31 ` Jan Kiszka
2023-10-05 18:31 ` [PATCH 3/7] meta-isar: jh7110-u-boot-spl-tool: Rely on native annotation Jan Kiszka
` (4 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Jan Kiszka @ 2023-10-05 18:31 UTC (permalink / raw)
To: isar-users; +Cc: Adriaan Schmidt, Felix Moessbauer, Uladzimir Bely
From: Jan Kiszka <jan.kiszka@siemens.com>
When a package that has -native build dependencies is forced into
non-cross building using qemu-user (ie. build arch != distro arch), its
dependency installation will generally fail. That is because
somedep-native will build somedep for the builder arch, not for the
distro arch that is needed during native builds.
Address that automatically by downgrading any such recipe dependency by
stripping for '-native'.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta/classes/multiarch.bbclass | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/meta/classes/multiarch.bbclass b/meta/classes/multiarch.bbclass
index c1846ab0..48cec9ab 100644
--- a/meta/classes/multiarch.bbclass
+++ b/meta/classes/multiarch.bbclass
@@ -21,6 +21,18 @@ python() {
d.appendVar('PROVIDES', f' {pn}-native')
else:
d.appendVar('BBCLASSEXTEND', ' native')
+
+ # drop own -native build dependencies at recipe level if building natively
+ # and not for the builder architecture
+ depends = d.getVar('DEPENDS')
+ if depends is not None and d.getVar('HOST_ARCH') != d.getVar('DISTRO_ARCH') \
+ and d.getVar('ISAR_CROSS_COMPILE') != '1':
+ new_deps = []
+ for dep in depends.split():
+ if dep.endswith('-native'):
+ dep = dep[:-7]
+ new_deps.append(dep)
+ d.setVar('DEPENDS', ' '.join(new_deps))
}
python multiarch_virtclass_handler() {
--
2.35.3
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 3/7] meta-isar: jh7110-u-boot-spl-tool: Rely on native annotation
2023-10-05 18:31 [PATCH 0/7] HOST_ARCH, -native, riscv64, and all the rest Jan Kiszka
2023-10-05 18:31 ` [PATCH 1/7] Revert "base: Fix HOST_ARCH for native builds" Jan Kiszka
2023-10-05 18:31 ` [PATCH 2/7] multiarch: Downgrade native dependencies when building in emulated environment Jan Kiszka
@ 2023-10-05 18:31 ` Jan Kiszka
2023-10-05 18:32 ` [PATCH 4/7] meta-isar: jh7110-u-boot-spl-image: Fix native build Jan Kiszka
` (3 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Jan Kiszka @ 2023-10-05 18:31 UTC (permalink / raw)
To: isar-users; +Cc: Adriaan Schmidt, Felix Moessbauer, Uladzimir Bely
From: Jan Kiszka <jan.kiszka@siemens.com>
Avoids the need to fiddle with the PACKAGE_ARCH in this recipe.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
.../jh7110-u-boot-spl-image/jh7110-u-boot-spl-image_0.1.bb | 4 ++--
.../jh7110-u-boot-spl-tool/jh7110-u-boot-spl-tool_0.1.bb | 3 ---
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/jh7110-u-boot-spl-image_0.1.bb b/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/jh7110-u-boot-spl-image_0.1.bb
index a3258e42..dbce7c28 100644
--- a/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/jh7110-u-boot-spl-image_0.1.bb
+++ b/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/jh7110-u-boot-spl-image_0.1.bb
@@ -8,8 +8,8 @@ inherit dpkg
SRC_URI = "file://rules file://install"
DESCRIPTION = "StarFive VisionFive 2 u-boot SPL"
-DEPENDS = "jh7110-u-boot-spl-tool u-boot-starfive-visionfive2"
-DEBIAN_BUILD_DEPENDS = "jh7110-u-boot-spl-tool, u-boot-starfive-visionfive2:${DISTRO_ARCH}"
+DEPENDS = "jh7110-u-boot-spl-tool-native u-boot-starfive-visionfive2"
+DEBIAN_BUILD_DEPENDS = "jh7110-u-boot-spl-tool:native, u-boot-starfive-visionfive2:${DISTRO_ARCH}"
# this is a host tool
PACKAGE_ARCH = "${HOST_ARCH}"
diff --git a/meta-isar/recipes-bsp/jh7110-u-boot-spl-tool/jh7110-u-boot-spl-tool_0.1.bb b/meta-isar/recipes-bsp/jh7110-u-boot-spl-tool/jh7110-u-boot-spl-tool_0.1.bb
index fefcbf66..292334f6 100644
--- a/meta-isar/recipes-bsp/jh7110-u-boot-spl-tool/jh7110-u-boot-spl-tool_0.1.bb
+++ b/meta-isar/recipes-bsp/jh7110-u-boot-spl-tool/jh7110-u-boot-spl-tool_0.1.bb
@@ -13,9 +13,6 @@ SRCREV = "8c5acc4e5eb7e4ad012463b05a5e3dbbfed1c38d"
S = "${WORKDIR}/tools/spl_tool"
-# This is a host tool
-PACKAGE_ARCH = "${HOST_ARCH}"
-
do_prepare_build[cleandirs] += "${S}/debian"
do_prepare_build(){
deb_debianize
--
2.35.3
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 4/7] meta-isar: jh7110-u-boot-spl-image: Fix native build
2023-10-05 18:31 [PATCH 0/7] HOST_ARCH, -native, riscv64, and all the rest Jan Kiszka
` (2 preceding siblings ...)
2023-10-05 18:31 ` [PATCH 3/7] meta-isar: jh7110-u-boot-spl-tool: Rely on native annotation Jan Kiszka
@ 2023-10-05 18:32 ` Jan Kiszka
2023-10-06 5:52 ` Uladzimir Bely
2023-10-05 18:32 ` [PATCH 5/7] meta-isar: u-boot-starfive-visionfive2: Simplify build dependencies Jan Kiszka
` (2 subsequent siblings)
6 siblings, 1 reply; 14+ messages in thread
From: Jan Kiszka @ 2023-10-05 18:32 UTC (permalink / raw)
To: isar-users; +Cc: Adriaan Schmidt, Felix Moessbauer, Uladzimir Bely
From: Jan Kiszka <jan.kiszka@siemens.com>
In general, recipes must not use HOST_ARCH because it does not account
for ISAR_CROSS_COMPILE being enabled or disabled. This is encoded into
BUILD_HOST_ARCH, though.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
.../jh7110-u-boot-spl-image/jh7110-u-boot-spl-image_0.1.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/jh7110-u-boot-spl-image_0.1.bb b/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/jh7110-u-boot-spl-image_0.1.bb
index dbce7c28..cd31c9ca 100644
--- a/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/jh7110-u-boot-spl-image_0.1.bb
+++ b/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/jh7110-u-boot-spl-image_0.1.bb
@@ -12,7 +12,7 @@ DEPENDS = "jh7110-u-boot-spl-tool-native u-boot-starfive-visionfive2"
DEBIAN_BUILD_DEPENDS = "jh7110-u-boot-spl-tool:native, u-boot-starfive-visionfive2:${DISTRO_ARCH}"
# this is a host tool
-PACKAGE_ARCH = "${HOST_ARCH}"
+PACKAGE_ARCH = "${BUILD_HOST_ARCH}"
do_prepare_build[cleandirs] += "${S}/debian"
do_prepare_build(){
--
2.35.3
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 4/7] meta-isar: jh7110-u-boot-spl-image: Fix native build
2023-10-05 18:32 ` [PATCH 4/7] meta-isar: jh7110-u-boot-spl-image: Fix native build Jan Kiszka
@ 2023-10-06 5:52 ` Uladzimir Bely
2023-10-06 6:00 ` Jan Kiszka
0 siblings, 1 reply; 14+ messages in thread
From: Uladzimir Bely @ 2023-10-06 5:52 UTC (permalink / raw)
To: Jan Kiszka, isar-users
On Thu, 2023-10-05 at 20:32 +0200, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> In general, recipes must not use HOST_ARCH because it does not
> account
> for ISAR_CROSS_COMPILE being enabled or disabled. This is encoded
> into
> BUILD_HOST_ARCH, though.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> .../jh7110-u-boot-spl-image/jh7110-u-boot-spl-image_0.1.bb | 2
> +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/jh7110-u-
> boot-spl-image_0.1.bb b/meta-isar/recipes-bsp/jh7110-u-boot-spl-
> image/jh7110-u-boot-spl-image_0.1.bb
> index dbce7c28..cd31c9ca 100644
> --- a/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/jh7110-u-boot-
> spl-image_0.1.bb
> +++ b/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/jh7110-u-boot-
> spl-image_0.1.bb
> @@ -12,7 +12,7 @@ DEPENDS = "jh7110-u-boot-spl-tool-native u-boot-
> starfive-visionfive2"
> DEBIAN_BUILD_DEPENDS = "jh7110-u-boot-spl-tool:native, u-boot-
> starfive-visionfive2:${DISTRO_ARCH}"
>
> # this is a host tool
> -PACKAGE_ARCH = "${HOST_ARCH}"
> +PACKAGE_ARCH = "${BUILD_HOST_ARCH}"
>
What do you think about renaming variable BUILD_HOST_ARCH to BUILD_ARCH
in Isar? While it's not yet widely used in the recipes, it would better
to do it earlier.
It is an internal Isar variable and renaming should not affect any
downstreams. Renaming should make us a bit closer to OE, where
BUILD_ARCH has the same meaning.
Additionally, it would fix the issue with sstate-cache and "-native"
packages ( https://groups.google.com/g/isar-users/c/2TNQPOb0IXY ).
> do_prepare_build[cleandirs] += "${S}/debian"
> do_prepare_build(){
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 4/7] meta-isar: jh7110-u-boot-spl-image: Fix native build
2023-10-06 5:52 ` Uladzimir Bely
@ 2023-10-06 6:00 ` Jan Kiszka
2023-10-06 6:06 ` Uladzimir Bely
0 siblings, 1 reply; 14+ messages in thread
From: Jan Kiszka @ 2023-10-06 6:00 UTC (permalink / raw)
To: Uladzimir Bely, isar-users
On 06.10.23 07:52, Uladzimir Bely wrote:
> On Thu, 2023-10-05 at 20:32 +0200, Jan Kiszka wrote:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> In general, recipes must not use HOST_ARCH because it does not
>> account
>> for ISAR_CROSS_COMPILE being enabled or disabled. This is encoded
>> into
>> BUILD_HOST_ARCH, though.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>> .../jh7110-u-boot-spl-image/jh7110-u-boot-spl-image_0.1.bb | 2
>> +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/jh7110-u-
>> boot-spl-image_0.1.bb b/meta-isar/recipes-bsp/jh7110-u-boot-spl-
>> image/jh7110-u-boot-spl-image_0.1.bb
>> index dbce7c28..cd31c9ca 100644
>> --- a/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/jh7110-u-boot-
>> spl-image_0.1.bb
>> +++ b/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/jh7110-u-boot-
>> spl-image_0.1.bb
>> @@ -12,7 +12,7 @@ DEPENDS = "jh7110-u-boot-spl-tool-native u-boot-
>> starfive-visionfive2"
>> DEBIAN_BUILD_DEPENDS = "jh7110-u-boot-spl-tool:native, u-boot-
>> starfive-visionfive2:${DISTRO_ARCH}"
>>
>> # this is a host tool
>> -PACKAGE_ARCH = "${HOST_ARCH}"
>> +PACKAGE_ARCH = "${BUILD_HOST_ARCH}"
>>
>
> What do you think about renaming variable BUILD_HOST_ARCH to BUILD_ARCH
> in Isar? While it's not yet widely used in the recipes, it would better
> to do it earlier.
>
> It is an internal Isar variable and renaming should not affect any
> downstreams. Renaming should make us a bit closer to OE, where
> BUILD_ARCH has the same meaning.
>
I was also thinking about this, yes. Should I include such a patch in my
series?
Jan
> Additionally, it would fix the issue with sstate-cache and "-native"
> packages ( https://groups.google.com/g/isar-users/c/2TNQPOb0IXY ).
>
>> do_prepare_build[cleandirs] += "${S}/debian"
>> do_prepare_build(){
>
--
Siemens AG, Technology
Linux Expert Center
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 4/7] meta-isar: jh7110-u-boot-spl-image: Fix native build
2023-10-06 6:00 ` Jan Kiszka
@ 2023-10-06 6:06 ` Uladzimir Bely
0 siblings, 0 replies; 14+ messages in thread
From: Uladzimir Bely @ 2023-10-06 6:06 UTC (permalink / raw)
To: Jan Kiszka, isar-users
On Fri, 2023-10-06 at 08:00 +0200, Jan Kiszka wrote:
> On 06.10.23 07:52, Uladzimir Bely wrote:
> > On Thu, 2023-10-05 at 20:32 +0200, Jan Kiszka wrote:
> > > From: Jan Kiszka <jan.kiszka@siemens.com>
> > >
> > > In general, recipes must not use HOST_ARCH because it does not
> > > account
> > > for ISAR_CROSS_COMPILE being enabled or disabled. This is encoded
> > > into
> > > BUILD_HOST_ARCH, though.
> > >
> > > Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> > > ---
> > > .../jh7110-u-boot-spl-image/jh7110-u-boot-spl-image_0.1.bb
> > > | 2
> > > +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/meta-isar/recipes-bsp/jh7110-u-boot-spl-
> > > image/jh7110-u-
> > > boot-spl-image_0.1.bb b/meta-isar/recipes-bsp/jh7110-u-boot-spl-
> > > image/jh7110-u-boot-spl-image_0.1.bb
> > > index dbce7c28..cd31c9ca 100644
> > > --- a/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/jh7110-u-
> > > boot-
> > > spl-image_0.1.bb
> > > +++ b/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/jh7110-u-
> > > boot-
> > > spl-image_0.1.bb
> > > @@ -12,7 +12,7 @@ DEPENDS = "jh7110-u-boot-spl-tool-native u-
> > > boot-
> > > starfive-visionfive2"
> > > DEBIAN_BUILD_DEPENDS = "jh7110-u-boot-spl-tool:native, u-boot-
> > > starfive-visionfive2:${DISTRO_ARCH}"
> > >
> > > # this is a host tool
> > > -PACKAGE_ARCH = "${HOST_ARCH}"
> > > +PACKAGE_ARCH = "${BUILD_HOST_ARCH}"
> > >
> >
> > What do you think about renaming variable BUILD_HOST_ARCH to
> > BUILD_ARCH
> > in Isar? While it's not yet widely used in the recipes, it would
> > better
> > to do it earlier.
> >
> > It is an internal Isar variable and renaming should not affect any
> > downstreams. Renaming should make us a bit closer to OE, where
> > BUILD_ARCH has the same meaning.
> >
>
> I was also thinking about this, yes. Should I include such a patch in
> my
> series?
>
Yes, please.
Actually, I've just applied patch1 from the series to 'next', so the
new patch could be first in series v2, so other patches would keep
their numbers.
> Jan
>
> > Additionally, it would fix the issue with sstate-cache and "-
> > native"
> > packages ( https://groups.google.com/g/isar-users/c/2TNQPOb0IXY ).
> >
> > > do_prepare_build[cleandirs] += "${S}/debian"
> > > do_prepare_build(){
> >
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 5/7] meta-isar: u-boot-starfive-visionfive2: Simplify build dependencies
2023-10-05 18:31 [PATCH 0/7] HOST_ARCH, -native, riscv64, and all the rest Jan Kiszka
` (3 preceding siblings ...)
2023-10-05 18:32 ` [PATCH 4/7] meta-isar: jh7110-u-boot-spl-image: Fix native build Jan Kiszka
@ 2023-10-05 18:32 ` Jan Kiszka
2023-10-05 18:32 ` [PATCH 6/7] linux-custom: Drop unused template variable Jan Kiszka
2023-10-05 18:32 ` [PATCH 7/7] Move riscv64 from sid-ports to regular sid Jan Kiszka
6 siblings, 0 replies; 14+ messages in thread
From: Jan Kiszka @ 2023-10-05 18:32 UTC (permalink / raw)
To: isar-users; +Cc: Adriaan Schmidt, Felix Moessbauer, Uladzimir Bely
From: Jan Kiszka <jan.kiszka@siemens.com>
At the risk of adding the same package twice, but apt will be resolve
that, just follow the pattern of others: :native for the build env,
without any suffix for the target.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
.../u-boot/u-boot-starfive-visionfive2_2021.10+VF2-3.0.4.bb | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2021.10+VF2-3.0.4.bb b/meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2021.10+VF2-3.0.4.bb
index 455bee4a..9e1b7251 100644
--- a/meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2021.10+VF2-3.0.4.bb
+++ b/meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2021.10+VF2-3.0.4.bb
@@ -8,9 +8,7 @@ require recipes-bsp/u-boot/u-boot-custom.inc
SRC_URI += "git://github.com/starfive-tech/u-boot.git;nobranch=1;protocol=https;destsuffix=u-boot-${PV}"
SRCREV = "b6e2b0e85c774a18ae668223a6e5f7d335895243"
-DEBIAN_BUILD_DEPENDS .= ", libssl-dev:${DISTRO_ARCH}"
-# when cross compiling, we need the library on the host as well, as the signature computation is done locally
-DEBIAN_BUILD_DEPENDS .= "${@ ', libssl-dev:${HOST_ARCH}' if d.getVar('ISAR_CROSS_COMPILE') == '1' else '' }"
+DEBIAN_BUILD_DEPENDS .= ", libssl-dev, libssl-dev:native"
U_BOOT_CONFIG = "starfive_visionfive2_defconfig"
U_BOOT_BIN = "u-boot.bin"
--
2.35.3
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 6/7] linux-custom: Drop unused template variable
2023-10-05 18:31 [PATCH 0/7] HOST_ARCH, -native, riscv64, and all the rest Jan Kiszka
` (4 preceding siblings ...)
2023-10-05 18:32 ` [PATCH 5/7] meta-isar: u-boot-starfive-visionfive2: Simplify build dependencies Jan Kiszka
@ 2023-10-05 18:32 ` Jan Kiszka
2023-10-05 18:32 ` [PATCH 7/7] Move riscv64 from sid-ports to regular sid Jan Kiszka
6 siblings, 0 replies; 14+ messages in thread
From: Jan Kiszka @ 2023-10-05 18:32 UTC (permalink / raw)
To: isar-users; +Cc: Adriaan Schmidt, Felix Moessbauer, Uladzimir Bely
From: Jan Kiszka <jan.kiszka@siemens.com>
This was never used, in fact.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta/recipes-kernel/linux/linux-custom.inc | 1 -
1 file changed, 1 deletion(-)
diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
index 1897116c..09fb5c85 100644
--- a/meta/recipes-kernel/linux/linux-custom.inc
+++ b/meta/recipes-kernel/linux/linux-custom.inc
@@ -70,7 +70,6 @@ TEMPLATE_FILES += " \
"
TEMPLATE_VARS += " \
- HOST_ARCH \
KBUILD_DEPENDS \
KERNEL_ARCH \
KERNEL_DEBIAN_DEPENDS \
--
2.35.3
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 7/7] Move riscv64 from sid-ports to regular sid
2023-10-05 18:31 [PATCH 0/7] HOST_ARCH, -native, riscv64, and all the rest Jan Kiszka
` (5 preceding siblings ...)
2023-10-05 18:32 ` [PATCH 6/7] linux-custom: Drop unused template variable Jan Kiszka
@ 2023-10-05 18:32 ` Jan Kiszka
6 siblings, 0 replies; 14+ messages in thread
From: Jan Kiszka @ 2023-10-05 18:32 UTC (permalink / raw)
To: isar-users; +Cc: Adriaan Schmidt, Felix Moessbauer, Uladzimir Bely
From: Jan Kiszka <jan.kiszka@siemens.com>
Now that riscv64 is an official Debian arch, sid-ports runs out of sync
with sid. It seems that sid is generally building riscv64 fine, but
cross-compilation will remain broken for a longer while.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
kas/distro/Kconfig | 6 +++---
kas/distro/{debian-sid-ports.yaml => debian-sid.yaml} | 2 +-
kas/machine/Kconfig | 6 +++---
meta-isar/conf/mc.conf | 6 +++---
.../{qemuriscv64-sid-ports.conf => qemuriscv64-sid.conf} | 2 +-
.../{sifive-fu540-sid-ports.conf => sifive-fu540-sid.conf} | 2 +-
...onfive2-sid-ports.conf => starfive-visionfive2-sid.conf} | 2 +-
testsuite/citest.py | 6 +++---
8 files changed, 16 insertions(+), 16 deletions(-)
rename kas/distro/{debian-sid-ports.yaml => debian-sid.yaml} (78%)
rename meta-isar/conf/multiconfig/{qemuriscv64-sid-ports.conf => qemuriscv64-sid.conf} (85%)
rename meta-isar/conf/multiconfig/{sifive-fu540-sid-ports.conf => sifive-fu540-sid.conf} (76%)
rename meta-isar/conf/multiconfig/{starfive-visionfive2-sid-ports.conf => starfive-visionfive2-sid.conf} (78%)
diff --git a/kas/distro/Kconfig b/kas/distro/Kconfig
index bd762a98..5118dff4 100644
--- a/kas/distro/Kconfig
+++ b/kas/distro/Kconfig
@@ -19,8 +19,8 @@ config DEBIAN_BULLSEYE
config DEBIAN_BOOKWORM
bool "Debian Bookworm (12)"
-config DEBIAN_SID_PORTS
- bool "Debian Sid (unstable) with unofficial ports"
+config DEBIAN_SID
+ bool "Debian Sid (unstable)"
config RASPIOS_BULLSEYE
bool "Raspi OS Bullseye (11)"
@@ -38,7 +38,7 @@ config KAS_INCLUDE_DISTRO
default "kas/distro/debian-buster.yaml" if DEBIAN_BUSTER
default "kas/distro/debian-bullseye.yaml" if DEBIAN_BULLSEYE
default "kas/distro/debian-bookworm.yaml" if DEBIAN_BOOKWORM
- default "kas/distro/debian-sid-ports.yaml" if DEBIAN_SID_PORTS
+ default "kas/distro/debian-sid.yaml" if DEBIAN_SID
default "kas/distro/raspios-bullseye.yaml" if RASPIOS_BULLSEYE
default "kas/distro/ubuntu-focal.yaml" if UBUNTU_FOCAL
default "kas/distro/ubuntu-jammy.yaml" if UBUNTU_JAMMY
diff --git a/kas/distro/debian-sid-ports.yaml b/kas/distro/debian-sid.yaml
similarity index 78%
rename from kas/distro/debian-sid-ports.yaml
rename to kas/distro/debian-sid.yaml
index 52993646..43f1c696 100644
--- a/kas/distro/debian-sid-ports.yaml
+++ b/kas/distro/debian-sid.yaml
@@ -4,4 +4,4 @@
header:
version: 14
-distro: debian-sid-ports
+distro: debian-sid
diff --git a/kas/machine/Kconfig b/kas/machine/Kconfig
index 66debfe5..d0e3963a 100644
--- a/kas/machine/Kconfig
+++ b/kas/machine/Kconfig
@@ -68,7 +68,7 @@ config MACHINE_QEMU_MIPSEL
config MACHINE_QEMU_RISCV64
bool "qemuriscv64"
- depends on DEBIAN_SID_PORTS
+ depends on DEBIAN_SID
config MACHINE_RPI_ARM_V7
bool "rpi-arm-v7"
@@ -88,11 +88,11 @@ config MACHINE_RPI_ARM64_V8
config MACHINE_SIFIVE_FU540
bool "sifive-fu540"
- depends on DEBIAN_SID_PORTS
+ depends on DEBIAN_SID
config MACHINE_STARFIVE_VISIONFIVE2
bool "starfive-visionfive2"
- depends on DEBIAN_SID_PORTS
+ depends on DEBIAN_SID
config MACHINE_STM32MP15X
bool "stm32mp15x"
diff --git a/meta-isar/conf/mc.conf b/meta-isar/conf/mc.conf
index 9637bcb1..d16f54b5 100644
--- a/meta-isar/conf/mc.conf
+++ b/meta-isar/conf/mc.conf
@@ -25,7 +25,7 @@ BBMULTICONFIG = " \
qemumipsel-buster \
qemumipsel-bullseye \
qemumipsel-bookworm \
- qemuriscv64-sid-ports \
+ qemuriscv64-sid \
bananapi-buster \
bananapi-bullseye \
de0-nano-soc-buster \
@@ -45,8 +45,8 @@ BBMULTICONFIG = " \
rpi-arm-v7-bullseye \
rpi-arm-v7l-bullseye \
rpi-arm64-v8-bullseye \
- sifive-fu540-sid-ports \
- starfive-visionfive2-sid-ports \
+ sifive-fu540-sid \
+ starfive-visionfive2-sid \
qemuarm64-focal \
qemuarm64-jammy \
qemuamd64-focal \
diff --git a/meta-isar/conf/multiconfig/qemuriscv64-sid-ports.conf b/meta-isar/conf/multiconfig/qemuriscv64-sid.conf
similarity index 85%
rename from meta-isar/conf/multiconfig/qemuriscv64-sid-ports.conf
rename to meta-isar/conf/multiconfig/qemuriscv64-sid.conf
index 2556cf7f..bc691b5b 100644
--- a/meta-isar/conf/multiconfig/qemuriscv64-sid-ports.conf
+++ b/meta-isar/conf/multiconfig/qemuriscv64-sid.conf
@@ -5,4 +5,4 @@
# SPDX-License-Identifier: MIT
MACHINE ?= "qemuriscv64"
-DISTRO ?= "debian-sid-ports"
+DISTRO ?= "debian-sid"
diff --git a/meta-isar/conf/multiconfig/sifive-fu540-sid-ports.conf b/meta-isar/conf/multiconfig/sifive-fu540-sid.conf
similarity index 76%
rename from meta-isar/conf/multiconfig/sifive-fu540-sid-ports.conf
rename to meta-isar/conf/multiconfig/sifive-fu540-sid.conf
index 313032ef..99bb7f3e 100644
--- a/meta-isar/conf/multiconfig/sifive-fu540-sid-ports.conf
+++ b/meta-isar/conf/multiconfig/sifive-fu540-sid.conf
@@ -4,4 +4,4 @@
# SPDX-License-Identifier: MIT
MACHINE ?= "sifive-fu540"
-DISTRO ?= "debian-sid-ports"
+DISTRO ?= "debian-sid"
diff --git a/meta-isar/conf/multiconfig/starfive-visionfive2-sid-ports.conf b/meta-isar/conf/multiconfig/starfive-visionfive2-sid.conf
similarity index 78%
rename from meta-isar/conf/multiconfig/starfive-visionfive2-sid-ports.conf
rename to meta-isar/conf/multiconfig/starfive-visionfive2-sid.conf
index ee42ab4d..603e891f 100644
--- a/meta-isar/conf/multiconfig/starfive-visionfive2-sid-ports.conf
+++ b/meta-isar/conf/multiconfig/starfive-visionfive2-sid.conf
@@ -4,4 +4,4 @@
# SPDX-License-Identifier: MIT
MACHINE ?= "starfive-visionfive2"
-DISTRO ?= "debian-sid-ports"
+DISTRO ?= "debian-sid"
diff --git a/testsuite/citest.py b/testsuite/citest.py
index 7304efe6..81bdeba5 100755
--- a/testsuite/citest.py
+++ b/testsuite/citest.py
@@ -227,10 +227,10 @@ class NoCrossTest(CIBaseTest):
except:
self.cancel('KFAIL')
- def test_nocross_sidports(self):
+ def test_nocross_sid(self):
targets = [
- 'mc:qemuriscv64-sid-ports:isar-image-base',
- 'mc:sifive-fu540-sid-ports:isar-image-base',
+ 'mc:qemuriscv64-sid:isar-image-base',
+ 'mc:sifive-fu540-sid:isar-image-base',
]
self.init()
--
2.35.3
^ permalink raw reply [flat|nested] 14+ messages in thread