* [OE-core][PATCH v2 0/2] qemu.bbclass: drop OLDEST_KERNEL reference
@ 2021-12-16 11:48 Matt Madison
2021-12-16 11:48 ` [OE-core][PATCH v2 1/2] " Matt Madison
2021-12-16 11:48 ` [OE-core][PATCH v2 2/2] qemu: add patch to set minimum kernel version for riscv32 Matt Madison
0 siblings, 2 replies; 7+ messages in thread
From: Matt Madison @ 2021-12-16 11:48 UTC (permalink / raw)
To: openembedded-core
Cc: Alexander Kanavin, Khem Raj, Richard Purdie, Matt Madison
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
--
2.32.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [OE-core][PATCH v2 1/2] qemu.bbclass: drop OLDEST_KERNEL reference
2021-12-16 11:48 [OE-core][PATCH v2 0/2] qemu.bbclass: drop OLDEST_KERNEL reference Matt Madison
@ 2021-12-16 11:48 ` Matt Madison
2021-12-30 8:51 ` Changqing Li
2021-12-16 11:48 ` [OE-core][PATCH v2 2/2] qemu: add patch to set minimum kernel version for riscv32 Matt Madison
1 sibling, 1 reply; 7+ messages in thread
From: Matt Madison @ 2021-12-16 11:48 UTC (permalink / raw)
To: openembedded-core
Cc: Alexander Kanavin, Khem Raj, Richard Purdie, Matt Madison
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 <matt@madison.systems>
---
meta/classes/qemu.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes/qemu.bbclass b/meta/classes/qemu.bbclass
index 01a7b86ae1..333202b7c4 100644
--- a/meta/classes/qemu.bbclass
+++ b/meta/classes/qemu.bbclass
@@ -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"
--
2.32.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [OE-core][PATCH v2 2/2] qemu: add patch to set minimum kernel version for riscv32
2021-12-16 11:48 [OE-core][PATCH v2 0/2] qemu.bbclass: drop OLDEST_KERNEL reference Matt Madison
2021-12-16 11:48 ` [OE-core][PATCH v2 1/2] " Matt Madison
@ 2021-12-16 11:48 ` Matt Madison
1 sibling, 0 replies; 7+ messages in thread
From: Matt Madison @ 2021-12-16 11:48 UTC (permalink / raw)
To: openembedded-core
Cc: Alexander Kanavin, Khem Raj, Richard Purdie, Matt Madison
which enables us to drop the -r option on qemu-static-riscv32
invocations.
Signed-off-by: Matt Madison <matt@madison.systems>
---
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
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index fe35f94acf..584c9482e9 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -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"
diff --git a/meta/recipes-devtools/qemu/qemu/0001-riscv-Set-5.4-as-minimum-kernel-version-for-riscv32.patch b/meta/recipes-devtools/qemu/qemu/0001-riscv-Set-5.4-as-minimum-kernel-version-for-riscv32.patch
new file mode 100644
index 0000000000..ac4b6dcc44
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/0001-riscv-Set-5.4-as-minimum-kernel-version-for-riscv32.patch
@@ -0,0 +1,40 @@
+From 359dc12eb32b2395cf10796157002024e6a58054 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+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 <raj.khem@gmail.com>
+Cc: Palmer Dabbelt <palmer@dabbelt.com>
+Cc: Alistair Francis <alistair.francis@wdc.com>
+Cc: Bin Meng <bin.meng@windriver.com>
+Signed-off-by: Matt Madison <matt@madison.systems>
+---
+ 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
+
--
2.32.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [OE-core][PATCH v2 1/2] qemu.bbclass: drop OLDEST_KERNEL reference
2021-12-16 11:48 ` [OE-core][PATCH v2 1/2] " Matt Madison
@ 2021-12-30 8:51 ` Changqing Li
2021-12-30 11:06 ` Alexander Kanavin
2021-12-30 13:21 ` Richard Purdie
0 siblings, 2 replies; 7+ messages in thread
From: Changqing Li @ 2021-12-30 8:51 UTC (permalink / raw)
To: Matt Madison, openembedded-core
Cc: Alexander Kanavin, Khem Raj, Richard Purdie
[-- Attachment #1: Type: text/plain, Size: 1936 bytes --]
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 <matt@madison.systems>
> ---
> meta/classes/qemu.bbclass | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/qemu.bbclass b/meta/classes/qemu.bbclass
> index 01a7b86ae1..333202b7c4 100644
> --- a/meta/classes/qemu.bbclass
> +++ b/meta/classes/qemu.bbclass
> @@ -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
> 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 (#159782): https://lists.openembedded.org/g/openembedded-core/message/159782
> Mute This Topic: https://lists.openembedded.org/mt/87765279/3616873
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [changqing.li@windriver.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
[-- Attachment #2: Type: text/html, Size: 3375 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [OE-core][PATCH v2 1/2] qemu.bbclass: drop OLDEST_KERNEL reference
2021-12-30 8:51 ` Changqing Li
@ 2021-12-30 11:06 ` Alexander Kanavin
2021-12-30 13:21 ` Richard Purdie
1 sibling, 0 replies; 7+ messages in thread
From: Alexander Kanavin @ 2021-12-30 11:06 UTC (permalink / raw)
To: Changqing Li
Cc: Matt Madison, OE-core, Alexander Kanavin, Khem Raj,
Richard Purdie
[-- Attachment #1: Type: text/plain, Size: 2153 bytes --]
I guess you can add it back through QEMU_EXTRAOPTIONS?
Alex
On Thu, 30 Dec 2021 at 09:52, Changqing Li <changqing.li@windriver.com>
wrote:
>
> 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 <matt@madison.systems> <matt@madison.systems>
> ---
> meta/classes/qemu.bbclass | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/qemu.bbclass b/meta/classes/qemu.bbclass
> index 01a7b86ae1..333202b7c4 100644
> --- a/meta/classes/qemu.bbclass
> +++ b/meta/classes/qemu.bbclass
> @@ -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(" <$%7B@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
>
> 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: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
[-- Attachment #2: Type: text/html, Size: 3549 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [OE-core][PATCH v2 1/2] qemu.bbclass: drop OLDEST_KERNEL reference
2021-12-30 8:51 ` Changqing Li
2021-12-30 11:06 ` Alexander Kanavin
@ 2021-12-30 13:21 ` Richard Purdie
2021-12-31 0:50 ` Changqing Li
1 sibling, 1 reply; 7+ messages in thread
From: Richard Purdie @ 2021-12-30 13:21 UTC (permalink / raw)
To: Changqing Li, Matt Madison, openembedded-core; +Cc: Alexander Kanavin, Khem Raj
On Thu, 2021-12-30 at 16:51 +0800, Changqing Li wrote:
>
> 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 <matt@madison.systems>
> > ---
> > meta/classes/qemu.bbclass | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta/classes/qemu.bbclass b/meta/classes/qemu.bbclass
> > index 01a7b86ae1..333202b7c4 100644
> > --- a/meta/classes/qemu.bbclass
> > +++ b/meta/classes/qemu.bbclass
> > @@ -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?
>
It was removed for a reason and believed to be no longer needed. Which version
of qemu was this with?
Cheers,
Richard
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [OE-core][PATCH v2 1/2] qemu.bbclass: drop OLDEST_KERNEL reference
2021-12-30 13:21 ` Richard Purdie
@ 2021-12-31 0:50 ` Changqing Li
0 siblings, 0 replies; 7+ messages in thread
From: Changqing Li @ 2021-12-31 0:50 UTC (permalink / raw)
To: Richard Purdie, Matt Madison, openembedded-core
Cc: Alexander Kanavin, Khem Raj
[-- Attachment #1: Type: text/plain, Size: 2317 bytes --]
On 12/30/21 9:21 PM, Richard Purdie wrote:
> [Please note: This e-mail is from an EXTERNAL e-mail address]
>
> On Thu, 2021-12-30 at 16:51 +0800, Changqing Li wrote:
>> 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 <matt@madison.systems>
>>> ---
>>> meta/classes/qemu.bbclass | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/meta/classes/qemu.bbclass b/meta/classes/qemu.bbclass
>>> index 01a7b86ae1..333202b7c4 100644
>>> --- a/meta/classes/qemu.bbclass
>>> +++ b/meta/classes/qemu.bbclass
>>> @@ -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?
>>
> 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
>
> Cheers,
>
> Richard
>
[-- Attachment #2: Type: text/html, Size: 3273 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-12-31 0:50 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-16 11:48 [OE-core][PATCH v2 0/2] qemu.bbclass: drop OLDEST_KERNEL reference Matt Madison
2021-12-16 11:48 ` [OE-core][PATCH v2 1/2] " Matt Madison
2021-12-30 8:51 ` Changqing Li
2021-12-30 11:06 ` Alexander Kanavin
2021-12-30 13:21 ` Richard Purdie
2021-12-31 0:50 ` Changqing Li
2021-12-16 11:48 ` [OE-core][PATCH v2 2/2] qemu: add patch to set minimum kernel version for riscv32 Matt Madison
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox