* [Buildroot] [PATCH v2 0/3] Disable qemu user emulation for host variant on MIPS64
@ 2018-04-01 16:36 Thomas Petazzoni
2018-04-01 16:36 ` [Buildroot] [PATCH v2 1/3] qemu: rewrite BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS to be more readable Thomas Petazzoni
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2018-04-01 16:36 UTC (permalink / raw)
To: buildroot
Hello,
This is a new iteration of the patch sent by Adam [1]. Changes
compared to Adam's version:
- According to Qemu's TODO list, both n32 and n64 don't work for user
mode emulation on mips64, so basically mips64 can't be used.
- Adam's patches was not properly propagating the new architecture
dependency to the "select" that selects the user-mode emulation if
the system emulation is not selected. Solving this required quite a
few changes to how architecture dependencies are expressed in the
host-qemu package.
[1] https://patchwork.ozlabs.org/patch/828190/
Thanks,
Thomas
Adam Duskett (1):
qemu: disable qemu user emulation on MIPS64 for host variant
Thomas Petazzoni (2):
qemu: rewrite BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS to be more readable
qemu: introduce BR2_PACKAGE_HOST_QEMU_{SYSTEM,USER}_ARCH_SUPPORTS
package/qemu/Config.in.host | 39 +++++++++++++++++++++++++++++++--------
1 file changed, 31 insertions(+), 8 deletions(-)
--
2.14.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2 1/3] qemu: rewrite BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS to be more readable
2018-04-01 16:36 [Buildroot] [PATCH v2 0/3] Disable qemu user emulation for host variant on MIPS64 Thomas Petazzoni
@ 2018-04-01 16:36 ` Thomas Petazzoni
2018-04-28 13:25 ` Thomas Petazzoni
2018-04-01 16:36 ` [Buildroot] [PATCH v2 2/3] qemu: introduce BR2_PACKAGE_HOST_QEMU_{SYSTEM, USER}_ARCH_SUPPORTS Thomas Petazzoni
2018-04-01 16:36 ` [Buildroot] [PATCH v2 3/3] qemu: disable qemu user emulation on MIPS64 for host variant Thomas Petazzoni
2 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2018-04-01 16:36 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
package/qemu/Config.in.host | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/package/qemu/Config.in.host b/package/qemu/Config.in.host
index 0ef4c700b0..160778c834 100644
--- a/package/qemu/Config.in.host
+++ b/package/qemu/Config.in.host
@@ -1,11 +1,22 @@
config BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS
bool
- default y if BR2_arm || BR2_armeb || BR2_aarch64 || \
- BR2_i386 || BR2_m68k || BR2_microblazeel || \
- BR2_microblazebe || BR2_mips || BR2_mipsel || \
- BR2_mips64 || BR2_mips64el || BR2_powerpc || \
- BR2_powerpc64 || BR2_powerpc64le || BR2_sh || \
- BR2_sparc || BR2_x86_64
+ default y if BR2_arm
+ default y if BR2_armeb
+ default y if BR2_aarch64
+ default y if BR2_i386
+ default y if BR2_m68k
+ default y if BR2_microblazeel
+ default y if BR2_microblazebe
+ default y if BR2_mips
+ default y if BR2_mipsel
+ default y if BR2_mips64
+ default y if BR2_mips64el
+ default y if BR2_powerpc
+ default y if BR2_powerpc64
+ default y if BR2_powerpc64le
+ default y if BR2_sh
+ default y if BR2_sparc
+ default y if BR2_x86_64
depends on !BR2_powerpc_620 && !BR2_powerpc_630 && !BR2_powerpc_970
config BR2_PACKAGE_HOST_QEMU
--
2.14.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2 2/3] qemu: introduce BR2_PACKAGE_HOST_QEMU_{SYSTEM, USER}_ARCH_SUPPORTS
2018-04-01 16:36 [Buildroot] [PATCH v2 0/3] Disable qemu user emulation for host variant on MIPS64 Thomas Petazzoni
2018-04-01 16:36 ` [Buildroot] [PATCH v2 1/3] qemu: rewrite BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS to be more readable Thomas Petazzoni
@ 2018-04-01 16:36 ` Thomas Petazzoni
2018-04-01 16:36 ` [Buildroot] [PATCH v2 3/3] qemu: disable qemu user emulation on MIPS64 for host variant Thomas Petazzoni
2 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2018-04-01 16:36 UTC (permalink / raw)
To: buildroot
Not all architectures are supported by both the system emulation and
user-mode emulation in Qemu, so a single
BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS doesn't work very well.
Therefore, this commit introduces the
BR2_PACKAGE_HOST_QEMU_{SYSTEM,USER}_ARCH_SUPPORTS hidden options. We
keep the BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS option for the (numerous)
architectures supported by both system emulation and user-mode
emulation.
The 'select' logic to make sure that at least either system emulation
or user-mode emulation is selected is reworked, and done carefully to
avoid recursive Kconfig dependencies.
For now BR2_PACKAGE_HOST_QEMU_SYSTEM_ARCH_SUPPORTS and
BR2_PACKAGE_HOST_QEMU_USER_ARCH_SUPPORTS are the same, but they will
become different in a follow-up commit.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
package/qemu/Config.in.host | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/package/qemu/Config.in.host b/package/qemu/Config.in.host
index 160778c834..78ff052983 100644
--- a/package/qemu/Config.in.host
+++ b/package/qemu/Config.in.host
@@ -19,11 +19,21 @@ config BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS
default y if BR2_x86_64
depends on !BR2_powerpc_620 && !BR2_powerpc_630 && !BR2_powerpc_970
+config BR2_PACKAGE_HOST_QEMU_SYSTEM_ARCH_SUPPORTS
+ bool
+ default y if BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS
+
+config BR2_PACKAGE_HOST_QEMU_USER_ARCH_SUPPORTS
+ bool
+ default y if BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS
+
config BR2_PACKAGE_HOST_QEMU
bool "host qemu"
- depends on BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS
+ depends on BR2_PACKAGE_HOST_QEMU_SYSTEM_ARCH_SUPPORTS || BR2_PACKAGE_HOST_QEMU_USER_ARCH_SUPPORTS
select BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE \
- if !BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE
+ if !BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE && BR2_PACKAGE_HOST_QEMU_USER_ARCH_SUPPORTS
+ select BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE \
+ if !BR2_PACKAGE_HOST_QEMU_USER_ARCH_SUPPORTS
help
QEMU is a generic and open source machine emulator and
virtualizer.
@@ -38,12 +48,14 @@ comment "Emulators selection"
config BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE
bool "Enable system emulation"
+ depends on BR2_PACKAGE_HOST_QEMU_SYSTEM_ARCH_SUPPORTS
help
Enables the build of the system emulator, which allows to
boot an entire system in Qemu.
config BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE
bool "Enable Linux user-land emulation"
+ depends on BR2_PACKAGE_HOST_QEMU_USER_ARCH_SUPPORTS
help
Enables the build of the user-land emulator, which allows to
run user-space applications.
--
2.14.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2 3/3] qemu: disable qemu user emulation on MIPS64 for host variant
2018-04-01 16:36 [Buildroot] [PATCH v2 0/3] Disable qemu user emulation for host variant on MIPS64 Thomas Petazzoni
2018-04-01 16:36 ` [Buildroot] [PATCH v2 1/3] qemu: rewrite BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS to be more readable Thomas Petazzoni
2018-04-01 16:36 ` [Buildroot] [PATCH v2 2/3] qemu: introduce BR2_PACKAGE_HOST_QEMU_{SYSTEM, USER}_ARCH_SUPPORTS Thomas Petazzoni
@ 2018-04-01 16:36 ` Thomas Petazzoni
2 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2018-04-01 16:36 UTC (permalink / raw)
To: buildroot
From: Adam Duskett <Adamduskett@outlook.com>
According to target/mips/TODO in the Qemu sources:
===
MIPS64
------
- Userland emulation (both n32 and n64) not functional.
===
And indeed, trying to run a mips64n32 binary under qemu user emulation
results in:
Invalid ELF image for this architecture
So we move the BR2_mips64(el) dependency from
BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS to
BR2_PACKAGE_HOST_QEMU_SYSTEM_ARCH_SUPPORTS, so that only the system
emulation is available on mips64, and not the user-mode emulation.
Signed-off-by: Adam Duskett <Adamduskett@outlook.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
package/qemu/Config.in.host | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/package/qemu/Config.in.host b/package/qemu/Config.in.host
index 78ff052983..957c7d2ae1 100644
--- a/package/qemu/Config.in.host
+++ b/package/qemu/Config.in.host
@@ -9,8 +9,6 @@ config BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS
default y if BR2_microblazebe
default y if BR2_mips
default y if BR2_mipsel
- default y if BR2_mips64
- default y if BR2_mips64el
default y if BR2_powerpc
default y if BR2_powerpc64
default y if BR2_powerpc64le
@@ -22,6 +20,8 @@ config BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS
config BR2_PACKAGE_HOST_QEMU_SYSTEM_ARCH_SUPPORTS
bool
default y if BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS
+ default y if BR2_mips64
+ default y if BR2_mips64el
config BR2_PACKAGE_HOST_QEMU_USER_ARCH_SUPPORTS
bool
--
2.14.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2 1/3] qemu: rewrite BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS to be more readable
2018-04-01 16:36 ` [Buildroot] [PATCH v2 1/3] qemu: rewrite BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS to be more readable Thomas Petazzoni
@ 2018-04-28 13:25 ` Thomas Petazzoni
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2018-04-28 13:25 UTC (permalink / raw)
To: buildroot
Hello,
On Sun, 1 Apr 2018 18:36:34 +0200, Thomas Petazzoni wrote:
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
> package/qemu/Config.in.host | 23 +++++++++++++++++------
> 1 file changed, 17 insertions(+), 6 deletions(-)
I've applied this series to master.
Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-04-28 13:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-01 16:36 [Buildroot] [PATCH v2 0/3] Disable qemu user emulation for host variant on MIPS64 Thomas Petazzoni
2018-04-01 16:36 ` [Buildroot] [PATCH v2 1/3] qemu: rewrite BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS to be more readable Thomas Petazzoni
2018-04-28 13:25 ` Thomas Petazzoni
2018-04-01 16:36 ` [Buildroot] [PATCH v2 2/3] qemu: introduce BR2_PACKAGE_HOST_QEMU_{SYSTEM, USER}_ARCH_SUPPORTS Thomas Petazzoni
2018-04-01 16:36 ` [Buildroot] [PATCH v2 3/3] qemu: disable qemu user emulation on MIPS64 for host variant Thomas Petazzoni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.