[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] Using qemu-arm as an interpreter

From: Peter Maydell
Subject: Re: [Qemu-discuss] Using qemu-arm as an interpreter
Date: Thu, 14 May 2015 13:40:24 +0100

On 14 May 2015 at 12:33, Dave Flogeras <address@hidden> wrote:
> I have qemu-arm (user) installed on my machine.  I use to to chroot
> into arm sysroots (via binfmt_misc) and also I use it to run
> cross-compiled unit test suites on an amd64 host.
> For the purpose of this example, I have two different arm sysroots.
> Both target the raspberry pi.  One is glibc based, the other uses
> uclibc.  I have matching cross compilers for each target.
> When I compile and run a test program for uclibc, let's say with the 
> following:
> qemu-arm -L /path/to/my/uclibc/sysroot  ./my_cross_compiled_test
> It loads and runs within a few seconds. Running more in succession
> returns even quicker, I assume after the loader has cached all of the
> target's runtime libraries in RAM.
> If I recompile against the glibc sysroot, and run the equivalent
> command (changing the -L option to point at the correct path) it seems
> to hang.  Monitoring in 'top' shows it consumes about 10% CPU for
> maybe 3-4 seconds, then goes to 100% CPU and the RAM usage skyrockets.

You probably have some symlinks or similar in the glibc sysroot.
The QEMU -L option isn't really intended to deal with anything
more than a very simple sysroot with a minimal set of libraries,
no circular symlinks, etc. It has at least one bug where it will
go into an infinite loop if the directory structure confuses it.

If the directory looks anything like a full system install then
chrooting into it will work better.

-- PMM

reply via email to

[Prev in Thread] Current Thread [Next in Thread]