diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-04-21 11:57:36 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-04-21 12:56:13 +0100 |
commit | 91d72e6a992d5ed55c0af427e147c7ae3adc517c (patch) | |
tree | 6f7804bf7ef5b0f9547bfc6e61d82b3e6c33d174 | |
parent | 6b46c2aa94cc9a1dae24a3d54c32d003a790f2e4 (diff) | |
download | poky-91d72e6a992d5ed55c0af427e147c7ae3adc517c.tar.gz |
scripts/runqemu.README: Clean this up to accurately reflect what the runqemu command now does
(From OE-Core rev: 01ec9f0886cf106c5df3bba31de29319d7399e41)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | scripts/runqemu.README | 88 |
1 files changed, 20 insertions, 68 deletions
diff --git a/scripts/runqemu.README b/scripts/runqemu.README index 38f9306381..5908d831a4 100644 --- a/scripts/runqemu.README +++ b/scripts/runqemu.README | |||
@@ -1,90 +1,42 @@ | |||
1 | Poky images with QEMU | 1 | Using OE images with QEMU |
2 | ===================== | 2 | ========================= |
3 | 3 | ||
4 | Poky can generate qemu bootable kernels and images with can be used | 4 | OE-Core can generate qemu bootable kernels and images with can be used |
5 | on a desktop system. Both arm and x86 images can currently be booted. | 5 | on a desktop system. The scripts currently support booting ARM, MIPS, PowerPC |
6 | There are two scripts, runqemu and runqemu, one for use within poky, | 6 | and x86 (32 and 64 bit) images. The scripts can be used within the OE build |
7 | the other externally. | 7 | system or externaly. |
8 | |||
9 | QEMU outside Poky (runqemu) | ||
10 | ============================= | ||
11 | 8 | ||
12 | The runqemu script is run as: | 9 | The runqemu script is run as: |
13 | 10 | ||
14 | MACHINE=<machine> runqemu <zimage> <filesystem> | 11 | runqemu <machine> <zimage> <filesystem> |
15 | 12 | ||
16 | where: | 13 | where: |
17 | 14 | ||
15 | <machine> is the machine/architecture to use (qemuarm/qemumips/qemuppc/qemux86/qemux86-64) | ||
18 | <zimage> is the path to a kernel (e.g. zimage-qemuarm.bin) | 16 | <zimage> is the path to a kernel (e.g. zimage-qemuarm.bin) |
19 | <filesystem> is the path to an ext2 image (e.g. filesystem-qemuarm.ext2) | 17 | <filesystem> is the path to an ext2 image (e.g. filesystem-qemuarm.ext2) or an nfs directory |
20 | <machine> is "qemuarm" or "qemux86" | ||
21 | 18 | ||
22 | The MACHINE=<machine> prefix is optional and without it the script will try | 19 | If <machine> isn't specified, the script will try to detect the machine name |
23 | to detect the machine name from the name of the <zimage> file. | 20 | from the name of the <zimage> file. |
24 | 21 | ||
25 | If <filesystem> isn't specified, nfs booting will be assumed. | 22 | If <filesystem> isn't specified, nfs booting will be assumed. |
26 | 23 | ||
24 | When used within the build system, it will default to qemuarm, ext2 and the last kernel and | ||
25 | core-image-sato-sdk image built by the build system. If an sdk image isn't present it will look | ||
26 | for sato and minimal images. | ||
27 | 27 | ||
28 | QEMU within Poky (runqemu) | 28 | Full usage instructions can be seen by running the command with no options specified. |
29 | ========================== | ||
30 | |||
31 | The runqemu script is run as: | ||
32 | |||
33 | runqemu <target> <type> <zimage> <filesystem> | ||
34 | |||
35 | where: | ||
36 | |||
37 | <target> is "qemuarm","qemux86","nokia800","spitz" or "akita" | ||
38 | <type> is "ext2", "nfs", "ext3" or "jffs2". (not all machines support all options) | ||
39 | <zimage> is the path to a kernel (e.g. zimage-qemuarm.bin) | ||
40 | <filesystem> is the path to the image (e.g. filesystem-qemuarm.ext2) | ||
41 | |||
42 | It will default to the qemuarm, ext2 and the last kernel and core-image-sdk | ||
43 | image built by poky. | ||
44 | 29 | ||
45 | 30 | ||
46 | Notes | 31 | Notes |
47 | ===== | 32 | ===== |
48 | 33 | ||
49 | - The scripts run qemu using sudo. Change perms on /dev/net/tun to | 34 | - The scripts run qemu using sudo. Change perms on /dev/net/tun to |
50 | run as non root | 35 | run as non root. The runqemu-gen-tapdevs script can also be used by |
36 | root to prepopulate the appropriate network devices. | ||
51 | - You can access the host computer at 192.168.7.1 within the image. | 37 | - You can access the host computer at 192.168.7.1 within the image. |
52 | - Your qemu system will be accessible as 192.16.7.2. | 38 | - Your qemu system will be accessible as 192.16.7.2. |
53 | - The default NFS mount points are /srv/nfs/qemux86 or /srv/nfs/qemuarm | 39 | - The script extracts the root filesystem specified under pseudo and sets up a userspace |
54 | depending on the target type. | 40 | NFS server to share the image over by default meaning the filesystem can be accessed by |
55 | - Images built for qemux86/qemuarm contain NFS server which export whole | 41 | both the host and guest systems. |
56 | rootfs (/) in read/write mode. | ||
57 | - You can set QEMU_MEMORY to control amount of available memory (default 64M). | ||
58 | - You can set SERIAL_LOGFILE to have the serial output from the image logged | ||
59 | to a file. | ||
60 | |||
61 | |||
62 | NFS Image Notes | ||
63 | =============== | ||
64 | |||
65 | As root; | ||
66 | |||
67 | % apt-get install nfs-kernel-server | ||
68 | |||
69 | % mkdir /srv/nfs/qemuarm | ||
70 | |||
71 | Edit via /etc/exports : | ||
72 | |||
73 | # /etc/exports: the access control list for filesystems which may be exported | ||
74 | # to NFS clients. See exports(5). | ||
75 | /srv/nfs/qemuarm 192.168.7.2(rw,no_root_squash) | ||
76 | |||
77 | % /etc/init.d/nfs-kernel-server restart | ||
78 | |||
79 | % modprobe tun | ||
80 | |||
81 | untar build/tmp/deploy/images/<built image>.rootfs.tar.bz2 into /srv/nfs/qemuarm | ||
82 | |||
83 | Finally, launch: | ||
84 | |||
85 | % runqemu <target> nfs | ||
86 | |||
87 | (Substitute qemux86 for qemuarm when using qemux86) | ||
88 | |||
89 | 42 | ||
90 | Copyright (C) 2006-2008 OpenedHand Ltd. | ||