summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/poky-qemu (renamed from scripts/runqemu-standalone)2
-rwxr-xr-xscripts/poky-qemu-ifup (renamed from scripts/qemu-ifup)0
-rwxr-xr-xscripts/poky-qemu-internal (renamed from scripts/runqemu-internal)2
-rw-r--r--scripts/poky-qemu.README96
-rwxr-xr-xscripts/runqemu4
-rw-r--r--scripts/runqemu.README61
6 files changed, 100 insertions, 65 deletions
diff --git a/scripts/runqemu-standalone b/scripts/poky-qemu
index 08829e933f..8710e05dd6 100755
--- a/scripts/runqemu-standalone
+++ b/scripts/poky-qemu
@@ -40,6 +40,6 @@ if [ "x$MACHINE" = "x" ]; then
40 MACHINE=`basename $ZIMAGE | sed -e 's#.*-\([a-z]*\)-*[0-9]*..*#\1#'` 40 MACHINE=`basename $ZIMAGE | sed -e 's#.*-\([a-z]*\)-*[0-9]*..*#\1#'`
41fi 41fi
42 42
43INTERNAL_SCRIPT=`which runqemu-internal` 43INTERNAL_SCRIPT=`which poky-qemu-internal`
44source $INTERNAL_SCRIPT 44source $INTERNAL_SCRIPT
45 45
diff --git a/scripts/qemu-ifup b/scripts/poky-qemu-ifup
index af081fb4d7..af081fb4d7 100755
--- a/scripts/qemu-ifup
+++ b/scripts/poky-qemu-ifup
diff --git a/scripts/runqemu-internal b/scripts/poky-qemu-internal
index 1ad0ef34b8..e13f1b6dbe 100755
--- a/scripts/runqemu-internal
+++ b/scripts/poky-qemu-internal
@@ -27,7 +27,7 @@
27# HDIMAGE - the disk image file to use 27# HDIMAGE - the disk image file to use
28# 28#
29 29
30QEMUIFUP=`which qemu-ifup` 30QEMUIFUP=`which poky-qemu-ifup`
31KERNEL_NETWORK_CMD="ip=192.168.7.2::192.168.7.1:255.255.255.0" 31KERNEL_NETWORK_CMD="ip=192.168.7.2::192.168.7.1:255.255.255.0"
32QEMU_NETWORK_CMD="-net nic,vlan=0 -net tap,vlan=0,ifname=tap0,script=$QEMUIFUP" 32QEMU_NETWORK_CMD="-net nic,vlan=0 -net tap,vlan=0,ifname=tap0,script=$QEMUIFUP"
33 33
diff --git a/scripts/poky-qemu.README b/scripts/poky-qemu.README
new file mode 100644
index 0000000000..1b4e763a38
--- /dev/null
+++ b/scripts/poky-qemu.README
@@ -0,0 +1,96 @@
1Poky images with QEMU
2=====================
3
4Poky can generate qemu bootable kernels and images with can be used
5on a desktop system. Both arm and x86 images can currently be booted.
6There are two scripts, runqemu and poky-qemu, one for use within poky,
7the other externally.
8
9QEMU outside Poky (poky-qemu)
10=============================
11
12The poky-qemu script is run as:
13
14 MACHINE=<machine> poky-qemu <zimage> <filesystem>
15
16where:
17
18 <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)
20 <machine> is "qemuarm" or "qemux86"
21
22The MACHINE=<machine> prefix is optional and without it the script will try
23to detect the machine name from the name of the <zimage> file.
24
25If <filesystem> isn't specified, nfs booting will be assumed.
26
27
28QEMU within Poky (runqemu)
29==========================
30
31The runqemu script is run as:
32
33 runqemu <target> <type> <zimage> <filesystem>
34
35where:
36
37 <target> is "qemuarm" or "qemux86"
38 <type> is "ext2" or "nfs"
39 <zimage> is the path to a kernel (zimage-qemuarm.bin)
40 <filesystem> is the path to an ext2 image (filesystem-qemuarm.ext2)
41
42It will default to the qemuarm, ext2 and the last kernel and oh-image-sdk
43image built by poky.
44
45
46Notes
47=====
48
49 - The scripts run qemu using sudo. Change perms on /dev/net/tun to
50 run as non root
51 - 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.
53 - The default NFS mount points are /srv/nfs/qemux86 or /srv/nfs/qemuarm
54 depending on the target type.
55 - You can set QEMU_MEMORY to control amount of available memory (default 64M).
56 - You can set SERIAL_LOGFILE to have the serial output from the image logged
57 to a file.
58
59
60NFS Image Notes
61===============
62
63As root;
64
65% apt-get install nfs-kernel-server
66
67% mkdir /srv/nfs/qemuarm
68
69Edit via /etc/exports :
70
71# /etc/exports: the access control list for filesystems which may be exported
72# to NFS clients. See exports(5).
73/srv/nfs/qemuarm 192.168.7.2(rw,no_root_squash)
74
75% /etc/init.d/nfs-kernel-server restart
76
77% modprobe tun
78
79untar build/tmp/deploy/images/<built image>.rootfs.tar.bz2 into /srv/nfs/qemuarm
80
81Finally, launch:
82
83% runqemu <target> nfs
84
85(Substitute qemux86 for qemuarm when using qemux86)
86
87
88Known Issues
89============
90
91 - There is a bug in the ARM qemu in that means occasionally it will use 100%
92 cpu. You will need to restart it in this situation.
93 - There is a problem with the ARM image not auto assigning an IP when using an
94 ext2 image. To have working TCP/IP connectivity run:
95 'ifconfig eth0 192.168.7.2 up'
96
diff --git a/scripts/runqemu b/scripts/runqemu
index 30fd0697c6..7ed080e20a 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -72,7 +72,7 @@ if [ "$MACHINE" = "qemux86" ]; then
72 fi 72 fi
73 if [ "$TYPE" = "ext2" ]; then 73 if [ "$TYPE" = "ext2" ]; then
74 if [ "x$HDIMAGE" = "x" ]; then 74 if [ "x$HDIMAGE" = "x" ]; then
75 HDIMAGE=$BUILDDIR/tmp/deploy/images/oh-image-pda-qemux86.ext2 75 HDIMAGE=$BUILDDIR/tmp/deploy/images/oh-image-sdk-qemux86.ext2
76 fi 76 fi
77 fi 77 fi
78 CROSSPATH=$BUILDDIR/tmp/cross/i586-poky-linux/bin 78 CROSSPATH=$BUILDDIR/tmp/cross/i586-poky-linux/bin
@@ -92,7 +92,7 @@ else
92 echo "Warning: distccd not present, no distcc support loaded" 92 echo "Warning: distccd not present, no distcc support loaded"
93fi 93fi
94 94
95INTERNAL_SCRIPT=`which runqemu-internal` 95INTERNAL_SCRIPT=`which poky-qemu-internal`
96source $INTERNAL_SCRIPT 96source $INTERNAL_SCRIPT
97 97
98if [ -x "$DISTCCD" ]; then 98if [ -x "$DISTCCD" ]; then
diff --git a/scripts/runqemu.README b/scripts/runqemu.README
deleted file mode 100644
index 2f68b85cb8..0000000000
--- a/scripts/runqemu.README
+++ /dev/null
@@ -1,61 +0,0 @@
1Using qemu with poky notes
2==========================
3
4Poky can generate qemu bootable kernels and images with can be used
5on a desktop system. Both arm and x86 images can currently be booted.
6The runqemu script is run as:
7
8 runqemu <target> <type> <zimage> <filesystem>
9
10where:
11
12 <target> is "qemuarm" or "qemux86"
13 <type> is "ext2" or "nfs"
14 <zimage> is the path to a kernel (zimage-qemuarm.bin)
15 <filesystem> is the path to an ext2 image (filesystem-qemuarm.ext2)
16
17It will default to the qemuarm, ext2 and the last kernel and oh-image-pda
18image built by poky.
19
20NFS Image Notes
21===============
22
23As root;
24
25% apt-get install nfs-kernel-server
26
27% mkdir /srv/nfs/qemuarm
28
29Edit via /etc/exports :
30
31# /etc/exports: the access control list for filesystems which may be exported
32# to NFS clients. See exports(5).
33/srv/nfs/qemuarm 192.168.7.2(rw,no_root_squash)
34
35% /etc/init.d/nfs-kernel-server restart
36
37% modprobe tun
38
39untar build/tmp/deploy/images/<built image>.rootfs.tar.bz2 into /srv/nfs/qemuarm
40
41Finally, launch:
42
43% runqemu <target> nfs
44
45(Substitute qemux86 for qemuarm when using qemux86)
46
47Notes
48=====
49
50 - The runqemu script runs qemu with sudo. Change perms on /dev/net/tun to
51 run as non root
52 - You can set QEMU_MEMORY env var to control amount of available memory
53 ( defaults to 64M )
54 - There is a bug in qemu in that means occasionally it will use 100% cpu.
55 You will need to restart it in this situation.
56
57More Info
58=========
59
60 - See http://o-hand.com/~richard/qemu.html
61