Skip to content

Commit

Permalink
kas: add QEMU emulation
Browse files Browse the repository at this point in the history
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 <jan.vermaete@gmail.com>
  • Loading branch information
vermaete committed May 7, 2024
1 parent 1bd8a72 commit 118f63b
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 10 deletions.
48 changes: 43 additions & 5 deletions kas/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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```

9 changes: 9 additions & 0 deletions kas/opendds.yaml
Original file line number Diff line number Diff line change
@@ -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"
58 changes: 58 additions & 0 deletions kas/qemu.yaml
Original file line number Diff line number Diff line change
@@ -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"
5 changes: 0 additions & 5 deletions kas/rpi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 118f63b

Please sign in to comment.