qemu.bbclass: Allow use different QEMU binary depending of target
PATCH 1/2 qemu.bbclass: Allow use different QEMU binary depending of target
There are architectures which support running in 32 and 64 bit flavours however the simulation is provided in a specific QEMU setting, requiring us to use a different binary. This patch allow this to be done using, for example:
QEMU_TARGET_BINARY_ppce5500 = "qemu-ppc64abi32"
---
meta/classes/qemu.bbclass | 5 +++++ 1 file changed, 5 insertions(+)
meta/classes/qemu.bbclass +5 -0
@@ -4,6 +4,11 @@ # def qemu_target_binary(data): + package_arch = data.getVar("PACKAGE_ARCH", True) + qemu_target_binary = (data.getVar("QEMU_TARGET_BINARY_%s" % package_arch, True) or "") + if qemu_target_binary: + return qemu_target_binary + target_arch = data.getVar("TARGET_ARCH", True) if target_arch in ("i486", "i586", "i686"): target_arch = "i386"
Signature · 1 line
2.10.0
PATCH 2/2 tune-ppc[65]00.inc: Disable QEMU usermode usage
The QEMU usermode fails with invalid instruction error when used with those tunes.
The issue is being tracked in [YOCTO: #10304].
---
meta/conf/machine/include/tune-ppce5500.inc | 3 +++ meta/conf/machine/include/tune-ppce6500.inc | 3 +++ 2 files changed, 6 insertions(+)
meta/conf/machine/include/tune-ppce5500.inc +3 -0
@@ -18,3 +18,6 @@ PACKAGE_EXTRA_ARCHS_tune-ppc64e5500 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc64} ppc # glibc configure options to get e5500 specific library (for sqrt) GLIBC_EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'e5500', '--with-cpu=e5500', '', d)}" + +# QEMU usermode fails with invalid instruction error (YOCTO: #10304) +MACHINE_FEATURES_BACKFILL_CONSIDERED_append = "${@bb.utils.contains('TUNE_FEATURES', 'e5500', ' qemu-usermode', '', d)}"
meta/conf/machine/include/tune-ppce6500.inc +3 -0
@@ -19,3 +19,6 @@ PACKAGE_EXTRA_ARCHS_tune-ppc64e6500 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc64} ppc # glibc configure options to get e6500 specific library GLIBC_EXTRA_OECONF_powerpc64 += "${@bb.utils.contains('TUNE_FEATURES', 'e6500', '--with-cpu=e6500', '', d)}" GLIBC_EXTRA_OECONF_powerpc += "${@bb.utils.contains('TUNE_FEATURES', 'e6500', '--with-cpu=e6500', '', d)}" + +# QEMU usermode fails with invalid instruction error (YOCTO: #10304) +MACHINE_FEATURES_BACKFILL_CONSIDERED_append = "${@bb.utils.contains('TUNE_FEATURES', 'e6500', ' qemu-usermode', '', d)}"
Signature · 1 line
2.10.0
Re: [PATCH 2/2] tune-ppc[65]00.inc: Disable QEMU usermode usage
Quoted 4 lines · Otavio Salvador
The QEMU usermode fails with invalid instruction error when used with those tunes.
The issue is being tracked in [YOCTO: #10304].
Does this option remove using particular SPE option when invoking QEMU in usermode ? if so there may be another issue where these instructions are emitted by compiler and they wont be emulated.
What will this change do which fixes the problem ?
from bug it seems it needs a Qemu with 32bit ABI, are we building that version of qemu-ppc
Quoted 37 lines
Signed-off-by Otavio Salvador <[email protected]>---
meta/conf/machine/include/tune-ppce5500.inc | 3 +++ meta/conf/machine/include/tune-ppce6500.inc | 3 +++ 2 files changed, 6 insertions(+)meta/conf/machine/include/tune-ppce5500.inc +3
-0@@ -18,3 +18,6 @@ PACKAGE_EXTRA_ARCHS_tune-ppc64e5500 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc64} ppc # glibc configure options to get e5500 specific library (for sqrt) GLIBC_EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'e5500', '--with-cpu=e5500', '', d)}" + +# QEMU usermode fails with invalid instruction error (YOCTO: #10304) +MACHINE_FEATURES_BACKFILL_CONSIDERED_append = "${@bb.utils.contains('TUNE_FEATURES', 'e5500', ' qemu-usermode', '', d)}"meta/conf/machine/include/tune-ppce6500.inc +3
-1@@ -19,3 +19,6 @@ PACKAGE_EXTRA_ARCHS_tune-ppc64e6500 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc64} ppc # glibc configure options to get e6500 specific library GLIBC_EXTRA_OECONF_powerpc64 += "${@bb.utils.contains('TUNE_FEATURES', 'e6500', '--with-cpu=e6500', '', d)}" GLIBC_EXTRA_OECONF_powerpc += "${@bb.utils.contains('TUNE_FEATURES', 'e6500', '--with-cpu=e6500', '', d)}" + +# QEMU usermode fails with invalid instruction error (YOCTO: #10304) +MACHINE_FEATURES_BACKFILL_CONSIDERED_append = "${@bb.utils.contains('TUNE_FEATURES', 'e6500', ' qemu-usermode', '', d)}" --2.10.0
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [PATCH 2/2] tune-ppc[65]00.inc: Disable QEMU usermode usage
Quoted 7 lines · Khem Raj
Quoted 4 lines · Otavio Salvador
The QEMU usermode fails with invalid instruction error when used with those tunes.
The issue is being tracked in [YOCTO: #10304].
Quoted 7 lines
Does this option remove using particular SPE option when invoking QEMU in usermode ? if so there may be another issue where these instructions are emitted by compiler and they wont be emulated.
What will this change do which fixes the problem ?
from bug it seems it needs a Qemu with 32bit ABI, are we building that version of qemu-ppc
We are not, at this moment.
I did a local patch to enable it and test the usermode and it still produces an exception at runtime:
if we can fix the underlying issue, better, but disabling it allow for better user experience in meanwhile.
Signature · 3 lines
Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
Quoted 6 lines · Otavio Salvador
There are architectures which support running in 32 and 64 bit flavours however the simulation is provided in a specific QEMU setting, requiring us to use a different binary. This patch allow this to be done using, for example:
QEMU_TARGET_BINARY_ppce5500= "qemu-ppc64abi32"
Should there also be a patch that makes use of this feature?
Alex
Quoted 11 lines · Alexander Kanavin
Quoted 7 lines · Otavio Salvador
There are architectures which support running in 32 and 64 bit flavours however the simulation is provided in a specific QEMU setting, requiring us to use a different binary. This patch allow this to be done using, for example:
QEMU_TARGET_BINARY_ppce5500= "qemu-ppc64abi32"Should there also be a patch that makes use of this feature?
QEMU for e5500 is not working for us; until it is working it is no sense to submit the patch however I am using it for test.
Signature · 3 lines
Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750