mailing list of musl libc
 help / color / mirror / code / Atom feed
* Test environment for non-native archs
@ 2012-05-27  3:18 Rich Felker
  2012-05-27 11:54 ` Richard Pennington
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Rich Felker @ 2012-05-27  3:18 UTC (permalink / raw)
  To: musl

Hi,

I've been thinking a bit about further testing of ARM (for which I
don't have a native environment) and ports to other systems, and
realized that to be able to efficiently mix working on the native host
and virtual target system (e.g. doing most of the compiling on the
host), it's going to be desirable to have the Linux running under qemu
using part of the host's filesystem as its root fs, instead of having
a filesystem image.

This seems to be possible with qemu's support for exporting a virtual
9p share to the guest OS, but I haven't yet determined if it's
possible to boot directly with the 9p share as the root fs, or whether
it's going to require a separate initial fs image and switch/pivot
root afterwards (as you can tell, I'm not very familiar with this sort
of setup).

Anyone know the answer, or have some recipes I could use?

Rich


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Test environment for non-native archs
  2012-05-27  3:18 Test environment for non-native archs Rich Felker
@ 2012-05-27 11:54 ` Richard Pennington
  2012-05-27 13:11   ` Rich Felker
  2012-05-29  2:03 ` Roy Tam
  2012-06-03 11:15 ` aep
  2 siblings, 1 reply; 6+ messages in thread
From: Richard Pennington @ 2012-05-27 11:54 UTC (permalink / raw)
  To: musl

On Saturday, May 26, 2012 11:18:40 PM Rich Felker wrote:
> Hi,
> 
> I've been thinking a bit about further testing of ARM (for which I
> don't have a native environment) and ports to other systems, and
> realized that to be able to efficiently mix working on the native host
> and virtual target system (e.g. doing most of the compiling on the
> host), it's going to be desirable to have the Linux running under qemu
> using part of the host's filesystem as its root fs, instead of having
> a filesystem image.
> 
> This seems to be possible with qemu's support for exporting a virtual
> 9p share to the guest OS, but I haven't yet determined if it's
> possible to boot directly with the 9p share as the root fs, or whether
> it's going to require a separate initial fs image and switch/pivot
> root afterwards (as you can tell, I'm not very familiar with this sort
> of setup).
> 
> Anyone know the answer, or have some recipes I could use?
> 
> Rich

Hi Rich,

For my testing (which musl for ARM just passed, by the way ;-), I mostly use 
QEMU in Linux user space emulation mode. I just compile an executable on my 
x86 system and run it:
	qemu-arm a.out arg1 arg2 ...

In fact, my system is configured to recognize an arm executable and run qemu-
arm automatically, which is kind of slick.

When I do run a full blown system VM, I just nfs mount directories on my main 
system that I'm interested in.

-Rich


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Test environment for non-native archs
  2012-05-27 11:54 ` Richard Pennington
@ 2012-05-27 13:11   ` Rich Felker
  0 siblings, 0 replies; 6+ messages in thread
From: Rich Felker @ 2012-05-27 13:11 UTC (permalink / raw)
  To: musl

On Sun, May 27, 2012 at 06:54:00AM -0500, Richard Pennington wrote:
> Hi Rich,
> 
> For my testing (which musl for ARM just passed, by the way ;-), I mostly use 
> QEMU in Linux user space emulation mode. I just compile an executable on my 
> x86 system and run it:
> 	qemu-arm a.out arg1 arg2 ...

This does not seem to work whatsoever for threads. Right after the
clone syscall is made, qemu horribly crashes, and it's clearly qemu's
fault not the application's.

Rich


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Test environment for non-native archs
  2012-05-27  3:18 Test environment for non-native archs Rich Felker
  2012-05-27 11:54 ` Richard Pennington
@ 2012-05-29  2:03 ` Roy Tam
  2012-05-29  2:45   ` Rich Felker
  2012-06-03 11:15 ` aep
  2 siblings, 1 reply; 6+ messages in thread
From: Roy Tam @ 2012-05-29  2:03 UTC (permalink / raw)
  To: musl

Rich Felker <dalias <at> aerifal.cx> writes:
> This seems to be possible with qemu's support for exporting a virtual
> 9p share to the guest OS, but I haven't yet determined if it's
> possible to boot directly with the 9p share as the root fs, or whether
> it's going to require a separate initial fs image and switch/pivot
> root afterwards (as you can tell, I'm not very familiar with this sort
> of setup).
> 
> Anyone know the answer, or have some recipes I could use?
> 

What about Aboriginal Linux?
http://www.landley.net/code/aboriginal/




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Re: Test environment for non-native archs
  2012-05-29  2:03 ` Roy Tam
@ 2012-05-29  2:45   ` Rich Felker
  0 siblings, 0 replies; 6+ messages in thread
From: Rich Felker @ 2012-05-29  2:45 UTC (permalink / raw)
  To: musl

On Tue, May 29, 2012 at 02:03:20AM +0000, Roy Tam wrote:
> Rich Felker <dalias <at> aerifal.cx> writes:
> > This seems to be possible with qemu's support for exporting a virtual
> > 9p share to the guest OS, but I haven't yet determined if it's
> > possible to boot directly with the 9p share as the root fs, or whether
> > it's going to require a separate initial fs image and switch/pivot
> > root afterwards (as you can tell, I'm not very familiar with this sort
> > of setup).
> > 
> > Anyone know the answer, or have some recipes I could use?
> > 
> 
> What about Aboriginal Linux?
> http://www.landley.net/code/aboriginal/

That's what I've been using as a test platform, but it doesn't have
the option to boot from 9p virtfs. Landley should have a 3.4 kernel in
Aboriginal soon though, and since that supposedly has boot-from-9p, I
should be able to setup the test environment I want (everything on the
host's fs) using it once it's released. Of course I could do it now if
I compile my own ARM kernel, but I'd rather spend my time working on
other things at the moment...

Rich




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Test environment for non-native archs
  2012-05-27  3:18 Test environment for non-native archs Rich Felker
  2012-05-27 11:54 ` Richard Pennington
  2012-05-29  2:03 ` Roy Tam
@ 2012-06-03 11:15 ` aep
  2 siblings, 0 replies; 6+ messages in thread
From: aep @ 2012-06-03 11:15 UTC (permalink / raw)
  To: musl

> This seems to be possible with qemu's support for exporting a virtual
> 9p share to the guest OS, but I haven't yet determined if it's
> possible to boot directly with the 9p share as the root fs,

user mode linux has humfs, but it's not in mainline. Instead there's 
hostfs, which is broken by design.
I can never get the uml patches working so i didn't look further.

What i researched instead was if you could run boot inside virtualbox 
from a vboxsf.
A kernel with initrd with the vboxsf stuff can access the "folders", 
but it isn't booting because their vfs does permissions wrong.

The virtualbox build system makes me angry, so i didn't try fixing it.
Since you're using a debian, maybe the buildsystem works for you and 
you can just hack the relevant parts in.
I think it's a matter of making couple more rpc calls to the hostdriver 
and mapping "stat" in the guest to the host.



On Sat, 26 May 2012 23:18:40 -0400, Rich Felker wrote:
> Hi,
>
> I've been thinking a bit about further testing of ARM (for which I
> don't have a native environment) and ports to other systems, and
> realized that to be able to efficiently mix working on the native 
> host
> and virtual target system (e.g. doing most of the compiling on the
> host), it's going to be desirable to have the Linux running under 
> qemu
> using part of the host's filesystem as its root fs, instead of having
> a filesystem image.
>
  or whether
> it's going to require a separate initial fs image and switch/pivot
> root afterwards (as you can tell, I'm not very familiar with this 
> sort
> of setup).
>
> Anyone know the answer, or have some recipes I could use?
>
> Rich


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-06-03 11:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-27  3:18 Test environment for non-native archs Rich Felker
2012-05-27 11:54 ` Richard Pennington
2012-05-27 13:11   ` Rich Felker
2012-05-29  2:03 ` Roy Tam
2012-05-29  2:45   ` Rich Felker
2012-06-03 11:15 ` aep

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).