3.6.4. Setting Up the Environment and Starting the QEMU Emulator

Before you start the QEMU emulator, you need to set up the emulation environment. The following command form sets up the emulation environment.

     $ source /opt/poky//environment-setup-arch-poky-linux-if

     Where:
         arch is a string representing the target architecture:
                i586, x86_64, ppc603e, mips, or armv5te.

         if is a string representing an embedded application binary interface.
              Not all setup scripts include this string.
                

Finally, this command form invokes the QEMU emulator

     $ runqemu qemuarch kernel-image filesystem-image

     Where:
         qemuarch is a string representing the target architecture: qemux86, qemux86-64,
                    qemuppc, qemumips, or qemuarm.

         kernel-image is the architecture-specific kernel image.

         filesystem-image is the .ext3 filesystem image.

                

Continuing with the example, the following two commands setup the emulation environment and launch QEMU. This example assumes the root filesystem (.ext3 file) and the pre-built kernel image file both reside in your home directory. The kernel and filesystem are for a 32-bit target architecture.

     $ cd $HOME
     $ source /opt/poky//environment-setup-i586-poky-linux
     $ runqemu qemux86 bzImage-qemux86.bin \
     core-image-sato-qemux86.ext3
                

The environment in which QEMU launches varies depending on the filesystem image and on the target architecture. For example, if you source the environment for the ARM target architecture and then boot the minimal QEMU image, the emulator comes up in a new shell in command-line mode. However, if you boot the SDK image, QEMU comes up with a GUI.

Note

Booting the PPC image results in QEMU launching in the same shell in command-line mode.