Commit Graph

50 Commits

Author SHA1 Message Date
Isaac Hermida 2bbaa723b0 dey-image-container: remove old DCP artifacts when RM_OLD_IMAGE is set
dey-image-container is not a full image, so the regular image cleanup
does not remove old DCP artifacts from the deploy directory.
Add a dedicated cleanup task that honors RM_OLD_IMAGE and removes previous
LXC and Podman DCP artifacts before generating the new ones.

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-05-14 18:02:27 +02:00
Isaac Hermida d54f8b7281 dey-image-container: flatten LXC payload layout
Generate the LXC payload tarball with config and rootfs/ at the
archive root so it matches the documented DCP format and the strict
installer expectations.

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-05-14 18:02:27 +02:00
Isaac Hermida 2c9a8d9ca0 dey-image-container-manager: add recommended Wi-Fi tools
Add the complete Digi recommended set of Wi-Fi tools, if not wpa-cli or
hostapd are not included.

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-05-07 12:24:28 +02:00
Isaac Hermida a8d8aeade8 cc-container-mng: switch to proprietary 1.0.0 tarball source
The package is no longer fetched from Git, so rename the recipe to a
versioned .bb file and fetch the proprietary artifact from Digi server.

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-05-07 12:20:18 +02:00
Isaac Hermida b33ad27ba5 meta-digi-containers: add recipe for dey-image-container-manager-swu
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-05-07 12:19:48 +02:00
Arturo Buzarra 4039e2e4e2 cc-container-mng: fix license checksum
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2026-05-06 22:24:58 +02:00
Isaac Hermida f9da8e8db6 cc-containerd: run shutdown helper from shutdown.target
The shutdown helper was installed and enabled, but during reboot it was
never started.
Hook the helper directly into shutdown.target.

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-05-05 08:48:28 +02:00
Isaac Hermida 9576c20113 meta-digi-containers: remove DRM options
The DRM support is still a work in progress feature and is not ready yet.

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-04-30 13:00:13 +02:00
Isaac Hermida 0df6685a07 cccsd: add syslog dependency
The Cloud Connector depends on syslog for logging, so this package is
required to properly collect its messages.

https://onedigi.atlassian.net/browse/DEL-10080

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-04-30 12:55:07 +02:00
Francisco Gil 6f1080025c dey-image-container: clean temporary task directories reliably
Create task temporary directories under `${T}` instead of the host `/tmp`
and remove them when the task exits.

This avoids leaving large temporary directories behind during container
artifact generation.

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2026-04-30 07:37:10 +02:00
Francisco Gil cc2630c59e ccimx95: dey-image-container: add chromium base image
Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2026-04-30 07:37:10 +02:00
Francisco Gil c2c4edac9b ccimx95: dey-image-container: create base image for flutter/lvgl
Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2026-04-30 07:37:10 +02:00
Isaac Hermida 267f78ac9d containers: derive DCP package id from logical name
Generate the package if from logical name when it is not specified in
the json. If case it is set, use it.

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-04-24 09:14:00 +02:00
Isaac Hermida 3b93a2c2e1 containers: preserve friendly names in generated DCP manifests
Propagate an optional manifest name field through the DCP generator, so the
container manager can publish friendly names DRM.

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-04-24 09:14:00 +02:00
Isaac Hermida 2fa5427622 meta-digi-containers: generate DCP with DRM policy block
Align the policy DRM block with the latest changes done in the
cc-container-mng tool.

https://onedigi.atlassian.net/browse/DEL-10075

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-04-24 09:14:00 +02:00
Isaac Hermida 408a8bec60 cc-containerd: stop managed containers earlier on shutdown
Keep the shutdown helper active during normal system operation and run the
managed container stop path from ExecStop when shutdown begins.

This makes the container stop happen before the general system teardown,
so network and CCCS are still available and reboot is less likely to
block waiting for late shutdown ordering.

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-04-23 10:22:05 +02:00
Isaac Hermida 6ad1a57317 cc-containerd: use "/root/container" as default containers path
Currently only the CCMP25 and CC95 will officially support containers.
For these platforms, "/root" is a common path with enough free space.

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-04-23 10:22:05 +02:00
Isaac Hermida 69286f4057 Generate unique DCP package ids
https://onedigi.atlassian.net/browse/DEL-10035
https://onedigi.atlassian.net/browse/DEL-10081

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-04-22 10:00:31 +02:00
Isaac Hermida d743784281 cc-containerd: order service around CCCS
As cc-containerd uses DRM to publish metrics, start the service after
cccs (this is optional, as the container will retry it) and stop our
service before cccsd (to do our best to try to upload the STOP status
to DRM)

https://onedigi.atlassian.net/browse/DEL-10035

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-04-22 09:59:39 +02:00
Isaac Hermida 61dc4c88cf cc-container-mng: install config at /etc
There is no need to have a dedicated folder, as we only use a configuration
file. Other data is stored in a different path.

https://onedigi.atlassian.net/browse/DEL-10035

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-04-22 09:59:39 +02:00
Isaac Hermida 6d29433642 meta-digi-containers: dey-image-container: add DRM support for DCP
Add the support to enable DRM support on the DCP artifact.

https://onedigi.atlassian.net/browse/DEL-10035

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-04-22 09:59:37 +02:00
Isaac Hermida 6a75e08023 containers: cc-container-mng: add shutdown service
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-04-20 09:21:57 +02:00
Isaac Hermida 0c915b99f0 dey-image-container-manager: add curl
Include curl in the container-manager image so basic HTTP checks can be
run directly on target when validating containers published ports.

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-04-16 09:43:14 +02:00
Isaac Hermida 2d261dd473 containers: enable netavark port publishing
Enable netavark bridge networking in the trimmed Podman recipe
so container images support publish-port arguments
such as -p 80:8080 and restore iptables dependency.
It's needed to install iptables-modules because it is not
populated due to NO_RECOMMENDATIONS.

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-04-16 09:42:44 +02:00
Isaac Hermida f70b5328c4 dey-image-container: generate canonical tar.gz LXC bundle payloads
Switch the Yocto LXC bundle output to tar.gz and require the same format
in the external DCP generator so the DCP can embed the payload
without extra conversion.
This saves time on the device when installing.

https://onedigi.atlassian.net/browse/DEL-10037

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-04-16 09:42:44 +02:00
Isaac Hermida efa04d2069 dey-image-container: move recipe to use external script
Instead of using the internal logic, move to use the external
script to generate the DCP, so internal and external DCP are
using a common flow.

https://onedigi.atlassian.net/browse/DEL-10037

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-04-16 09:42:44 +02:00
Isaac Hermida 6fe49f0469 containers: create external script to generate DCP
https://onedigi.atlassian.net/browse/DEL-10037

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-04-16 09:42:44 +02:00
Isaac Hermida bc497e0c48 dey-image-container-manager: add DRM runtime support
https://onedigi.atlassian.net/browse/DEL-10035

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-04-15 19:52:06 +02:00
Isaac Hermida 25dfe3d20a containers: make trimmed runtimes conflict with standard ones
Mark the trimmed runtime variants as conflicting with the standard
packages so images cannot include both Podman or LXC flavors at the
same time.

This avoids ambiguous runtime layouts and configuration ownership when a
minimal container-manager image uses the trimmed packages while other
images may select the standard runtimes.

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-04-08 09:02:20 +02:00
Isaac Hermida 5b45c1e64c podman: configure network backend explicitly
Generate /etc/containers/containers.conf so Podman does not depend on
its internal default network backend at runtime.
If not, at runtime, the default podman network fails with:
"""
Error: could not find "netavark" in one of {[/usr/local/libexec/podman /usr/local/l
ib/podman /usr/libexec/podman /usr/lib/podman] {<nil>}}.  To resolve this error, se
t the helper_binaries_dir key in the `[engine]` section of containers.conf to the d
irectory containing your helper binaries.
"""

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-04-08 09:02:20 +02:00
Isaac Hermida da1aaeec78 dey-image-container: webkit: do not spawn two start init processes
The container entrypoint already runs docker-init, so there is no
need to chain a second instance.

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-04-08 09:01:25 +02:00
Isaac Hermida f7a882fa1e dey-image-container: add DCP registration defaults
Include default registration settings in the generated DCP manifest so
future install flows can bootstrap the container configuration directly
from the package metadata.

Add registration_defaults with autostart, monitor and restart policy,
and populate those values for the lvgl and webkit container profiles.

https://onedigi.atlassian.net/browse/DEL-10033

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-04-08 09:01:25 +02:00
Isaac Hermida 36716d7b4d 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 <isaac.hermida@digi.com>
2026-04-08 09:01:25 +02:00
Isaac Hermida d88eb15ccb containers: store LXC console logs
The log file is used by the daemon to show the LXC logs

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-04-08 09:00:08 +02:00
Isaac Hermida 4dba2c617b containers: add flutter demo profile
https://onedigi.atlassian.net/browse/DEL-10050

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-04-08 09:00:08 +02:00
Isaac Hermida 69f53bf2d8 dey-image-container-manager: add dualboot
Add dualboot as part of the core support for dey-image-container-manager

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-03-30 18:58:02 +02:00
Isaac Hermida e8ecb28944 dey-image-container: webkit: fix config devices for ccmp25
The ccmp25 WebKit container needs a small set of extra device nodes
to run the embedded AI demos reliably.
Bind only the device nodes validated on target for the browser demos:
galcore, DRM, framebuffer, input, and the camera video/media/subdevice
nodes used by the AI examples.

https://onedigi.atlassian.net/browse/DEL-10038
https://onedigi.atlassian.net/browse/DEL-10039

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-03-30 18:58:02 +02:00
Isaac Hermida 4898b616a7 dey-image-container: webkit: complete runtime packages
The WebKit container profile was missing runtime pieces that are
present in the native WebKit image and required by the embedded
ConnectCore demos.

Add the font and icon packages needed by the fish tank WebGL demo,
include the Weston and GStreamer runtime packages used by the browser
demo stack, and switch the ccmp25 profile to the GCNano userspace
packages used by the native image.

Keep the machine learning packagegroup scoped to ccmp25, since the
ST X-LINUX-AI subset and its demo integration are specific to that
platform.

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-03-30 18:58:02 +02:00
Isaac Hermida c0d042e953 dey-image-container: webkit/lvgl: modify weston startup
Standalone GPU and video tests perform as expected in the WebKit
container, but rendering degrades once Cog runs on top of Weston.
Align the container Weston startup with the native setup by
loading the default Weston options, enabling the systemd-notify
module and exporting WL_EGL_GBM_FENCE=0 before starting the compositor.

https://onedigi.atlassian.net/browse/DEL-10038
https://onedigi.atlassian.net/browse/DEL-10039

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-03-30 18:58:02 +02:00
Isaac Hermida 682b2aec84 dey-image-container-manager: restore hotplug support
Package recommendations are disable, so some recommended packages might
be missed.
For HW detecting add the next explicit packages, which solves the
microSD card detection.

https://onedigi.atlassian.net/browse/DEL-10042

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-03-30 18:58:02 +02:00
Isaac Hermida c4c0383ed6 meta-digi-containers: use /mnt/data/cc-container as storage path
For podman, configure the storage path modifying its config file.
For LXC, the install path is automatically managed by the daemon.

https://onedigi.atlassian.net/browse/DEL-9996
https://onedigi.atlassian.net/browse/DEL-10005

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-03-20 13:42:03 +01:00
Isaac Hermida 0f54b5a346 meta-digi-containers: keep containers running when cc-containerd stops
Set KillMode=process in the systemd unit so 'systemctl stop
cc-containerd' only terminates the daemon itself.

Without this, systemd uses the default control-group kill mode and
can terminate container processes that share the service cgroup,
which changes container runtime state when the service is stopped.

https://onedigi.atlassian.net/browse/DEL-9963
https://onedigi.atlassian.net/browse/DEL-10005

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-03-20 13:42:03 +01:00
Isaac Hermida 1b6474935d meta-digi-containers: include cc-container-mng in dey-image-container-manager
Add cc-container-mng to dey-image-container-manager so the image ships the
container management daemon together with the trimmed Podman and LXC
runtimes.

https://onedigi.atlassian.net/browse/DEL-9996
https://onedigi.atlassian.net/browse/DEL-10005

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-03-20 13:36:29 +01:00
Isaac Hermida d721721567 meta-digi-containers: add cc-container-mng daemon recipe
Add the cc-container-mng recipe and systemd service.

https://onedigi.atlassian.net/browse/DEL-10005

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-03-20 13:32:18 +01:00
Isaac Hermida 2abcad0c78 meta-digi: document dey-image-container-manager usage
Document dey-image-container-manager in meta-digi-containers and
update the ccmp25-dvk and ccimx95-dvk build template notes so the
image is listed during environment setup together with its
virtualization requirement.

https://onedigi.atlassian.net/browse/DEL-9996

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-03-20 13:20:46 +01:00
Isaac Hermida 4f58ce26e9 meta-digi-containers: add dey-image-container-manager image
Add the dey-image-container-manager image recipe to provide a
dedicated DEY image for container management using the trimmed LXC
and Podman runtimes from meta-digi-containers.

https://onedigi.atlassian.net/browse/DEL-9996

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-03-20 13:20:46 +01:00
Isaac Hermida 17a6ba59cd meta-digi-containers: add trimmed container runtime recipes
Add dedicated trimmed runtime wrappers for LXC and Podman in
meta-digi-containers so dey-image-container-manager can install
reduced container runtimes without affecting other DEY images.

https://onedigi.atlassian.net/browse/DEL-9996

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-03-20 13:20:46 +01:00
Francisco Gil 2da298408e dey-image-container: add final artifact bundle generation
Add the artifact packaging stage that assembles deployable LXC/Podman
bundles with a normalized layout (manifest, payload, checksums, metadata).

The task also computes digests/metadata and removes intermediate build
outputs once final artifacts are produced.

https://onedigi.atlassian.net/browse/DEL-10004

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-03-20 13:17:39 +01:00
Francisco Gil 3efe532995 dey-image-container: add core image flow for LXC and Podman outputs
Introduce the base dey-image-container recipe and split core logic into
dedicated include files for rootfs overlays, LXC bundle generation and
Podman archive conversion.

This commit defines the profile-driven variables/overrides and the
native build tasks required to produce runtime-specific container outputs.

Also allow the recipe to overwrite WAYLAND_DISPLAY on init scripts to match
with different platforms.

https://onedigi.atlassian.net/browse/DEL-10004

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-03-20 13:16:25 +01:00
Francisco Gil 8ba3905c2e meta-digi-containers: add layer configuration for DEY 5.0 (scarthgap)
Add the new meta-digi-containers layer skeleton for Yocto 5.0 and wire it into bitbake layer discovery.

This initial layer commit provides:
- layer metadata and compatibility/dependency declarations
- recipe/bbappend file discovery for container-related content
- base structure used by subsequent commits for container images and runtime integration

https://onedigi.atlassian.net/browse/DEL-10004

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2026-03-20 13:15:39 +01:00