Version 1 (modified by amain, 8 years ago) (diff)

--

Qemu 'native-emulated' compiling

Introduction

Since qemu finally works form mips and mipsel, it is possible to do all your 'native-emulated' compiling on you host machine. Using qemu in user mode, not in system mode. This may be the quickest and easiest way to compile for a different architecture. Of course qemu emulation is used, so it won't be as fast as cross compiling. But using the 'native-emulated' method you don't need to take anything into account you normally would have to do for cross compiling.

Instructions

  • make menuconfig
  • select architecture ( mips, mipsel, arm )
  • select Debian release ( sid, squeeze )
  • make sure "Use qemu to perform Debian second stage install on the host" is enabled
  • make debian/rootfs ( it will create a Debian root filesystem for the selected architecture )
  • make chr ( enter the change root - in the background qemu-<arch>-static is called which transparently starts emulating for <arch>
  • apt-get update
  • apt-get install build-essential
  • make, gcc, dpkg-buildpackage, etc all will be available!