From 118f63bc8cb74a5cd88fb2de55382998f379cf54 Mon Sep 17 00:00:00 2001 From: Jan Vermaete Date: Tue, 7 May 2024 20:03:50 +0200 Subject: [PATCH] kas: add QEMU emulation Added the instruction to build the image with OpenDDS for QEMU with kas. With QEMU it is possible to run the testsuite of OpenDDS without real hardware target. This could be used for regression testing. Note that building the image with the ishapes demo is not possible for QEMU. Signed-off-by: Jan Vermaete --- kas/README.md | 48 ++++++++++++++++++++++++++++++++++----- kas/opendds.yaml | 9 ++++++++ kas/qemu.yaml | 58 ++++++++++++++++++++++++++++++++++++++++++++++++ kas/rpi.yaml | 5 ----- 4 files changed, 110 insertions(+), 10 deletions(-) create mode 100644 kas/opendds.yaml create mode 100644 kas/qemu.yaml diff --git a/kas/README.md b/kas/README.md index b563911..60d4d14 100644 --- a/kas/README.md +++ b/kas/README.md @@ -25,11 +25,21 @@ git clone https://github.com/OpenDDS/meta-opendds.git Building -------- +### Rasberry Pi 4 + +``` +cd meta-opendds +kas build kas/rpi.yaml:kas/opendds.yaml; # Just OpenDDS for RPi +kas build kas/rpi.yaml:kas/opendds.yaml:kas/ishapes.yaml; # iShapes demo +kas build kas/rpi.yaml:kas/opendds.yaml:kas/ptests.yaml; # OpenDDS with Yocto ptests +``` + +### Qemu + ``` cd meta-opendds -kas build kas/rpi.yaml; # Just OpenDDS for RPi -kas build kas/rpi.yaml:kas/ishapes.yaml; # iShapes demo -kas build kas/rpi.yaml:kas/ptests.yaml; # OpenDDS with Yocto ptests +kas build kas/qemu.yaml:kas/opendds.yaml; +kas build kas/qemu.yaml:kas/opendds.yaml:kas/ptests.yaml; # OpenDDS with Yocto ptests ``` Deploying @@ -47,14 +57,42 @@ sudo bmaptool copy core-image-minimal-xfce-raspberrypi4-64.rootfs.wic.bz2 /dev/s Testing ------- -### Run the ishapes demo +### Raspberry Pi + +#### Run the ishapes demo Open a terminal on the Raspberry Pi. Run `ishapes` -### Running the Yocto ptests for OpenDDS +#### Running the Yocto ptests for OpenDDS Open a terminal on the Raspberry Pi. Run `ptest-runner opendds` A detailed log of the run can be found on the `/tmp` of the device. + +### qemu + +#### Start QEMU + +``` +kas sheel kas/qemu.yaml:kas/opendds.yaml:kas/ptests.yaml +cd tmp/deploy/images/qemux86-64 +runqemu core-image-minimal-qemux86-64.rootfs.qemuboot.conf qemux86-64 nographic +``` + +#### Login + +* user root +* no password + +#### Run the ptests + +``` +root@quemu-opendds:~# ptest-runner opendds +``` + +#### Exit + +```CTRL-a + x``` + diff --git a/kas/opendds.yaml b/kas/opendds.yaml new file mode 100644 index 0000000..f7f3865 --- /dev/null +++ b/kas/opendds.yaml @@ -0,0 +1,9 @@ +header: + version: 1 + +local_conf_header: + opendds: | + IMAGE_INSTALL:append = " opendds" + PACKAGECONFIG:append:pn-opendds = " doc-group3" + PACKAGECONFIG:append:pn-opendds-native = " doc-group3" + INHERIT += "cve-check" diff --git a/kas/qemu.yaml b/kas/qemu.yaml new file mode 100644 index 0000000..3f9f246 --- /dev/null +++ b/kas/qemu.yaml @@ -0,0 +1,58 @@ +header: + version: 1 + +machine: qemux86-64 + +distro: poky + +repos: + meta-opendds: + poky: + url: https://git.yoctoproject.org/git/poky + path: layers/poky + branch: scarthgap + layers: + meta: + meta-poky: + meta-openembedded: + url: http://git.openembedded.org/meta-openembedded + path: layers/meta-openembedded + branch: scarthgap + layers: + meta-oe: + meta-python: + meta-networking: + meta-perl: + +bblayers_conf_header: + standard: | + POKY_BBLAYERS_CONF_VERSION = "2" + BBPATH = "${TOPDIR}" + BBFILES ?= "" + +local_conf_header: + standard: | + CONF_VERSION = "2" + SDKMACHINE = "x86_64" + USER_CLASSES = "buildstats" + debug-tweaks: | + EXTRA_IMAGE_FEATURES = "debug-tweaks" + IMAGE_ROOTFS_EXTRA_SPACE = "1524288" + diskmon: | + BB_DISKMON_DIRS = "\ + STOPTASKS,${TMPDIR},1G,100K \ + STOPTASKS,${DL_DIR},1G,100K \ + STOPTASKS,${SSTATE_DIR},1G,100K \ + STOPTASKS,/tmp,100M,100K \ + HALT,${TMPDIR},100M,1K \ + HALT,${DL_DIR},100M,1K \ + HALT,${SSTATE_DIR},100M,1K \ + HALT,/tmp,10M,1K" + network: | + IMAGE_FEATURES:append = " ssh-server-openssh" + hostname:pn-base-files = "quemu-opendds" + system: | + DISTRO_FEATURES:append = " systemd usrmerge" + VIRTUAL-RUNTIME_init_manager = "systemd" + qemu: | + QB_MEM = "-m 4096" diff --git a/kas/rpi.yaml b/kas/rpi.yaml index 83b8e06..85e2ab7 100644 --- a/kas/rpi.yaml +++ b/kas/rpi.yaml @@ -63,8 +63,3 @@ local_conf_header: system: | DISTRO_FEATURES:append = " systemd usrmerge" VIRTUAL-RUNTIME_init_manager = "systemd" - opendds: | - IMAGE_INSTALL:append = " opendds" - PACKAGECONFIG:append:pn-opendds = " doc-group3" - PACKAGECONFIG:append:pn-opendds-native = " doc-group3" - INHERIT += "cve-check"