From c25d01823bb2d18758ff5eb12c5cc7d3b9a47be7 Mon Sep 17 00:00:00 2001 From: Naveen Saini Date: Tue, 26 Nov 2019 18:38:49 +0800 Subject: [PATCH] doc: add user guide for zephyr uos Signed-off-by: Naveen Saini --- docs/getting-started-zephyr.md | 111 +++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 docs/getting-started-zephyr.md diff --git a/docs/getting-started-zephyr.md b/docs/getting-started-zephyr.md new file mode 100644 index 00000000..320a6a5b --- /dev/null +++ b/docs/getting-started-zephyr.md @@ -0,0 +1,111 @@ +Getting Started +--------------- + +Build acrn sos image having zephyr uos. + +Dependencies +------------ + +This layer depends on: + +| meta layer | git repository | +|-------------------|------------------------------------------------| +| poky | https://git.yoctoproject.org/git/poky | +| meta-intel | https://git.yoctoproject.org/git/meta-intel | +| meta-acrnl | https://github.com/intel/meta-acrn.git | +| meta-zephyr | https://git.yoctoproject.org/git/meta-zephyr | + + + +Configuration +------------- + +############################################################################################ + +Append below configuration to local.conf as follows: + +``` +MACHINE = "intel-corei7-64" +TMPDIR = "${TOPDIR}/master-acrn-sos" +DISTRO = "acrn-demo-sos" +PREFERRED_PROVIDER_virtual/kernel = "linux-intel-acrn-sos" + +# Also use the 'uos' & 'zephyr' configuration +BBMULTICONFIG = "uos zephyr" + +# The packages-from-images class (container-package.bbclass) needs to know where images are +CONTAINER_PACKAGE_DEPLOY_DIR = "${TOPDIR}/master-acrn-uos/deploy/images/${MACHINE}" +CONTAINER_PACKAGE_ZEPHYR_DEPLOY_DIR = "${TOPDIR}/master-zephyr-app/deploy/images/acrn" +CONTAINER_PACKAGE_MC = "uos" + +# Zephyr application to be build & run +ZEPHYR_APP = "zephyr-helloworld" + +# Add zephyr-image-base-package to acrn-image-base +IMAGE_INSTALL_append_pn-acrn-image-base = " zephyr-image-package" +``` +############################################################################################ + +Configure `conf/multiconfig/uos.conf` as follows: + +``` +DISTRO="acrn-demo-uos" +TMPDIR = "${TOPDIR}/master-acrn-uos" +PREFERRED_PROVIDER_virtual/kernel = "linux-intel-acrn-uos" +``` +############################################################################################ + +Configure `conf/multiconfig/zephyr.conf` as follows: + +``` +MACHINE= "acrn" +DISTRO = "zephyr" +TMPDIR="${TOPDIR}/master-zephyr-app" +``` +############################################################################################ + +Note: Remember to keep TMPDIR in sync. + + +Build +----- + + +Execute below commands sequentially in order to build the sos image shipped with zephyr uos: + + +``` +$ bitbake mc:zephyr:zephyr-helloworld +``` +This should build you a `*.elf` in the master-zephyr-app image directory. +Now prepare zephyr image with grub-efi: + + +``` +$ bitbake mc:uos:zephyr-image +``` +This should build you a `zephyr.img` in the uosp image directory. Time to build your acrn image: + + +``` +$ bitbake acrn-image-base +``` + +Building `acrn-image-base` will build a `wic.acrn` image that on first boot will be normal Linux +but will setup EFI entries so that subsequent boots are inside ACRN. Alternatively use the EFI +shell, assuming you've got the image on a USB stick something like this works: + +``` +> fs1: +> \EFI\BOOT\acrn.efi +``` + +Run zephyr uos +-------------- +``` + $/var/lib/machines/launch_zephyr.sh +``` + + + +