From 36716d7b4d87e8eb671009de73f86891b57a8f04 Mon Sep 17 00:00:00 2001 From: Isaac Hermida Date: Mon, 30 Mar 2026 17:00:54 +0200 Subject: [PATCH] dey-image-container: webkit/lvgl: add podman create args Populate the DCP manifest for the ccmp25 lvgl and webkit profiles with the Podman runtime arguments required to create the containers on the target. Keep only runtime options in CONTAINER_CREATE_ARGS_PODMAN and compose the entrypoint automatically from CONTAINER_INIT_MANAGER and CONTAINER_INIT_SCRIPT when generating the Podman artifact metadata. https://onedigi.atlassian.net/browse/DEL-10033 Signed-off-by: Isaac Hermida --- .../images/dey-image-container-artifact.inc | 19 ++++++ .../images/dey-image-container.bb | 59 +++++++++++++++++++ 2 files changed, 78 insertions(+) diff --git a/meta-digi-containers/recipes-core/images/dey-image-container-artifact.inc b/meta-digi-containers/recipes-core/images/dey-image-container-artifact.inc index 794388023..c17e1f131 100644 --- a/meta-digi-containers/recipes-core/images/dey-image-container-artifact.inc +++ b/meta-digi-containers/recipes-core/images/dey-image-container-artifact.inc @@ -44,6 +44,22 @@ do_image_container_artifacts() { printf '%s' "$1" | sed 's/\\/\\\\/g; s/"/\\"/g' } + compose_podman_create_args() { + base_args="$1" + + if [ -n "${CONTAINER_INIT_MANAGER}" ] && [ -n "${CONTAINER_INIT_SCRIPT}" ]; then + entrypoint_json="[\"${CONTAINER_INIT_MANAGER}\",\"${CONTAINER_INIT_SCRIPT}\"]" + if [ -n "${base_args}" ]; then + printf "%s --entrypoint '%s'" "${base_args}" "${entrypoint_json}" + else + printf "%s" "--entrypoint '${entrypoint_json}'" + fi + return 0 + fi + + printf '%s' "${base_args}" + } + write_manifest() { artifact_dir="$1" runtime="$2" @@ -123,6 +139,9 @@ do_image_container_artifacts() { digest="$(sha256sum "${artifact_dir}/payload/${payload_name}" | awk '{print $1}')" size_bytes="$(stat -c %s "${artifact_dir}/payload/${payload_name}")" created_at="$(date -u +%Y-%m-%dT%H:%M:%SZ)" + if [ "${runtime}" = "podman" ]; then + create_args="$(compose_podman_create_args "${create_args}")" + fi build_id="${CONTAINER_ARTIFACT_BUILD_ID}" if [ -z "${build_id}" ]; then if command -v git >/dev/null 2>&1; then diff --git a/meta-digi-containers/recipes-core/images/dey-image-container.bb b/meta-digi-containers/recipes-core/images/dey-image-container.bb index 2d0beace5..3c328fa5f 100644 --- a/meta-digi-containers/recipes-core/images/dey-image-container.bb +++ b/meta-digi-containers/recipes-core/images/dey-image-container.bb @@ -99,6 +99,20 @@ IMAGE_INSTALL = " \ # Container type customizations LVGL ######################## CONTAINER_INIT_SCRIPT:container-lvgl = "/start-lvgl-demo.sh" +CONTAINER_CREATE_ARGS_PODMAN:container-lvgl:ccmp25 = " \ + --privileged \ + --network none \ + --tmpfs /dev/shm:rw,nosuid,nodev,mode=1777 \ + --device /dev/dri \ + --device /dev/input \ + --device /dev/galcore \ + --device /dev/tty \ + --device /dev/tty0 \ + --device /dev/tty1 \ + --device /dev/tty7 \ + --volume /run/udev:/run/udev:ro \ + --tty \ +" IMAGE_INSTALL:append:container-lvgl = " \ lvgl-demo \ weston \ @@ -110,6 +124,51 @@ DISTRO_FEATURES:remove:container-lvgl = " wayland" # Container type customizations webkit ######################## CONTAINER_INIT_SCRIPT:container-webkit = "/start-webkit-demo.sh" +CONTAINER_CREATE_ARGS_PODMAN:container-webkit:ccmp25 = " \ + --privileged \ + --network host \ + --tmpfs /dev/shm:rw,nosuid,nodev,mode=1777 \ + --device /dev/dri \ + --device /dev/input \ + --device /dev/galcore \ + --device /dev/fb0 \ + --device /dev/snd \ + --device /dev/tty \ + --device /dev/tty0 \ + --device /dev/tty1 \ + --device /dev/tty7 \ + --device /dev/gpiochip5 \ + --device /dev/mmcblk0boot0 \ + --device /dev/mmcblk0boot1 \ + --device /dev/mailbox0 \ + --device /dev/video0 \ + --device /dev/video1 \ + --device /dev/video2 \ + --device /dev/video3 \ + --device /dev/video4 \ + --device /dev/video5 \ + --device /dev/video6 \ + --device /dev/media0 \ + --device /dev/media1 \ + --device /dev/media2 \ + --device /dev/v4l-subdev0 \ + --device /dev/v4l-subdev1 \ + --device /dev/v4l-subdev2 \ + --device /dev/v4l-subdev3 \ + --device /dev/v4l-subdev4 \ + --device /dev/v4l-subdev5 \ + --device /dev/v4l-subdev6 \ + --device /dev/v4l-subdev7 \ + --volume /run/udev:/run/udev:ro \ + --volume /etc/asound.conf:/etc/asound.conf:ro \ + --volume /run/pulse:/run/pulse \ + --volume /run/dbus/system_bus_socket:/run/dbus/system_bus_socket \ + --volume /dev/log:/dev/log \ + --volume /run/systemd/journal:/run/systemd/journal \ + --volume /etc/fw_env.config:/etc/fw_env.config:ro \ + --env PULSE_SERVER=unix:/run/pulse/native \ + --tty \ +" IMAGE_INSTALL:append:container-webkit = " \ adwaita-icon-theme-symbolic \ alsa-utils \