Skip to contentSkip to conversation

package/qemu: rewrite BR2_PACKAGE_QEMU_ARCH_SUPPORTS_TARGET to be more readable

PATCH Applied Romain Naour 2 participants 3 messages May 2, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/qemu: rewrite BR2_PACKAGE_QEMU_ARCH_SUPPORTS_TARGET to be more readable

Use the same format introduced for BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS in commit 65e05cd914c895461a65ebdf901f991585529005.

---
 package/qemu/Config.in | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
package/qemu/Config.in +8 -3
index 7bb203a177..1afbc6c364 100644
@@ -1,9 +1,14 @@
 config BR2_PACKAGE_QEMU_ARCH_SUPPORTS_TARGET
 	bool
 	# Only tested on these architectures
-	default y if BR2_aarch64 || BR2_i386 || BR2_mips || BR2_mipsel \
-		|| BR2_x86_64 || BR2_arm \
-		|| BR2_powerpc64 || BR2_powerpc64le
+	default y if BR2_aarch64
+	default y if BR2_arm
+	default y if BR2_i386
+	default y if BR2_mips
+	default y if BR2_mipsel
+	default y if BR2_powerpc64
+	default y if BR2_powerpc64le
+	default y if BR2_x86_64
 
 comment "QEMU requires a toolchain with wchar, threads, gcc >= 8"
 	depends on BR2_PACKAGE_QEMU_ARCH_SUPPORTS_TARGET
Signature · 6 lines
2.35.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 2/2 package/qemu: bump to version 7.0.0

Remove upstream patch 0002-build-disable-fcf-protection-on-march-486-m16.patch

Handle new or removed configure options:
- disable dbus-display
- remove libxml2 configure option

Support for for ARMv4 and ARMv5 hosts has been dropped, Qemu target package needs at least ARMv6. The architecture test is done at runtime, so qemu package for ARMv4 or ARMv5 target would build but will error out at runtime:
https://git.qemu.org/?p=qemu.git;a=commitdiff;h=01dfc0ed7f2c5f8dbab65f31228a2888c7b85a07

See:
https://wiki.qemu.org/ChangeLog/7.0

Runtime tested in gitlab:
https://gitlab.com/kubu93/buildroot/-/pipelines/520991787

Add a new patch fixing the build with seccomp support enabled.

---
 ...fp-disable-fp-bench-build-by-default.patch |  8 +--
 ...able-fcf-protection-on-march-486-m16.patch | 50 -------------------
 ...comp.c-add-missing-header-for-CLONE_.patch | 42 ++++++++++++++++
 package/qemu/Config.in                        |  2 +-
 package/qemu/qemu.hash                        |  2 +-
 package/qemu/qemu.mk                          |  5 +-
 6 files changed, 51 insertions(+), 58 deletions(-)
 delete mode 100644 package/qemu/0002-build-disable-fcf-protection-on-march-486-m16.patch
 create mode 100644 package/qemu/0002-softmmu-qemu-seccomp.c-add-missing-header-for-CLONE_.patch
package/qemu/0001-tests-fp-disable-fp-bench-build-by-default.patch +4 -4
index 9bc8d43d59..60518bcfa3 100644
@@ -1,4 +1,4 @@
-From f82238299d3c4cd23ca60cfc0cf4271f5c860873 Mon Sep 17 00:00:00 2001
+From 83d976d6d7f0357659d5daa0f01c52048a609e88 Mon Sep 17 00:00:00 2001
 From: Romain Naour <[email protected]>
 Date: Wed, 25 Aug 2021 21:55:53 +0200
 Subject: [PATCH] tests/fp: disable fp-bench build by default
@@ -12,10 +12,10 @@ Signed-off-by: Romain Naour <[email protected]>
  1 file changed, 1 insertion(+)
 
 diff --git a/tests/fp/meson.build b/tests/fp/meson.build
-index 07e2cdc8d2..c96460b7f1 100644
+index 8bd0979f67..2fe019d2c6 100644
 --- a/tests/fp/meson.build
 +++ b/tests/fp/meson.build
-@@ -631,6 +631,7 @@ fpbench = executable(
+@@ -636,6 +636,7 @@ fpbench = executable(
    dependencies: [qemuutil],
    include_directories: [sfinc, include_directories(tfdir)],
    c_args: fpcflags,
@@ -24,5 +24,5 @@ index 07e2cdc8d2..c96460b7f1 100644
  
  fptestlog2 = executable(
 -- 
-2.31.1
+2.35.1
 
package/qemu/0002-build-disable-fcf-protection-on-march-486-m16.patch deleted +0 -50

50 lines not on this page · raw message

package/qemu/0002-softmmu-qemu-seccomp.c-add-missing-header-for-CLONE_.patch new file +42 -0

42 lines not on this page · raw message

package/qemu/Config.in +1 -1
index 1afbc6c364..e960a062cb 100644
@@ -2,7 +2,7 @@ config BR2_PACKAGE_QEMU_ARCH_SUPPORTS_TARGET
 	bool
 	# Only tested on these architectures
 	default y if BR2_aarch64
-	default y if BR2_arm
+	default y if BR2_arm && !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV5
 	default y if BR2_i386
 	default y if BR2_mips
 	default y if BR2_mipsel
package/qemu/qemu.hash +1 -1
index 9411832384..9c1a85a347 100644
@@ -1,4 +1,4 @@
 # Locally computed, tarball verified with GPG signature
-sha256  68e15d8e45ac56326e0b9a4afa8b49a3dfe8aba3488221d098c84698bca65b45  qemu-6.2.0.tar.xz
+sha256  f6b375c7951f728402798b0baabb2d86478ca53d44cedbefabbe1c46bf46f839  qemu-7.0.0.tar.xz
 sha256  6f04ae8364d0079a192b14635f4b1da294ce18724c034c39a6a41d1b09df6100  COPYING
 sha256  dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551  COPYING.LIB
package/qemu/qemu.mk +3 -2
index e69e813059..9c2b819174 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-QEMU_VERSION = 6.2.0
+QEMU_VERSION = 7.0.0
 QEMU_SOURCE = qemu-$(QEMU_VERSION).tar.xz
 QEMU_SITE = http://download.qemu.org
 QEMU_LICENSE = GPL-2.0, LGPL-2.1, MIT, BSD-3-Clause, BSD-2-Clause, Others/BSD-1c
@@ -197,12 +197,12 @@ define QEMU_CONFIGURE_CMDS
 			--disable-coreaudio \
 			--disable-curl \
 			--disable-curses \
+			--disable-dbus-display \
 			--disable-docs \
 			--disable-dsound \
 			--disable-hvf \
 			--disable-jack \
 			--disable-libiscsi \
-			--disable-libxml2 \
 			--disable-linux-aio \
 			--disable-linux-io-uring \
 			--disable-malloc-trim \
@@ -369,6 +369,7 @@ define HOST_QEMU_CONFIGURE_CMDS
 		--disable-containers \
 		--disable-coreaudio \
 		--disable-curl \
+		--disable-dbus-display \
 		--disable-docs \
 		--disable-dsound \
 		--disable-jack \
Signature · 6 lines
2.35.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
In reply to Romain Naour
Quoted 4 lines · Romain Naour

Use the same format introduced for BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS in commit 65e05cd914c895461a65ebdf901f991585529005.

Applied both to master, thanks.

Regards,
Arnout

Quoted 16 lines
---
  package/qemu/Config.in | 11 ++++++++---
  1 file changed, 8 insertions(+), 3 deletions(-)
package/qemu/Config.in +1 -3
index 7bb203a177..1afbc6c364 100644
@@ -1,9 +1,14 @@
  config BR2_PACKAGE_QEMU_ARCH_SUPPORTS_TARGET
  	bool
  	# Only tested on these architectures
-	default y if BR2_aarch64 || BR2_i386 || BR2_mips || BR2_mipsel \
-		|| BR2_x86_64 || BR2_arm \
-		|| BR2_powerpc64 || BR2_powerpc64le
+	default y if BR2_aarch64

package/qemu/Config.in line 14

Quoted 10 lines
package/qemu/Config.in +7 -0
+	default y if BR2_arm
+	default y if BR2_i386
+	default y if BR2_mips
+	default y if BR2_mipsel
+	default y if BR2_powerpc64
+	default y if BR2_powerpc64le
+	default y if BR2_x86_64
 
  comment "QEMU requires a toolchain with wchar, threads, gcc >= 8"
  	depends on BR2_PACKAGE_QEMU_ARCH_SUPPORTS_TARGET

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot