Qemu X86

Overview

All Scenarios OS supports running the software stack into an virtual environment using Qemu.

Building OHOS image

To clone the source code, perform the procedure in: Setting up a repo workspace.

Building a Linux image

Build steps

  1. Source the environment with proper template settings, flavour being linux and target machine being qemux86. Pay attention to how relative paths are constructed. The value of TEMPLATECONF is relative to the location of the build directory ./build-ohos-linux, that is going to be created after this step:

$ TEMPLATECONF=../oniro/flavours/linux . ./oe-core/oe-init-build-env build-ohos-linux
  1. You will find yourself in the newly created build directory. Call bitbake to build the image. For example, if you are using allscenarios-image-base run the following command:

$ MACHINE=qemux86 bitbake allscenarios-image-base

Once the image is done, you can run the Qemu using the provided script wrapper:

$ MACHINE=qemux86 runqemu allscenarios-image-base wic