The document introduces the Yocto Project and the meta-acrn layer. It describes how the meta-acrn layer integrates the ACRN hypervisor with Yocto to provide kernel support and customized images for Service OS and User OS. It outlines the steps to configure and build Service OS and User OS images, including deploying the UOS images into the SOS image. It also explains how to boot ACRN using the built images from the ESP or EFI shell.
4. Yocto Project
➢ Linux Foundation collaborative open source project
➢ Standard tools and process for building embedded Linux
➢ Based on the well-established OpenEmbedded Project
➢ It’s not a Linux distribution!
➢ Core components: bitbake, oe-core, Poky distro, BSP layers
5. Yocto Project
➢ Development model of the Yocto Project is Layer model.
➢ Layers are repositories that contain related sets of instructions that tell the
build system what to do.
➢ Layers can be BSP, GUI, distro configuration, middleware or application
layers.
➢ https://git.yoctoproject.org/
9. Meta-acrn
➢Integrate ACRN hypervisor with the yocto project.
➢Provides kernel support
➢Linux-intel-lts
➢Linux-intel-rt
➢Acrn-kernel
➢Maintains additional acrn specific kernel configuration for both Service OS
and User OS
10. Meta-acrn
➢Distro configurations
➢acrn-demo-sos.conf for Service OS
➢acrn-demo-uos.conf for User OS
➢Provides customized image configuration for ACRN
➢acrn-image-base (small footprint, non GUI)
➢acrn-image-sato(GUI with X11)
➢acrn-image-Weston (GUI with Weston)
➢Additional patches for ACRN
➢Network and systemd
11. Meta-acrn Dependencies
➢ Meta-acrn has dependency on meta-intel layer too besides Core components.
➢ MACHINE configuration ie. intel-corei7-64 and intel-skylake-64
➢ Common Kernel configuration for IA
➢ Media software stack
➢ Carry few other recipe components, to remove dependencies on other layers
➢ Python-kconfiglib
➢ Numactl
13. How to build Service OS
➢Clone source repos
$ git clone http://git.yoctoproject.org/git/poky
$ cd poky
$ git clone https://git.yoctoproject.org/git/meta-intel
$ git clone https://github.com/intel/meta-acrn.git
➢ Run environment script
$ source oe-init-build-env
➢ Add meta-intel & meta-acrn to bblayers.conf
$ echo "BBLAYERS += "/path/to/meta-intel"" >> conf/bblayers.conf
$ echo "BBLAYERS += "/path/to/meta-acrn"" >> conf/bblayers.conf
14. Configure Service OS
➢Append below configuration in conf/local.conf
MACHINE = "intel-corei7-64"
TMPDIR = "${TOPDIR}/master-acrn-sos"
DISTRO = "acrn-demo-sos“
PREFERRED_PROVIDER_virtual/kernel = "linux-intel-acrn-sos"
15. Multiconfiguration Build
➢ To build different images or packages for different targets
➢ Require different configuration
uos.conf
Build Directory
conf
multiconfig
local.conf
16. Configure User OS
➢ Add below configuration in conf/multiconf/uos.conf
DISTRO = "acrn-demo-uos"
TMPDIR = "${TOPDIR}/master-acrn-uos"
PREFERRED_PROVIDER_virtual/kernel = "linux-intel-acrn-uos”
17. Configure User OS(Deploying UOS images into SOS image)
➢Additionally append below configuration in conf/local.conf
BBMULTICONFIG = "uos“
CONTAINER_PACKAGE_DEPLOY_DIR = "${TOPDIR}/master-acrn-
uos/deploy/images/${MACHINE}“
CONTAINER_PACKAGE_MC = "uos“
# Add core-image-base-package to acrn-image-base
IMAGE_INSTALL_append_pn-acrn-image-base = " core-image-base-package“
# Add core-image-sato-package to acrn-image-sato
IMAGE_INSTALL_append_pn-acrn-image-sato = " core-image-sato-package"
18. Configure User OS
➢ Build SOS image.
$ bitbake acrn-image-base
Or
$ bitbake acrn-image-sato
➢ To re-use the sstate, in order to reduce build time, first build UOS and then SOS image.
$ bitbake mc:uos:core-image-base
$ bitbake acrn-image-base
Or
$ bitbake mc:uos:core-image-sato
$ bitbake acrn-image-sato
➢ On Successful build, SOS image acrn-image-*-intel-corei7-64.wic.acrn image can be
found at master-acrn-sos/deploy/images/${MACHINE}/
20. Booting ACRN from ESP
➢image-acrn.bbclass
➢Creates a modified wic image with acrn.efi injected to ESP
➢First boot only: update EFI boot order to boot ACRN first
➢Shipping acrn-efi-setup.sh script which invokes efibootmgr to setup boot entry for acrn
efi.
➢On first boot, will be normal Linux but will setup EFI entries so that subsequent boots
are inside ACRN.
21. Booting ACRN
➢ If you are using USB stick to boot, alternatively use the EFI shell, something like this
works:
> fs1:
> EFIBOOTacrn.efi
➢ On successful boot of SOS, you can launch UOS using:
$ /var/lib/machine/launch-bash.sh