-
Notifications
You must be signed in to change notification settings - Fork 0
Build and run a QEMU image
unitexe edited this page Jan 19, 2025
·
3 revisions
Build and run a QEMU image.
source ~/.venv.yocto/bin/activate
Configure the build, work, sstate and download directories based on the distro, machine and release.
export KAS_CONTAINER_ENGINE=podman
export KAS_BUILD_DIR="/home/$(whoami)/dev/yocto/unit/build/scarthgap/poky/qemuarm64/"
export KAS_WORK_DIR=$KAS_BUILD_DIR
export SSTATE_DIR="/home/$(whoami)/dev/yocto/unit/build/scarthgap/sstate/"
export DL_DIR="/home/$(whoami)/dev/yocto/unit/dl"
- To use
docker
instead ofpodman
don't setKAS_CONTAINER_ENGINE
as it is docker by default - The
KAS_BUILD_DIR
will vary based on the distro, machine and release being targeted - Update
KAS_WORK_DIR
wheneverKAS_BUILD_DIR
changes - The
SSTATE_DIR
will vary based on the release being targeted, all distro and machine combinations for a particular release share the same sstate cache - The same
DL_DIR
is used for all combinations of distro/machine/release
If this is the first time building for this particular combination of release/distro/machine then create the KAS_BUILD_DIR
as it won't get created automatically. The sstate and download directories will get automatically created by bitbake.
mkdir -p $KAS_BUILD_DIR
kas-container build images/poky/qemuarm64/core-image-base/scarthgap.yml
This step is unique to images targeting QEMU machines.
kas-container --runtime-args --privileged shell images/poky/qemuarm64/core-image-base/scarthgap.yml -c 'runqemu slirp nographic'