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 \