/[gentoo]/xml/htdocs/proj/en/base/embedded/handbook/cross-qemu.xml
Gentoo

Diff of /xml/htdocs/proj/en/base/embedded/handbook/cross-qemu.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.6 Revision 1.7
1<?xml version='1.0' encoding='UTF-8'?> 1<?xml version='1.0' encoding='UTF-8'?>
2<!DOCTYPE sections SYSTEM "/dtd/book.dtd"> 2<!DOCTYPE sections SYSTEM "/dtd/book.dtd">
3<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/base/embedded/handbook/cross-qemu.xml,v 1.6 2013/12/06 18:49:32 armin76 Exp $ --> 3<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/base/embedded/handbook/cross-qemu.xml,v 1.7 2013/12/11 07:16:48 vapier Exp $ -->
4 4
5<!-- The content of this document is licensed under the CC-BY-SA license --> 5<!-- The content of this document is licensed under the CC-BY-SA license -->
6<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> 6<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
7 7
8<sections> 8<sections>
9 9
10<abstract> 10<abstract>
11How To compile with QEMU user. 11How To compile with QEMU user.
12</abstract> 12</abstract>
13 13
14<version>0.4</version> 14<version>0.5</version>
15<date>2013-13-06</date> 15<date>11 Dec 2013</date>
16 16
17<section> 17<section>
18<title>Usage</title> 18<title>Usage</title>
19<body> 19<body>
20 20
21<p> 21<p>
22In order to take advantage of qemu-user mode we need to do a few things. First 22In order to take advantage of QEMU user mode we need to do a few things. First
23we need to merge the main package we are going to need. Note the use of the 23we need to merge the QEMU package with the right settings. That means building
24<c>static</c> use flag. 24it with USE=static and setting QEMU_USER_TARGETS to include the targets we want
25to utilize.
25</p> 26</p>
26 27
27<pre caption="Installing qemu-user"> 28<pre caption="Building QEMU">
29<comment>See the portage(5) man page for other ways of doing this.</comment>
30# <i>echo app-emulation/qemu static &gt; /etc/portage/package.use</i>
31
32<comment>Tweak the list here to include the target(s) you care about.
33See the `emerge -pv qemu` output for the full list.
34See the portage(5) man page for other ways of doing this than make.conf.</comment>
35# <i>echo 'QEMU_SOFTMMU_TARGETS="alpha arm i386 mips mips64 mips64el mipsel ppc ppc64 s390x sh4 sh4eb sparc sparc64 x86_64"' &gt;&gt; /etc/portage/make.conf</i>
36# <i>echo 'QEMU_USER_TARGETS="alpha arm armeb i386 mips mipsel ppc ppc64 ppc64abi32 s390x sh4 sh4eb sparc sparc32plus sparc64"' &gt;&gt; /etc/portage/make.conf</i>
37
38<comment>Then install the package!</comment>
28# <i>USE=static emerge -b1 app-emulation/qemu-user</i> 39# <i>emerge -1 app-emulation/qemu</i>
29</pre> 40</pre>
30 41
31<p> 42<p>
32Next we need to build the kernel module <c>binfmt_misc</c>. 43Next we need to build the kernel module <c>binfmt_misc</c>.
33Add this to your kernel <path>.config</path>: 44Add this to your kernel <path>.config</path>:
62<comment>(Download your desired stage tarball)</comment> 73<comment>(Download your desired stage tarball)</comment>
63# <i>wget http://arch-stageball</i> 74# <i>wget http://arch-stageball</i>
64<comment>(Unpack the tarball)</comment> 75<comment>(Unpack the tarball)</comment>
65# <i>tar -xzvf arch-stageball</i> 76# <i>tar -xzvf arch-stageball</i>
66# <i>cd arch-stageball</i> 77# <i>cd arch-stageball</i>
67<comment>(Install the static qemu-user into the chroot)</comment> 78<comment>(Install the static qemu user into the chroot)</comment>
68# <i>ROOT=$PWD/ emerge -K qemu-user</i> 79# <i>ROOT=$PWD/ emerge -K qemu user</i>
69# <i>mkdir -p usr/portage</i> 80# <i>mkdir -p usr/portage</i>
70<comment>(Mount the required directories)</comment> 81<comment>(Mount the required directories)</comment>
71# <i>mount --bind /usr/portage usr/portage</i> 82# <i>mount --bind /usr/portage usr/portage</i>
72# <i>mount --bind /proc proc</i> 83# <i>mount --bind /proc proc</i>
73# <i>mount --bind /sys sys</i> 84# <i>mount --bind /sys sys</i>

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.20