Enable riscv64 in trixie

Message ID 6c4edb8f-ff3d-400c-8b3c-08601ef428b0@siemens.com
State Accepted, archived
Headers show
Series Enable riscv64 in trixie | expand

Commit Message

Jan Kiszka Oct. 18, 2024, 9:56 p.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com>

The build is currently fine, and even crossbuild-essential-riscv64
exists now in upstream. Time to allow this configuration and clean up
our workaround, finally.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 kas/machine/Kconfig                             |  6 +++---
 meta/classes/dpkg-base.bbclass                  |  1 -
 meta/classes/sdk.bbclass                        |  1 -
 meta/conf/distro/debian-trixie.conf             |  4 ++--
 .../crossbuild-essential-riscv64_0.2-isar.bb    | 17 -----------------
 5 files changed, 5 insertions(+), 24 deletions(-)
 delete mode 100644 meta/recipes-devtools/crossbuild-essential-riscv64/crossbuild-essential-riscv64_0.2-isar.bb

Comments

Uladzimir Bely Oct. 23, 2024, 10:01 a.m. UTC | #1
On Fri, 2024-10-18 at 23:56 +0200, 'Jan Kiszka' via isar-users wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> The build is currently fine, and even crossbuild-essential-riscv64
> exists now in upstream. Time to allow this configuration and clean up
> our workaround, finally.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  kas/machine/Kconfig                             |  6 +++---
>  meta/classes/dpkg-base.bbclass                  |  1 -
>  meta/classes/sdk.bbclass                        |  1 -
>  meta/conf/distro/debian-trixie.conf             |  4 ++--
>  .../crossbuild-essential-riscv64_0.2-isar.bb    | 17 ---------------
> --
>  5 files changed, 5 insertions(+), 24 deletions(-)
>  delete mode 100644 meta/recipes-devtools/crossbuild-essential-
> riscv64/crossbuild-essential-riscv64_0.2-isar.bb
> 
> diff --git a/kas/machine/Kconfig b/kas/machine/Kconfig
> index d7115cf4..4c3866a2 100644
> --- a/kas/machine/Kconfig
> +++ b/kas/machine/Kconfig
> @@ -72,7 +72,7 @@ config MACHINE_QEMU_MIPSEL
>  
>  config MACHINE_QEMU_RISCV64
>  	bool "qemuriscv64"
> -	depends on DEBIAN_SID
> +	depends on DEBIAN_TRIXIE || DEBIAN_SID
>  
>  config MACHINE_RPI_ARM_V7
>  	bool "rpi-arm-v7"
> @@ -92,11 +92,11 @@ config MACHINE_RPI_ARM64_V8
>  
>  config MACHINE_SIFIVE_FU540
>  	bool "sifive-fu540"
> -	depends on DEBIAN_SID
> +	depends on DEBIAN_TRIXIE || DEBIAN_SID
>  
>  config MACHINE_STARFIVE_VISIONFIVE2
>  	bool "starfive-visionfive2"
> -	depends on DEBIAN_SID
> +	depends on DEBIAN_TRIXIE || DEBIAN_SID
>  
>  config MACHINE_STM32MP15X
>  	bool "stm32mp15x"
> diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-
> base.bbclass
> index 008afa75..967b4da2 100644
> --- a/meta/classes/dpkg-base.bbclass
> +++ b/meta/classes/dpkg-base.bbclass
> @@ -15,7 +15,6 @@ inherit essential
>  DEPENDS ?= ""
>  RPROVIDES ?= "${PROVIDES}"
>  
> -DEPENDS:append:riscv64 = "${@' crossbuild-essential-riscv64' if
> bb.utils.to_boolean(d.getVar('ISAR_CROSS_COMPILE')) and
> d.getVar('PN') != 'crossbuild-essential-riscv64' else ''}"
>  DEB_BUILD_PROFILES ?= ""
>  DEB_BUILD_OPTIONS ?= ""
>  
> diff --git a/meta/classes/sdk.bbclass b/meta/classes/sdk.bbclass
> index ef9c03b2..c69f7096 100644
> --- a/meta/classes/sdk.bbclass
> +++ b/meta/classes/sdk.bbclass
> @@ -64,7 +64,6 @@ TAR_TRANSFORM:class-sdk = " --
> transform='s|rootfs|${IMAGE_FULLNAME}|'"
>  
>  # bitbake dependencies
>  SDKDEPENDS += "sdk-files ${SDK_INSTALL}"
> -SDKDEPENDS:append:riscv64 = "${@' crossbuild-essential-riscv64' if
> bb.utils.to_boolean(d.getVar('ISAR_CROSS_COMPILE')) and
> d.getVar('PN') != 'crossbuild-essential-riscv64' else ''}"
>  DEPENDS:class-sdk = "${SDKDEPENDS}"
>  
>  SDKROOTFSDEPENDS = ""
> diff --git a/meta/conf/distro/debian-trixie.conf
> b/meta/conf/distro/debian-trixie.conf
> index f265b233..2df4f827 100644
> --- a/meta/conf/distro/debian-trixie.conf
> +++ b/meta/conf/distro/debian-trixie.conf
> @@ -11,8 +11,8 @@ HOST_DISTRO ?= "debian-${BASE_DISTRO_CODENAME}"
>  
>  DISTRO_CONFIG_SCRIPT ?= "debian-configscript.sh"
>  DISTRO_KERNELS ?= "5kc-malta 686 686-pae amd64 arm64 armmp armmp-
> lpae \
> -        cloud-amd64 cloud-arm64 loongson-3 mips64r2el octeon
> powerpc64le rpi \
> -        rt-686-pae rt-amd64 rt-arm64 rt-armmp s390x"
> +        cloud-amd64 cloud-arm64 loongson-3 mips64r2el octeon
> powerpc64le \
> +        riscv64 rpi rt-686-pae rt-amd64 rt-arm64 rt-armmp s390x"
>  
>  DISTRO_GCC = "13"
>  
> diff --git a/meta/recipes-devtools/crossbuild-essential-
> riscv64/crossbuild-essential-riscv64_0.2-isar.bb b/meta/recipes-
> devtools/crossbuild-essential-riscv64/crossbuild-essential-
> riscv64_0.2-isar.bb
> deleted file mode 100644
> index c5092146..00000000
> --- a/meta/recipes-devtools/crossbuild-essential-riscv64/crossbuild-
> essential-riscv64_0.2-isar.bb
> +++ /dev/null
> @@ -1,17 +0,0 @@
> -# This software is a part of ISAR.
> -#
> -# Copyright (c) Siemens AG, 2020
> -#
> -# SPDX-License-Identifier: MIT
> -
> -inherit dpkg-raw
> -
> -DPKG_ARCH = "all"
> -# build this package using the host toolchain
> -# to break cyclic dependency in the cross chroot
> -PACKAGE_ARCH = "${HOST_ARCH}"
> -
> -DEBIAN_DEPENDS = " \
> -    gcc-riscv64-linux-gnu, \
> -    g++-riscv64-linux-gnu, \
> -    dpkg-cross"
> -- 
> 2.43.0
> 

Applied to next, thanks.

Patch

diff --git a/kas/machine/Kconfig b/kas/machine/Kconfig
index d7115cf4..4c3866a2 100644
--- a/kas/machine/Kconfig
+++ b/kas/machine/Kconfig
@@ -72,7 +72,7 @@  config MACHINE_QEMU_MIPSEL
 
 config MACHINE_QEMU_RISCV64
 	bool "qemuriscv64"
-	depends on DEBIAN_SID
+	depends on DEBIAN_TRIXIE || DEBIAN_SID
 
 config MACHINE_RPI_ARM_V7
 	bool "rpi-arm-v7"
@@ -92,11 +92,11 @@  config MACHINE_RPI_ARM64_V8
 
 config MACHINE_SIFIVE_FU540
 	bool "sifive-fu540"
-	depends on DEBIAN_SID
+	depends on DEBIAN_TRIXIE || DEBIAN_SID
 
 config MACHINE_STARFIVE_VISIONFIVE2
 	bool "starfive-visionfive2"
-	depends on DEBIAN_SID
+	depends on DEBIAN_TRIXIE || DEBIAN_SID
 
 config MACHINE_STM32MP15X
 	bool "stm32mp15x"
diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
index 008afa75..967b4da2 100644
--- a/meta/classes/dpkg-base.bbclass
+++ b/meta/classes/dpkg-base.bbclass
@@ -15,7 +15,6 @@  inherit essential
 DEPENDS ?= ""
 RPROVIDES ?= "${PROVIDES}"
 
-DEPENDS:append:riscv64 = "${@' crossbuild-essential-riscv64' if bb.utils.to_boolean(d.getVar('ISAR_CROSS_COMPILE')) and d.getVar('PN') != 'crossbuild-essential-riscv64' else ''}"
 DEB_BUILD_PROFILES ?= ""
 DEB_BUILD_OPTIONS ?= ""
 
diff --git a/meta/classes/sdk.bbclass b/meta/classes/sdk.bbclass
index ef9c03b2..c69f7096 100644
--- a/meta/classes/sdk.bbclass
+++ b/meta/classes/sdk.bbclass
@@ -64,7 +64,6 @@  TAR_TRANSFORM:class-sdk = " --transform='s|rootfs|${IMAGE_FULLNAME}|'"
 
 # bitbake dependencies
 SDKDEPENDS += "sdk-files ${SDK_INSTALL}"
-SDKDEPENDS:append:riscv64 = "${@' crossbuild-essential-riscv64' if bb.utils.to_boolean(d.getVar('ISAR_CROSS_COMPILE')) and d.getVar('PN') != 'crossbuild-essential-riscv64' else ''}"
 DEPENDS:class-sdk = "${SDKDEPENDS}"
 
 SDKROOTFSDEPENDS = ""
diff --git a/meta/conf/distro/debian-trixie.conf b/meta/conf/distro/debian-trixie.conf
index f265b233..2df4f827 100644
--- a/meta/conf/distro/debian-trixie.conf
+++ b/meta/conf/distro/debian-trixie.conf
@@ -11,8 +11,8 @@  HOST_DISTRO ?= "debian-${BASE_DISTRO_CODENAME}"
 
 DISTRO_CONFIG_SCRIPT ?= "debian-configscript.sh"
 DISTRO_KERNELS ?= "5kc-malta 686 686-pae amd64 arm64 armmp armmp-lpae \
-        cloud-amd64 cloud-arm64 loongson-3 mips64r2el octeon powerpc64le rpi \
-        rt-686-pae rt-amd64 rt-arm64 rt-armmp s390x"
+        cloud-amd64 cloud-arm64 loongson-3 mips64r2el octeon powerpc64le \
+        riscv64 rpi rt-686-pae rt-amd64 rt-arm64 rt-armmp s390x"
 
 DISTRO_GCC = "13"
 
diff --git a/meta/recipes-devtools/crossbuild-essential-riscv64/crossbuild-essential-riscv64_0.2-isar.bb b/meta/recipes-devtools/crossbuild-essential-riscv64/crossbuild-essential-riscv64_0.2-isar.bb
deleted file mode 100644
index c5092146..00000000
--- a/meta/recipes-devtools/crossbuild-essential-riscv64/crossbuild-essential-riscv64_0.2-isar.bb
+++ /dev/null
@@ -1,17 +0,0 @@ 
-# This software is a part of ISAR.
-#
-# Copyright (c) Siemens AG, 2020
-#
-# SPDX-License-Identifier: MIT
-
-inherit dpkg-raw
-
-DPKG_ARCH = "all"
-# build this package using the host toolchain
-# to break cyclic dependency in the cross chroot
-PACKAGE_ARCH = "${HOST_ARCH}"
-
-DEBIAN_DEPENDS = " \
-    gcc-riscv64-linux-gnu, \
-    g++-riscv64-linux-gnu, \
-    dpkg-cross"