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