* Re: [oe-commits] Laurentiu Palcu : qemu: add wrapper for qemu-mips binary [not found] <20121003114821.8D16410375@opal> @ 2012-10-06 16:21 ` Martin Jansa 2012-10-06 18:13 ` Khem Raj 0 siblings, 1 reply; 5+ messages in thread From: Martin Jansa @ 2012-10-06 16:21 UTC (permalink / raw) To: laurentiu.palcu; +Cc: openembedded-core, openembedded-commits [-- Attachment #1: Type: text/plain, Size: 2907 bytes --] On Wed, Oct 03, 2012 at 11:48:21AM +0000, git@git.openembedded.org wrote: > Module: openembedded-core.git > Branch: master > Commit: 53b3103abdf21123b1c7be49b05cfe97a7cd9ed7 > URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=53b3103abdf21123b1c7be49b05cfe97a7cd9ed7 > > Author: Laurentiu Palcu <laurentiu.palcu@intel.com> > Date: Wed Oct 3 14:23:26 2012 +0300 > > qemu: add wrapper for qemu-mips binary > > qemu-mips user emulation binary segfaults when running any kind of > binary. This is due to a MMU access fault in the virtual CPU. This > problem has been introduced in qemu when 4GB of vmem were reserved for > 32-on-64 bit. > > This workaround will need to be reverted once the proper fix is found. > > [YOCTO #3143] > > Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> > > --- > > meta/recipes-devtools/qemu/qemu_1.2.0.bb | 15 ++++++++++++++- > 1 files changed, 14 insertions(+), 1 deletions(-) > > diff --git a/meta/recipes-devtools/qemu/qemu_1.2.0.bb b/meta/recipes-devtools/qemu/qemu_1.2.0.bb > index 191ee48..cbdb4d4 100644 > --- a/meta/recipes-devtools/qemu/qemu_1.2.0.bb > +++ b/meta/recipes-devtools/qemu/qemu_1.2.0.bb > @@ -17,7 +17,7 @@ SRC_URI = "\ > SRC_URI[md5sum] = "78eb1e984f4532aa9f2bdd3c127b5b61" > SRC_URI[sha256sum] = "c8b84420d9f4869397f84cad2dabd9a475b7723d619a924a873740353e9df936" > > -PR = "r2" > +PR = "r3" > > SRC_URI_append_virtclass-nativesdk = "\ > file://relocatable_sdk.patch \ > @@ -29,6 +29,19 @@ do_configure_prepend_virtclass-nativesdk() { > sed -i 's/-lX11//g' Makefile.target > fi > } > + > +# The following fragment will create a wrapper for qemu-mips user emulation > +# binary in order to work around a segmentation fault issue. Basically, by > +# default, the reserved virtual address space for 32-on-64 bit is set to 4GB. > +# This will trigger a MMU access fault in the virtual CPU. With this change, > +# the qemu-mips works fine. > +# IMPORTANT: This piece needs to be removed once the root cause is fixed! > +do_install_append() { > + create_wrapper ${D}/${bindir}/qemu-mips \ > + QEMU_RESERVED_VA=0x0 > +} > +# END of qemu-mips workaround What about checking if mips is in QEMU_TARGETS before doing this? Right now this breaks all distros without mips in QEMU_TARGETS. Cheers, > + > do_configure_prepend_virtclass-native() { > # Undo the -lX11 added by linker-flags.patch, don't assume that host has libX11 installed > sed -i 's/-lX11//g' Makefile.target > > > _______________________________________________ > Openembedded-commits mailing list > Openembedded-commits@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-commits -- Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 205 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [oe-commits] Laurentiu Palcu : qemu: add wrapper for qemu-mips binary 2012-10-06 16:21 ` [oe-commits] Laurentiu Palcu : qemu: add wrapper for qemu-mips binary Martin Jansa @ 2012-10-06 18:13 ` Khem Raj 2012-10-08 8:26 ` Richard Purdie 2012-10-08 8:35 ` Laurentiu Palcu 0 siblings, 2 replies; 5+ messages in thread From: Khem Raj @ 2012-10-06 18:13 UTC (permalink / raw) To: Martin Jansa; +Cc: openembedded-commits, openembedded-core On Sat, Oct 6, 2012 at 9:21 AM, Martin Jansa <martin.jansa@gmail.com> wrote: > >> +# IMPORTANT: This piece needs to be removed once the root cause is fixed! >> +do_install_append() { >> + create_wrapper ${D}/${bindir}/qemu-mips \ >> + QEMU_RESERVED_VA=0x0 >> +} >> +# END of qemu-mips workaround > > What about checking if mips is in QEMU_TARGETS before doing this? > or simply for check for existence of qemu-mips before creating the wrapper > Right now this breaks all distros without mips in QEMU_TARGETS. > > Cheers, ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [oe-commits] Laurentiu Palcu : qemu: add wrapper for qemu-mips binary 2012-10-06 18:13 ` Khem Raj @ 2012-10-08 8:26 ` Richard Purdie 2012-10-08 8:35 ` Laurentiu Palcu 1 sibling, 0 replies; 5+ messages in thread From: Richard Purdie @ 2012-10-08 8:26 UTC (permalink / raw) To: Khem Raj; +Cc: openembedded-core, Martin Jansa, openembedded-commits On Sat, 2012-10-06 at 11:13 -0700, Khem Raj wrote: > On Sat, Oct 6, 2012 at 9:21 AM, Martin Jansa <martin.jansa@gmail.com> wrote: > > > >> +# IMPORTANT: This piece needs to be removed once the root cause is fixed! > >> +do_install_append() { > >> + create_wrapper ${D}/${bindir}/qemu-mips \ > >> + QEMU_RESERVED_VA=0x0 > >> +} > >> +# END of qemu-mips workaround > > > > What about checking if mips is in QEMU_TARGETS before doing this? > > > > or simply for check for existence of qemu-mips before creating the wrapper I've added a patch in doing this. Cheers, Richard ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [oe-commits] Laurentiu Palcu : qemu: add wrapper for qemu-mips binary 2012-10-06 18:13 ` Khem Raj 2012-10-08 8:26 ` Richard Purdie @ 2012-10-08 8:35 ` Laurentiu Palcu 2012-10-08 9:14 ` Richard Purdie 1 sibling, 1 reply; 5+ messages in thread From: Laurentiu Palcu @ 2012-10-08 8:35 UTC (permalink / raw) To: Khem Raj; +Cc: openembedded-commits, Martin Jansa, openembedded-core On 10/06/2012 09:13 PM, Khem Raj wrote: > On Sat, Oct 6, 2012 at 9:21 AM, Martin Jansa <martin.jansa@gmail.com> wrote: >> >>> +# IMPORTANT: This piece needs to be removed once the root cause is fixed! >>> +do_install_append() { >>> + create_wrapper ${D}/${bindir}/qemu-mips \ >>> + QEMU_RESERVED_VA=0x0 >>> +} >>> +# END of qemu-mips workaround >> >> What about checking if mips is in QEMU_TARGETS before doing this? >> > > or simply for check for existence of qemu-mips before creating the wrapper > >> Right now this breaks all distros without mips in QEMU_TARGETS. Sorry, I totally missed this. :| What about adding a simple check in the create_wrapper script itself? We create the wrapper only if the target binary exists. It sounds better this way and the user does not necessarily have to remember to check for the binary existence before creating the wrapper. I'll prepare a patch. Thanks, Laurentiu >> >> Cheers, ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [oe-commits] Laurentiu Palcu : qemu: add wrapper for qemu-mips binary 2012-10-08 8:35 ` Laurentiu Palcu @ 2012-10-08 9:14 ` Richard Purdie 0 siblings, 0 replies; 5+ messages in thread From: Richard Purdie @ 2012-10-08 9:14 UTC (permalink / raw) To: Laurentiu Palcu; +Cc: openembedded-core, Martin Jansa, openembedded-commits On Mon, 2012-10-08 at 11:35 +0300, Laurentiu Palcu wrote: > > On 10/06/2012 09:13 PM, Khem Raj wrote: > > On Sat, Oct 6, 2012 at 9:21 AM, Martin Jansa <martin.jansa@gmail.com> wrote: > >> > >>> +# IMPORTANT: This piece needs to be removed once the root cause is fixed! > >>> +do_install_append() { > >>> + create_wrapper ${D}/${bindir}/qemu-mips \ > >>> + QEMU_RESERVED_VA=0x0 > >>> +} > >>> +# END of qemu-mips workaround > >> > >> What about checking if mips is in QEMU_TARGETS before doing this? > >> > > > > or simply for check for existence of qemu-mips before creating the wrapper > > > >> Right now this breaks all distros without mips in QEMU_TARGETS. > Sorry, I totally missed this. :| What about adding a simple check in the > create_wrapper script itself? We create the wrapper only if the target > binary exists. It sounds better this way and the user does not > necessarily have to remember to check for the binary existence before > creating the wrapper. > > I'll prepare a patch. In general I think we expect the target to exist. qemu is a little special since the user can configure it different ways. I therefore see qemu as being the exception in this case rather than the rule and think the default behaviour for create_wrapper should be to fail if it doesn't exist as there is likely some other issue. Cheers. Richard ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-10-08 9:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20121003114821.8D16410375@opal>
2012-10-06 16:21 ` [oe-commits] Laurentiu Palcu : qemu: add wrapper for qemu-mips binary Martin Jansa
2012-10-06 18:13 ` Khem Raj
2012-10-08 8:26 ` Richard Purdie
2012-10-08 8:35 ` Laurentiu Palcu
2012-10-08 9:14 ` Richard Purdie
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox