qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] PRoot: a new companion for QEMU user-mode


From: address@hidden
Subject: [Qemu-devel] PRoot: a new companion for QEMU user-mode
Date: Mon, 26 Mar 2012 13:28:23 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hello,

We are pleased to announce the first public release of PRoot, a tool
created to extend QEMU user-mode:

    http://proot.me

As you probably know, QEMU user-mode is mainly used with binfmt_misc,
chroot, and sometimes "mount --bind".  PRoot basically brings a
user-space implementation of these three kernel features to QEMU
user-mode, without requiring any privilege or setup.  PRoot was
designed with simplicity and consistency in mind, thus we do hope it
should ease the adoption of QEMU user-mode.

PRoot+QEMU can typically be used to build, develop, test, and debug
embedded applications directly on users' PC.  One of my favorite
example is the cross-compilation and cross-validation of Perl (the
prompts were changed for readability purpose only):

    <linux-x86>$ proot -Q qemu-arm /path/to/any/arm-rootfs/

    <linux-arm>$ cd perl-5.14.2/
    <linux-arm>$ ./Configure -de
    <linux-arm>$ make
    <linux-arm>$ make check

As you can see no cross-compilation support was required.  You can
also run programs non-interactively and pass options to QEMU.  For
instance the following command runs "/usr/bin/perl" directly and
activates the QEMU GDB server:

    <linux-x86>$ proot -Q "qemu-arm -g 1234" /path/to/any/arm-rootfs/ 
/usr/bin/perl

PRoot can also mix automatically the execution of host programs and
the execution of guest programs emulated by QEMU user-mode.  It's a
convenient way to speed up build-time by using a cross-compiler
instead of emulating the guest compiler.  Even when mixing such
applications, build-systems still believe they are running in a native
guest environment, as a consequence most cross-compilation issues are
avoided by design.  For instance, with a typical "./configure" script
(many lines were removed for readability purpose):

    <linux-x86>$ proot -Q qemu-arm /path/to/any/arm-rootfs/

    <linux-arm>$ ./configure 
CC=/host-rootfs/opt/devkit/armv7/bin/armv7-linux-gcc
    checking whether build environment is sane... yes
    checking build system type... armv7l-unknown-linux-gnueabi
    checking host system type... armv7l-unknown-linux-gnueabi
    checking for gcc... /host-rootfs/opt/devkit/armv7/bin/armv7-linux-gcc
    checking whether the C compiler works... yes
    checking whether we are cross compiling... no

Note that the purpose of PRoot and ScratchBox2 looks similiar, however
they are different in their architecture and usage.  One of the main
differences being that PRoot is a single command that doesn't require
any setup nor cross-compilation tools.

If you have some questions and/or comments, we will be pleased to
answer you either in this thread if its related to QEMU user-mode, or
in PRoot mailing-list/forum otherwise:

    http://proot.me/#help

Regards,
Cédric.

PS: sorry if you received this mail twice, it seems my first attempt
    was discarded.



reply via email to

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