NSLU2-Linux
view · edit · print · history

(redirected from Unslung.Qemu)

Qemu - a processor emulator

Qemu is now available for unslung through the feeds. At present we only have support for emulating intel i386 processors. This will, however, be the most useful way to use qemu, as it allows you to run binaries that have been built for common desktop gnu/linux distributions on the slug.

NB: Qemu needs a swap file to work

Qemu consists of several packages:

  • qemu (a full-system PC emulator - emulates a complete i386 based PC from scratch)
  • qemu-user (a i386 linux emulator - emulates a i386 processor running a linux kernel)
  • qemu-libc-i386 (glibc for i386 - used with qemu-user to run i386 binaries)

Quick start:

  • ipkg install qemu
  • ipkg install qemu-user
  • ipkg install qemu-libc-i386

Now copy a binary from your gnu/linux i386-based desktop onto your slug, and run:

qemu-i386 <name of your binary here>

Start with some binary that with minimal dependencies, such as /usr/bin/cal.

Notes:

  • The home of qemu is: http://fabrice.bellard.free.fr/qemu/
  • Qemu supports emulating sparc, and ppc processors; it can also emulate much of the hardware of a Sun Javastation or a Apple Powermac. Some of this functionality does not appear to be working with arm hosts yet.
  • Qemu 0.7.0 apparently exposes a bug in the version of gcc (3.3.5) used to build optware / unslung. Parts of it must be compiled with -fno-schedule-insns.

--jp30

  • qemu-i386 package version reflects the glibc version. So binaries depends on glibc 2.4 won't be supported by qemu-i386-2.3.3.

Troubleshooting

If "ipkg install qemu-libc-i386" reports a segfault during installation, the most likely cause of this is a lack of pagefile on the NSLU2

BrianZhou and Mwester were all able to install successfully as they had swap enabled on their NSLU2 hard drives, but I (Reedy Boy) had swap disabled due to using a 512mb Memory Stick

To fix it, You need a swap file!!

view · edit · print · history · Last edited by Reedy Boy.
Based on work by BrianZhou, Reedy Boy, krim, and jp30.
Originally by jp30.
Page last modified on January 24, 2008, at 07:44 PM