qemu.bbclass: drop OLDEST_KERNEL reference
v2 cover qemu.bbclass: drop OLDEST_KERNEL reference
This addresses an issue with allarch recipes that use meson, where inheriting qemu.bbclass causes task signature changes when built with MACHINEs with different architectures due to the reference to the OLDEST_KERNEL variable for setting up qemu wrapper invocations.
V2:
* Backport Khem's qemu patch to set minimum kernel version for riscv32. With this patch, qemu for all supported archs should have a built-in oldest kernel setting, eliminating the need for putting it on the command line.
Matt Madison (2):
qemu.bbclass: drop OLDEST_KERNEL reference
qemu: add patch to set minimum kernel version for riscv32
meta/classes/qemu.bbclass | 2 +- meta/recipes-devtools/qemu/qemu.inc | 1 + ...s-minimum-kernel-version-for-riscv32.patch | 40 +++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-devtools/qemu/qemu/0001-riscv-Set-5.4-as-minimum-kernel-version-for-riscv32.patch
Signature · 1 line
2.32.0
PATCH v2 1/2 qemu.bbclass: drop OLDEST_KERNEL reference
which is introducing task hash changes for some
allarch package builds, and should no longer
be needed with recent versions of qemu.
--- meta/classes/qemu.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/qemu.bbclass +1 -1
@@ -54,7 +54,7 @@ def qemu_run_binary(data, rootfs_path, binary): # this dance). For others (e.g. arm) a -cpu option is not necessary, since the # qemu-arm default CPU supports all required architecture levels. -QEMU_OPTIONS = "-r ${OLDEST_KERNEL} ${@d.getVar("QEMU_EXTRAOPTIONS_%s" % d.getVar('PACKAGE_ARCH')) or ""}" +QEMU_OPTIONS = "${@d.getVar("QEMU_EXTRAOPTIONS_%s" % d.getVar('PACKAGE_ARCH')) or ""}" QEMU_OPTIONS[vardeps] += "QEMU_EXTRAOPTIONS_${PACKAGE_ARCH}" QEMU_EXTRAOPTIONS_ppce500v2 = " -cpu e500v2"
Signature · 1 line
2.32.0
Quoted 16 lines · Matt Madison
[Please note: This e-mail is from an EXTERNAL e-mail address]
which is introducing task hash changes for some
allarch package builds, and should no longer
be needed with recent versions of qemu.Signed-off-by Matt Madison <[email protected]>--- meta/classes/qemu.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/classes/qemu.bbclass +0
-0
meta/classes/qemu.bbclass def qemu_run_binary(data, rootfs_path, binary): · line 57
Quoted 5 lines
meta/classes/qemu.bbclass +1
-1@@ -54,7 +54,7 @@ def qemu_run_binary(data, rootfs_path, binary): # this dance). For others (e.g. arm) a -cpu option is not necessary, since the # qemu-arm default CPU supports all required architecture levels. -QEMU_OPTIONS = "-r ${OLDEST_KERNEL} ${@d.getVar("QEMU_EXTRAOPTIONS_%s" % d.getVar('PACKAGE_ARCH')) or ""}" +QEMU_OPTIONS = "${@d.getVar("QEMU_EXTRAOPTIONS_%s" % d.getVar('PACKAGE_ARCH')) or ""}"
Hi,
Latest yocto still take "CentOS 7.x" as Supported Linux Distributions. But centos7 have kernel version 3.10.
But we have some archs, like aarch64, set OLDEST_KERNEL to 3.14. Without "-r ${OLDEST_KERNEL}",
some recipes which will run qemu during configure or compile will failed with error:
FATAL: kernel too old
How about add it back?
Thanks
Changqing
Quoted 15 lines
meta/classes/qemu.bbclass +0
-1QEMU_OPTIONS[vardeps] += "QEMU_EXTRAOPTIONS_${PACKAGE_ARCH}" QEMU_EXTRAOPTIONS_ppce500v2 = " -cpu e500v2" --2.32.0
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#159782): https://lists.openembedded.org/g/openembedded-core/message/159782
Mute This Topic: https://lists.openembedded.org/mt/87765279/3616873
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
I guess you can add it back through QEMU_EXTRAOPTIONS?
Alex
Quoted 65 lines · Changqing Li
On 12/16/21 7:48 PM, Matt Madison wrote:
[Please note: This e-mail is from an EXTERNAL e-mail address]
which is introducing task hash changes for some
allarch package builds, and should no longer
be needed with recent versions of qemu.Signed-off-by Matt Madison <[email protected]> <[email protected]>--- meta/classes/qemu.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/classes/qemu.bbclass +1
-1@@ -54,7 +54,7 @@ def qemu_run_binary(data, rootfs_path, binary): # this dance). For others (e.g. arm) a -cpu option is not necessary, since the # qemu-arm default CPU supports all required architecture levels. -QEMU_OPTIONS = "-r ${OLDEST_KERNEL} ${@d.getVar("QEMU_EXTRAOPTIONS_%s" % d.getVar('PACKAGE_ARCH')) or ""}" +QEMU_OPTIONS = "${@d.getVar(" <$%[email protected](>QEMU_EXTRAOPTIONS_%s" % d.getVar('PACKAGE_ARCH')) or ""}" Hi,Latest yocto still take "CentOS 7.x" as Supported Linux Distributions. But centos7 have kernel version 3.10.
But we have some archs, like aarch64, set
OLDEST_KERNELto 3.14. Without "-r ${OLDEST_KERNEL}",some recipes which will run qemu during configure or compile will failed with error:
FATAL: kernel too old
How about add it back?
Thanks
Changqing
QEMU_OPTIONS[vardeps] += "QEMU_EXTRAOPTIONS_${PACKAGE_ARCH}"
QEMU_EXTRAOPTIONS_ppce500v2= " -cpu e500v2"
--
2.32.0-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#160058):
https://lists.openembedded.org/g/openembedded-core/message/160058
Mute This Topic: https://lists.openembedded.org/mt/87765279/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 23 lines · Changqing Li
On 12/16/21 7:48 PM, Matt Madison wrote:
Quoted 20 lines
[Please note: This e-mail is from an EXTERNAL e-mail address]
which is introducing task hash changes for some
allarch package builds, and should no longer
be needed with recent versions of qemu.Signed-off-by Matt Madison <[email protected]>---
meta/classes/qemu.bbclass | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)meta/classes/qemu.bbclass +0
-0@@ -54,7 +54,7 @@ def qemu_run_binary(data, rootfs_path, binary): # this dance). For others (e.g. arm) a -cpu option is not necessary, sincethe
# qemu-arm default CPU supports all required architecture levels.
Quoted 14 lines
Quoted 4 lines
-QEMU_OPTIONS = "-r ${OLDEST_KERNEL} ${@d.getVar("QEMU_EXTRAOPTIONS_%s" %
d.getVar('PACKAGE_ARCH')) or ""}"
+QEMU_OPTIONS = "${@d.getVar("QEMU_EXTRAOPTIONS_%s" %d.getVar('PACKAGE_ARCH')) or ""}"Hi,
Latest yocto still take "CentOS 7.x" as Supported Linux Distributions. But centos7 have kernel version 3.10.
But we have some archs, like aarch64, setOLDEST_KERNELto 3.14. Without "-r ${OLDEST_KERNEL}",
some recipes which will run qemu during configure or compile will failed with error:
FATAL: kernel too old
How about add it back?
It was removed for a reason and believed to be no longer needed. Which version of qemu was this with?
Cheers,
Richard
Quoted 39 lines · Richard Purdie
[Please note: This e-mail is from an EXTERNAL e-mail address]
Quoted 22 lines · Changqing Li
Quoted 20 lines · Matt Madison
[Please note: This e-mail is from an EXTERNAL e-mail address]
which is introducing task hash changes for some
allarch package builds, and should no longer
be needed with recent versions of qemu.Signed-off-by Matt Madison <[email protected]>--- meta/classes/qemu.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/classes/qemu.bbclass +0
-0@@ -54,7 +54,7 @@ def qemu_run_binary(data, rootfs_path, binary): # this dance). For others (e.g. arm) a -cpu option is not necessary, sincethe
# qemu-arm default CPU supports all required architecture levels.Quoted 14 lines
Quoted 4 lines
-QEMU_OPTIONS = "-r ${OLDEST_KERNEL} ${@d.getVar("QEMU_EXTRAOPTIONS_%s" %
d.getVar('PACKAGE_ARCH')) or ""}"
+QEMU_OPTIONS = "${@d.getVar("QEMU_EXTRAOPTIONS_%s" %d.getVar('PACKAGE_ARCH')) or ""}"Hi,
Latest yocto still take "CentOS 7.x" as Supported Linux Distributions. But centos7 have kernel version 3.10.
But we have some archs, like aarch64, setOLDEST_KERNELto 3.14. Without "-r ${OLDEST_KERNEL}",
some recipes which will run qemu during configure or compile will failed with error:
FATAL: kernel too old
How about add it back?
Quoted 2 lines
It was removed for a reason and believed to be no longer needed. Which version of qemu was this with?
For aarch64, systemd do_configure failed during run following command:
Running test binary command: tmp-glibc/work/cortexa72-wrs-linux/systemd/1_249.7-r0/meson-qemuwrapper tmp-glibc/work/cortexa72-wrs-linux/systemd/1_249.7-r0/build/meson-private/sanitycheckc_cross.exe
meson-qemuwrapper is wrapper of qemu-aarch64
tmp-glibc/work/cortexa72-wrs-linux/systemd/1_249.7-r0/recipe-sysroot-native/usr/bin/qemu-aarch64 -version *qemu-aarch64 version 6.2.0*
Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers
Quoted 5 lines
Cheers,
Richard
PATCH v2 2/2 qemu: add patch to set minimum kernel version for riscv32
In reply to Matt Madisonwhich enables us to drop the -r option on qemu-static-riscv32 invocations.
--- meta/recipes-devtools/qemu/qemu.inc | 1 + ...s-minimum-kernel-version-for-riscv32.patch | 40 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 meta/recipes-devtools/qemu/qemu/0001-riscv-Set-5.4-as-minimum-kernel-version-for-riscv32.patch
meta/recipes-devtools/qemu/qemu.inc +1 -0
@@ -27,6 +27,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ file://determinism.patch \ file://0001-tests-meson.build-use-relative-path-to-refer-to-file.patch \ file://0001-linux-user-Replace-__u64-with-uint64_t.patch \ + file://0001-riscv-Set-5.4-as-minimum-kernel-version-for-riscv32.patch \ " UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
meta/recipes-devtools/qemu/qemu/0001-riscv-Set-5.4-as-minimum-kernel-version-for-riscv32.patch new file +40 -0
@@ -0,0 +1,40 @@ +From 359dc12eb32b2395cf10796157002024e6a58054 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Wed, 15 Dec 2021 23:31:11 -0800 +Subject: [PATCH] riscv: Set 5.4 as minimum kernel version for riscv32 + +5.4 is first stable API as far as rv32 is concerned see [1] + +[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=7a55dd3fb6d2c307a002a16776be84310b9c8989 + +Upstream-Status: Submitted [https://lists.nongnu.org/archive/html/qemu-devel/2021-12/msg02495.html] + +Signed-off-by: Khem Raj <[email protected]> +Cc: Palmer Dabbelt <[email protected]> +Cc: Alistair Francis <[email protected]> +Cc: Bin Meng <[email protected]> +Signed-off-by: Matt Madison <[email protected]> +--- + linux-user/riscv/target_syscall.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/linux-user/riscv/target_syscall.h b/linux-user/riscv/target_syscall.h +index dc597c897..9b1316132 100644 +--- a/linux-user/riscv/target_syscall.h ++++ b/linux-user/riscv/target_syscall.h +@@ -45,10 +45,11 @@ struct target_pt_regs { + + #ifdef TARGET_RISCV32 + #define UNAME_MACHINE "riscv32" ++#define UNAME_MINIMUM_RELEASE "5.4.0" + #else + #define UNAME_MACHINE "riscv64" +-#endif + #define UNAME_MINIMUM_RELEASE "4.15.0" ++#endif + + #define TARGET_MINSIGSTKSZ 2048 + #define TARGET_MCL_CURRENT 1 +-- +2.32.0 +
Signature · 1 line
2.32.0