2013-06-19

Slitaz -- qemu user mode and binfmt_misc

qemu user mode and binfmt_misc

User mode emulation. In this mode, QEMU can launch processes compiled for one CPU on another CPU.

Kernel Support for miscellaneous (your favourite) Binary Formats



1.1 Features
http://qemu.weilnetz.de/qemu-doc.html#Introduction

QEMU is a FAST! processor emulator using dynamic translation to achieve good emulation speed.

QEMU has two operating modes:

    Full system emulation. In this mode, QEMU emulates a full system (for example a PC), including one or several processors and various peripherals. It can be used to launch different Operating Systems without rebooting the PC or to debug system code.
   
   User mode emulation. In this mode, QEMU can launch processes compiled for one CPU on another CPU. It can be used to launch the Wine Windows API emulator (http://www.winehq.org) or to ease cross-compilation and cross-debugging.


Kernel Support for miscellaneous (your favourite) Binary Formats v1.1  ==========================================
https://www.kernel.org/doc/Documentation/binfmt_misc.txt

This Kernel feature allows you to invoke almost (for restrictions see below)
every program by simply typing its name in the shell.
This includes for example compiled Java(TM), Python or Emacs programs.

To achieve this you must tell binfmt_misc which interpreter has to be invoked
with which binary. Binfmt_misc recognises the binary-type by matching some bytes
at the beginning of the file with a magic byte sequence (masking out specified
bits) you have supplied. Binfmt_misc can also recognise a filename extension
aka '.com' or '.exe'.

First you must mount binfmt_misc:
    mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc


Ref:
https://wiki.edubuntu.org/UbuntuDevelopment/Ports