xref: /OK3568_Linux_fs/yocto/poky/scripts/runqemu.README (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunUsing OE images with QEMU
2*4882a593Smuzhiyun=========================
3*4882a593Smuzhiyun
4*4882a593SmuzhiyunOE-Core can generate qemu bootable kernels and images which can be used
5*4882a593Smuzhiyunon a desktop system. The scripts currently support booting ARM, MIPS, PowerPC
6*4882a593Smuzhiyunand x86 (32 and 64 bit) images. The scripts can be used within the OE build
7*4882a593Smuzhiyunsystem or externally.
8*4882a593Smuzhiyun
9*4882a593SmuzhiyunThe runqemu script is run as:
10*4882a593Smuzhiyun
11*4882a593Smuzhiyun   runqemu <machine> <zimage> <filesystem>
12*4882a593Smuzhiyun
13*4882a593Smuzhiyunwhere:
14*4882a593Smuzhiyun
15*4882a593Smuzhiyun   <machine> is the machine/architecture to use (qemuarm/qemumips/qemuppc/qemux86/qemux86-64)
16*4882a593Smuzhiyun   <zimage> is the path to a kernel (e.g. zimage-qemuarm.bin)
17*4882a593Smuzhiyun   <filesystem> is the path to an ext2 image (e.g. filesystem-qemuarm.ext2) or an nfs directory
18*4882a593Smuzhiyun
19*4882a593SmuzhiyunIf <machine> isn't specified, the script will try to detect the machine name
20*4882a593Smuzhiyunfrom the name of the <zimage> file.
21*4882a593Smuzhiyun
22*4882a593SmuzhiyunIf <filesystem> isn't specified, nfs booting will be assumed.
23*4882a593Smuzhiyun
24*4882a593SmuzhiyunWhen used within the build system, it will default to qemuarm, ext2 and the last kernel and
25*4882a593Smuzhiyuncore-image-sato-sdk image built by the build system. If an sdk image isn't present it will look
26*4882a593Smuzhiyunfor sato and minimal images.
27*4882a593Smuzhiyun
28*4882a593SmuzhiyunFull usage instructions can be seen by running the command with no options specified.
29*4882a593Smuzhiyun
30*4882a593Smuzhiyun
31*4882a593SmuzhiyunNotes
32*4882a593Smuzhiyun=====
33*4882a593Smuzhiyun
34*4882a593Smuzhiyun - The scripts run qemu using sudo. Change perms on /dev/net/tun to
35*4882a593Smuzhiyun   run as non root. The runqemu-gen-tapdevs script can also be used by
36*4882a593Smuzhiyun   root to prepopulate the appropriate network devices.
37*4882a593Smuzhiyun - You can access the host computer at 192.168.7.1 within the image.
38*4882a593Smuzhiyun - Your qemu system will be accessible as 192.168.7.2.
39*4882a593Smuzhiyun - The script extracts the root filesystem specified under pseudo and sets up a userspace
40*4882a593Smuzhiyun   NFS server to share the image over by default meaning the filesystem can be accessed by
41*4882a593Smuzhiyun   both the host and guest systems.
42*4882a593Smuzhiyun
43