dcp: remove CONTAINER_NAME variable and rename CONTAINER_TYPE

Now CONTAINER_TYPE is named DCP_NAME

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
This commit is contained in:
Francisco Gil 2026-05-27 11:02:39 +02:00
parent 095fe1ac36
commit 86763846ae
16 changed files with 72 additions and 68 deletions

View File

@ -84,7 +84,7 @@ Notes:
- If the input manifest provides `package_id`, that value is kept unchanged. - If the input manifest provides `package_id`, that value is kept unchanged.
- The output file name is always derived from the generated package ID and - The output file name is always derived from the generated package ID and
manifest fields as: manifest fields as:
- `<generated_package_id>_artifact_<runtime>_<device_types[0]>.tar.gz` - `<generated_package_id>-<runtime>-<device_types[0]>.tar.gz`
- For Podman payloads, the final internal payload name is always `payload/image.tar` - For Podman payloads, the final internal payload name is always `payload/image.tar`
- For LXC payloads, the generator requires a Yocto-style `.tar.gz` bundle, validates its layout, - For LXC payloads, the generator requires a Yocto-style `.tar.gz` bundle, validates its layout,
and stores it inside the DCP using the original file name and format without re-packaging it. and stores it inside the DCP using the original file name and format without re-packaging it.
@ -104,7 +104,7 @@ python3 meta-digi-containers/scripts/generate-dcp.py \
This generates a bundle named like: This generates a bundle named like:
- `./flutter-demo-<base36_created_at_ms>_artifact_podman_ccmp25-dvk.tar.gz` - `./flutter-demo-<base36_created_at_ms>-podman-ccmp25-dvk.tar.gz`
In those manifests: In those manifests:
@ -164,12 +164,11 @@ Set profile and naming in `conf/local.conf`:
```conf ```conf
DISTRO_FEATURES:append = " virtualization" DISTRO_FEATURES:append = " virtualization"
CONTAINER_TYPE = "webkit" # or: lvgl, flutter, custom profile DCP_NAME = "webkit" # or: lvgl, chromium, flutter, custom profile
CONTAINER_NAME = "webkit-example" # PODMAN_TAG defaults to "${DCP_NAME}-tag"
# PODMAN_TAG defaults to "${CONTAINER_NAME}-tag"
``` ```
If `CONTAINER_TYPE` is not set, `dey-image-dcp` now defaults to `lvgl`. If `DCP_NAME` is not set, `dey-image-dcp` now defaults to `lvgl`.
Build: Build:
@ -183,8 +182,8 @@ Outputs are generated in:
Final outputs: Final outputs:
- `${CONTAINER_NAME}-<base36_created_at_ms>_artifact_podman_<device_types[0]>.tar.gz` - `${DCP_NAME}-<base36_created_at_ms>-podman-<device_types[0]>.tar.gz`
- `${CONTAINER_NAME}-<base36_created_at_ms>_artifact_lxc_<device_types[0]>.tar.gz` - `${DCP_NAME}-<base36_created_at_ms>-lxc-<device_types[0]>.tar.gz`
Notes: Notes:
@ -193,7 +192,7 @@ Notes:
base36-encoded millisecond timestamp suffix, stores the generated `package_id` base36-encoded millisecond timestamp suffix, stores the generated `package_id`
in the final `manifest.json`, and uses it in the DCP file name. in the final `manifest.json`, and uses it in the DCP file name.
- In Yocto builds, `dey-image-dcp` keeps that unique-name behavior and - In Yocto builds, `dey-image-dcp` keeps that unique-name behavior and
removes older DCP artifacts with the same `${CONTAINER_NAME}` prefix before removes older DCP artifacts with the same `${DCP_NAME}` prefix before
generating the new one, so the deploy directory does not keep accumulating generating the new one, so the deploy directory does not keep accumulating
previous builds of the same container/runtime. previous builds of the same container/runtime.
@ -205,8 +204,8 @@ creating the final DCP artifacts, then removed at the end of artifact creation.
Profile-specific behavior is controlled with: Profile-specific behavior is controlled with:
- `CONTAINER_TYPE` - `DCP_NAME`
- `OVERRIDES:append = ":container-${CONTAINER_TYPE}"` (handled in recipe) - `OVERRIDES:append = ":container-${DCP_NAME}"` (handled in recipe)
Current built-in profile examples: Current built-in profile examples:
@ -219,9 +218,8 @@ You can add new profiles by appending variables with `:container-<name>` overrid
For customer-defined profiles, use: For customer-defined profiles, use:
```conf ```conf
CONTAINER_TYPE = "myprofile" DCP_NAME = "myprofile"
CONTAINER_NAME = "myprofile-demo" PODMAN_TAG = "myprofile-tag"
PODMAN_TAG = "myprofile-demo-tag"
IMAGE_INSTALL:append:container-myprofile = " package-a package-b" IMAGE_INSTALL:append:container-myprofile = " package-a package-b"
CONTAINER_INIT_MANAGER:container-myprofile = "/usr/bin/docker-init" CONTAINER_INIT_MANAGER:container-myprofile = "/usr/bin/docker-init"
@ -250,14 +248,14 @@ Notes:
- Multiple entries are supported (space-separated). - Multiple entries are supported (space-separated).
- `*.sh` files copied from overlay directories are marked executable automatically. - `*.sh` files copied from overlay directories are marked executable automatically.
- If `CONTAINER_ROOTFS_OVERLAY_DIRS` is not set - If `CONTAINER_ROOTFS_OVERLAY_DIRS` is not set
and `containers/${CONTAINER_TYPE}/rootfs_files` exists, and `containers/${DCP_NAME}/rootfs_files` exists,
it is used automatically. it is used automatically.
## LXC Fragment Configuration ## LXC Fragment Configuration
LXC fragments are loaded from: LXC fragments are loaded from:
- `containers/${CONTAINER_TYPE}/configs_lxc/` - `containers/${DCP_NAME}/configs_lxc/`
Config file naming: Config file naming:
@ -273,7 +271,7 @@ Supported placeholders in LXC config fragments:
- `@LXC_ARCH@` - `@LXC_ARCH@`
- `@LXC_FOLDER@` - `@LXC_FOLDER@`
- `@CONTAINER_NAME@` - `@DCP_NAME@`
- `@CONTAINER_INIT_MANAGER@` - `@CONTAINER_INIT_MANAGER@`
- `@CONTAINER_INIT_SCRIPT@` - `@CONTAINER_INIT_SCRIPT@`
@ -304,7 +302,7 @@ The artifact manifest is generated automatically and includes:
Relevant variables: Relevant variables:
- `CONTAINER_NAME` - `DCP_NAME`
- `CONTAINER_FRIENDLY_NAME` - `CONTAINER_FRIENDLY_NAME`
- `CONTAINER_ARTIFACT_VERSION` - `CONTAINER_ARTIFACT_VERSION`
- `CONTAINER_CREATE_ARGS_PODMAN` - `CONTAINER_CREATE_ARGS_PODMAN`
@ -327,7 +325,7 @@ and the template contains `metadata/`, it is copied into final artifact bundles.
`manifest.json`, `payload/*`, and `checksums/sha256sums.txt` are always generated during `manifest.json`, `payload/*`, and `checksums/sha256sums.txt` are always generated during
build time and should not be pre-created in the template. build time and should not be pre-created in the template.
If `CONTAINER_ARTIFACT_TEMPLATE_DIR` is not set and `containers/${CONTAINER_TYPE}/artifact` exists, If `CONTAINER_ARTIFACT_TEMPLATE_DIR` is not set and `containers/${DCP_NAME}/artifact` exists,
it is used automatically. it is used automatically.
## Container Folder Layout ## Container Folder Layout
@ -358,7 +356,7 @@ To create a new profile:
1. Create `containers/<profile>/configs_lxc/config_lxc_<machine>`. 1. Create `containers/<profile>/configs_lxc/config_lxc_<machine>`.
2. Optionally add `containers/<profile>/rootfs_files/` for rootfs content. 2. Optionally add `containers/<profile>/rootfs_files/` for rootfs content.
3. Set `CONTAINER_TYPE = "<profile>"` in `local.conf`. 3. Set `DCP_NAME = "<profile>"` in `local.conf`.
4. Add profile packages with `IMAGE_INSTALL:append:container-<profile> = " ... "`. 4. Add profile packages with `IMAGE_INSTALL:append:container-<profile> = " ... "`.
## Notes ## Notes

View File

@ -1,8 +1,8 @@
# LXC config for Chromium on CCIMX95. # LXC config for Chromium on CCIMX95.
# Placeholders are replaced by the image recipe. # Placeholders are replaced by the image recipe.
lxc.arch = @LXC_ARCH@ lxc.arch = @LXC_ARCH@
lxc.rootfs.path = dir:@LXC_FOLDER@/@CONTAINER_NAME@/rootfs lxc.rootfs.path = dir:@LXC_FOLDER@/@DCP_NAME@/rootfs
lxc.uts.name = @CONTAINER_NAME@ lxc.uts.name = @DCP_NAME@
lxc.mount.auto = cgroup:mixed proc:mixed lxc.mount.auto = cgroup:mixed proc:mixed
lxc.mount.entry = /sys sys none bind,create=dir lxc.mount.entry = /sys sys none bind,create=dir
@ -12,7 +12,7 @@ lxc.mount.entry = tmpfs run tmpfs rw,nosuid,nodev,mode=0755,create=dir
lxc.net.0.type = none lxc.net.0.type = none
lxc.init.cmd = @CONTAINER_INIT_MANAGER@ @CONTAINER_INIT_SCRIPT@ lxc.init.cmd = @CONTAINER_INIT_MANAGER@ @CONTAINER_INIT_SCRIPT@
lxc.console.logfile = @LXC_FOLDER@/@CONTAINER_NAME@/console.log lxc.console.logfile = @LXC_FOLDER@/@DCP_NAME@/console.log
lxc.environment = 'PS1=chromium-ccimx95:\w$ ' lxc.environment = 'PS1=chromium-ccimx95:\w$ '
lxc.mount.entry = tmpfs dev/shm tmpfs rw,nosuid,nodev,mode=1777,create=dir lxc.mount.entry = tmpfs dev/shm tmpfs rw,nosuid,nodev,mode=1777,create=dir
lxc.mount.entry = /etc/resolv.conf etc/resolv.conf none bind,ro,create=file lxc.mount.entry = /etc/resolv.conf etc/resolv.conf none bind,ro,create=file

View File

@ -1,8 +1,8 @@
# LXC base config for custom profile on CCIMX95. # LXC base config for custom profile on CCIMX95.
# Placeholders are replaced by the image recipe. # Placeholders are replaced by the image recipe.
lxc.arch = @LXC_ARCH@ lxc.arch = @LXC_ARCH@
lxc.rootfs.path = dir:@LXC_FOLDER@/@CONTAINER_NAME@/rootfs lxc.rootfs.path = dir:@LXC_FOLDER@/@DCP_NAME@/rootfs
lxc.uts.name = @CONTAINER_NAME@ lxc.uts.name = @DCP_NAME@
lxc.mount.auto = cgroup:mixed proc:mixed lxc.mount.auto = cgroup:mixed proc:mixed
lxc.mount.entry = /sys sys none bind,create=dir lxc.mount.entry = /sys sys none bind,create=dir

View File

@ -1,8 +1,8 @@
# LXC base config for custom profile on CCMP25. # LXC base config for custom profile on CCMP25.
# Placeholders are replaced by the image recipe. # Placeholders are replaced by the image recipe.
lxc.arch = @LXC_ARCH@ lxc.arch = @LXC_ARCH@
lxc.rootfs.path = dir:@LXC_FOLDER@/@CONTAINER_NAME@/rootfs lxc.rootfs.path = dir:@LXC_FOLDER@/@DCP_NAME@/rootfs
lxc.uts.name = @CONTAINER_NAME@ lxc.uts.name = @DCP_NAME@
lxc.mount.auto = cgroup:mixed proc:mixed lxc.mount.auto = cgroup:mixed proc:mixed
lxc.mount.entry = /sys sys none bind,create=dir lxc.mount.entry = /sys sys none bind,create=dir

View File

@ -1,8 +1,8 @@
# LXC config for Flutter on CCIMX95. # LXC config for Flutter on CCIMX95.
# Placeholders are replaced by the image recipe. # Placeholders are replaced by the image recipe.
lxc.arch = @LXC_ARCH@ lxc.arch = @LXC_ARCH@
lxc.rootfs.path = dir:@LXC_FOLDER@/@CONTAINER_NAME@/rootfs lxc.rootfs.path = dir:@LXC_FOLDER@/@DCP_NAME@/rootfs
lxc.uts.name = @CONTAINER_NAME@ lxc.uts.name = @DCP_NAME@
lxc.mount.auto = cgroup:mixed proc:mixed lxc.mount.auto = cgroup:mixed proc:mixed
lxc.mount.entry = /sys sys none bind,create=dir lxc.mount.entry = /sys sys none bind,create=dir
@ -15,7 +15,7 @@ lxc.environment = 'PS1=flutter-ccimx95:\w$ '
lxc.net.0.type = empty lxc.net.0.type = empty
lxc.init.cmd = @CONTAINER_INIT_MANAGER@ @CONTAINER_INIT_SCRIPT@ lxc.init.cmd = @CONTAINER_INIT_MANAGER@ @CONTAINER_INIT_SCRIPT@
lxc.console.logfile = @LXC_FOLDER@/@CONTAINER_NAME@/console.log lxc.console.logfile = @LXC_FOLDER@/@DCP_NAME@/console.log
lxc.mount.entry = tmpfs dev/shm tmpfs rw,nosuid,nodev,mode=1777,create=dir lxc.mount.entry = tmpfs dev/shm tmpfs rw,nosuid,nodev,mode=1777,create=dir
lxc.mount.entry = /dev/dri dev/dri none bind,create=dir lxc.mount.entry = /dev/dri dev/dri none bind,create=dir
lxc.mount.entry = /dev/input dev/input none bind,create=dir lxc.mount.entry = /dev/input dev/input none bind,create=dir

View File

@ -1,8 +1,8 @@
# LXC config for Flutter on CCMP25. # LXC config for Flutter on CCMP25.
# Placeholders are replaced by the image recipe. # Placeholders are replaced by the image recipe.
lxc.arch = @LXC_ARCH@ lxc.arch = @LXC_ARCH@
lxc.rootfs.path = dir:@LXC_FOLDER@/@CONTAINER_NAME@/rootfs lxc.rootfs.path = dir:@LXC_FOLDER@/@DCP_NAME@/rootfs
lxc.uts.name = @CONTAINER_NAME@ lxc.uts.name = @DCP_NAME@
lxc.mount.auto = cgroup:mixed proc:mixed lxc.mount.auto = cgroup:mixed proc:mixed
lxc.mount.entry = /sys sys none bind,create=dir lxc.mount.entry = /sys sys none bind,create=dir
@ -15,7 +15,7 @@ lxc.environment = 'PS1=flutter-ccmp25:\w$ '
lxc.net.0.type = empty lxc.net.0.type = empty
lxc.init.cmd = @CONTAINER_INIT_MANAGER@ @CONTAINER_INIT_SCRIPT@ lxc.init.cmd = @CONTAINER_INIT_MANAGER@ @CONTAINER_INIT_SCRIPT@
lxc.console.logfile = @LXC_FOLDER@/@CONTAINER_NAME@/console.log lxc.console.logfile = @LXC_FOLDER@/@DCP_NAME@/console.log
lxc.mount.entry = tmpfs dev/shm tmpfs rw,nosuid,nodev,mode=1777,create=dir lxc.mount.entry = tmpfs dev/shm tmpfs rw,nosuid,nodev,mode=1777,create=dir
lxc.mount.entry = /dev/dri dev/dri none bind,create=dir lxc.mount.entry = /dev/dri dev/dri none bind,create=dir
lxc.mount.entry = /dev/input dev/input none bind,create=dir lxc.mount.entry = /dev/input dev/input none bind,create=dir

View File

@ -1,8 +1,8 @@
# LXC config for LVGL on CCIMX95. # LXC config for LVGL on CCIMX95.
# Placeholders are replaced by the image recipe. # Placeholders are replaced by the image recipe.
lxc.arch = @LXC_ARCH@ lxc.arch = @LXC_ARCH@
lxc.rootfs.path = dir:@LXC_FOLDER@/@CONTAINER_NAME@/rootfs lxc.rootfs.path = dir:@LXC_FOLDER@/@DCP_NAME@/rootfs
lxc.uts.name = @CONTAINER_NAME@ lxc.uts.name = @DCP_NAME@
lxc.mount.auto = cgroup:mixed proc:mixed lxc.mount.auto = cgroup:mixed proc:mixed
lxc.mount.entry = /sys sys none bind,create=dir lxc.mount.entry = /sys sys none bind,create=dir
@ -15,7 +15,7 @@ lxc.environment = 'PS1=\h:\w$ '
lxc.net.0.type = empty lxc.net.0.type = empty
lxc.init.cmd = @CONTAINER_INIT_MANAGER@ @CONTAINER_INIT_SCRIPT@ lxc.init.cmd = @CONTAINER_INIT_MANAGER@ @CONTAINER_INIT_SCRIPT@
lxc.console.logfile = @LXC_FOLDER@/@CONTAINER_NAME@/console.log lxc.console.logfile = @LXC_FOLDER@/@DCP_NAME@/console.log
lxc.mount.entry = /dev/dri dev/dri none bind,create=dir lxc.mount.entry = /dev/dri dev/dri none bind,create=dir
lxc.mount.entry = /dev/input dev/input none bind,create=dir lxc.mount.entry = /dev/input dev/input none bind,create=dir
lxc.mount.entry = tmpfs dev/shm tmpfs rw,nosuid,nodev,mode=1777,create=dir lxc.mount.entry = tmpfs dev/shm tmpfs rw,nosuid,nodev,mode=1777,create=dir

View File

@ -1,8 +1,8 @@
# LXC config for LVGL on CCMP25. # LXC config for LVGL on CCMP25.
# Placeholders are replaced by the image recipe. # Placeholders are replaced by the image recipe.
lxc.arch = @LXC_ARCH@ lxc.arch = @LXC_ARCH@
lxc.rootfs.path = dir:@LXC_FOLDER@/@CONTAINER_NAME@/rootfs lxc.rootfs.path = dir:@LXC_FOLDER@/@DCP_NAME@/rootfs
lxc.uts.name = @CONTAINER_NAME@ lxc.uts.name = @DCP_NAME@
lxc.mount.auto = cgroup:mixed proc:mixed lxc.mount.auto = cgroup:mixed proc:mixed
lxc.mount.entry = /sys sys none bind,create=dir lxc.mount.entry = /sys sys none bind,create=dir
@ -15,7 +15,7 @@ lxc.environment = 'PS1=\h:\w$ '
lxc.net.0.type = empty lxc.net.0.type = empty
lxc.init.cmd = @CONTAINER_INIT_MANAGER@ @CONTAINER_INIT_SCRIPT@ lxc.init.cmd = @CONTAINER_INIT_MANAGER@ @CONTAINER_INIT_SCRIPT@
lxc.console.logfile = @LXC_FOLDER@/@CONTAINER_NAME@/console.log lxc.console.logfile = @LXC_FOLDER@/@DCP_NAME@/console.log
lxc.mount.entry = tmpfs dev/shm tmpfs rw,nosuid,nodev,mode=1777,create=dir lxc.mount.entry = tmpfs dev/shm tmpfs rw,nosuid,nodev,mode=1777,create=dir
lxc.mount.entry = /dev/dri dev/dri none bind,create=dir lxc.mount.entry = /dev/dri dev/dri none bind,create=dir
lxc.mount.entry = /dev/input dev/input none bind,create=dir lxc.mount.entry = /dev/input dev/input none bind,create=dir

View File

@ -1,8 +1,8 @@
# LXC config for WebKit on CCIMX95. # LXC config for WebKit on CCIMX95.
# Placeholders are replaced by the image recipe. # Placeholders are replaced by the image recipe.
lxc.arch = @LXC_ARCH@ lxc.arch = @LXC_ARCH@
lxc.rootfs.path = dir:@LXC_FOLDER@/@CONTAINER_NAME@/rootfs lxc.rootfs.path = dir:@LXC_FOLDER@/@DCP_NAME@/rootfs
lxc.uts.name = @CONTAINER_NAME@ lxc.uts.name = @DCP_NAME@
lxc.mount.auto = cgroup:mixed proc:mixed lxc.mount.auto = cgroup:mixed proc:mixed
lxc.mount.entry = /sys sys none bind,create=dir lxc.mount.entry = /sys sys none bind,create=dir
@ -12,7 +12,7 @@ lxc.mount.entry = tmpfs run tmpfs rw,nosuid,nodev,mode=0755,create=dir
lxc.net.0.type = none lxc.net.0.type = none
lxc.init.cmd = @CONTAINER_INIT_MANAGER@ @CONTAINER_INIT_SCRIPT@ lxc.init.cmd = @CONTAINER_INIT_MANAGER@ @CONTAINER_INIT_SCRIPT@
lxc.console.logfile = @LXC_FOLDER@/@CONTAINER_NAME@/console.log lxc.console.logfile = @LXC_FOLDER@/@DCP_NAME@/console.log
lxc.environment = 'PS1=webkit-ccimx95:\w$ ' lxc.environment = 'PS1=webkit-ccimx95:\w$ '
# audio # audio

View File

@ -1,8 +1,8 @@
# LXC config for WebKit on CCMP25. # LXC config for WebKit on CCMP25.
# Placeholders are replaced by the image recipe. # Placeholders are replaced by the image recipe.
lxc.arch = @LXC_ARCH@ lxc.arch = @LXC_ARCH@
lxc.rootfs.path = dir:@LXC_FOLDER@/@CONTAINER_NAME@/rootfs lxc.rootfs.path = dir:@LXC_FOLDER@/@DCP_NAME@/rootfs
lxc.uts.name = @CONTAINER_NAME@ lxc.uts.name = @DCP_NAME@
lxc.mount.auto = cgroup:mixed proc:mixed lxc.mount.auto = cgroup:mixed proc:mixed
lxc.mount.entry = /sys sys none bind,create=dir lxc.mount.entry = /sys sys none bind,create=dir
@ -12,7 +12,7 @@ lxc.mount.entry = tmpfs run tmpfs rw,nosuid,nodev,mode=0755,create=dir
lxc.net.0.type = none lxc.net.0.type = none
lxc.init.cmd = @CONTAINER_INIT_MANAGER@ @CONTAINER_INIT_SCRIPT@ lxc.init.cmd = @CONTAINER_INIT_MANAGER@ @CONTAINER_INIT_SCRIPT@
lxc.console.logfile = @LXC_FOLDER@/@CONTAINER_NAME@/console.log lxc.console.logfile = @LXC_FOLDER@/@DCP_NAME@/console.log
lxc.environment = 'PS1=webkit-ccmp25:\w$ ' lxc.environment = 'PS1=webkit-ccmp25:\w$ '
# audio # audio

View File

@ -15,7 +15,7 @@ do_clean_old_container_artifacts() {
fi fi
for runtime in lxc podman; do for runtime in lxc podman; do
old_artifact_glob="${DEPLOY_DIR_IMAGE}/${CONTAINER_NAME}-*_artifact_${runtime}_${primary_device_type}.tar.gz" old_artifact_glob="${DEPLOY_DIR_IMAGE}/${DCP_NAME}-*-${runtime}-${primary_device_type}.tar.gz"
bbnote "Removing old ${runtime} container artifacts matching ${old_artifact_glob}" bbnote "Removing old ${runtime} container artifacts matching ${old_artifact_glob}"
rm -f ${old_artifact_glob} rm -f ${old_artifact_glob}
done done
@ -69,7 +69,7 @@ do_image_container_artifacts() {
manifest_path="$2" manifest_path="$2"
create_args="$3" create_args="$3"
build_id="$4" build_id="$4"
NAME="${CONTAINER_NAME}" \ NAME="${DCP_NAME}" \
FRIENDLY_NAME="${CONTAINER_FRIENDLY_NAME}" \ FRIENDLY_NAME="${CONTAINER_FRIENDLY_NAME}" \
VERSION="${CONTAINER_ARTIFACT_VERSION}" \ VERSION="${CONTAINER_ARTIFACT_VERSION}" \
RUNTIME="${runtime}" \ RUNTIME="${runtime}" \

View File

@ -46,12 +46,17 @@ apply_container_rootfs_overlays() {
ROOTFS_POSTPROCESS_COMMAND += "apply_container_rootfs_runtime_defaults; " ROOTFS_POSTPROCESS_COMMAND += "apply_container_rootfs_runtime_defaults; "
apply_container_rootfs_runtime_defaults() { apply_container_rootfs_runtime_defaults() {
if [ -n "${CONTAINER_INIT_SCRIPT}" ] && \ placeholder_files="$(grep -rl "@WAYLAND_DISPLAY@" "${IMAGE_ROOTFS}" 2>/dev/null || true)"
[ -f "${IMAGE_ROOTFS}${CONTAINER_INIT_SCRIPT}" ] && \
grep -q "@WAYLAND_DISPLAY@" "${IMAGE_ROOTFS}${CONTAINER_INIT_SCRIPT}"; then if [ -z "${placeholder_files}" ]; then
return 0
fi
printf '%s\n' "${placeholder_files}" | while IFS= read -r placeholder_file; do
[ -n "${placeholder_file}" ] || continue
sed -i \ sed -i \
-e "s|@WAYLAND_DISPLAY@|${WAYLAND_DISPLAY}|g" \ -e "s|@WAYLAND_DISPLAY@|${WAYLAND_DISPLAY}|g" \
"${IMAGE_ROOTFS}${CONTAINER_INIT_SCRIPT}" "${placeholder_file}"
bbnote "Applied WAYLAND_DISPLAY='${WAYLAND_DISPLAY}' to ${IMAGE_ROOTFS}${CONTAINER_INIT_SCRIPT}" bbnote "Applied WAYLAND_DISPLAY='${WAYLAND_DISPLAY}' to ${placeholder_file}"
fi done
} }

View File

@ -30,15 +30,16 @@ do_image_lxc_bundle() {
config_in="${LXC_CONFIG_FILE}" config_in="${LXC_CONFIG_FILE}"
if [ ! -f "${config_in}" ]; then if [ ! -f "${config_in}" ]; then
bbfatal "LXC config file not found for CONTAINER_TYPE='${CONTAINER_TYPE}' and MACHINE='${MACHINE}': ${config_in}" bbfatal "LXC config file not found for DCP_NAME='${DCP_NAME}' and MACHINE='${MACHINE}': ${config_in}"
fi fi
sed \ sed \
-e "s|@LXC_ARCH@|${TARGET_ARCH}|g" \ -e "s|@LXC_ARCH@|${TARGET_ARCH}|g" \
-e "s|@LXC_FOLDER@|${LXC_FOLDER}|g" \ -e "s|@LXC_FOLDER@|${LXC_FOLDER}|g" \
-e "s|@CONTAINER_NAME@|${CONTAINER_NAME}|g" \ -e "s|@DCP_NAME@|${DCP_NAME}|g" \
-e "s|@CONTAINER_INIT_MANAGER@|${CONTAINER_INIT_MANAGER}|g" \ -e "s|@CONTAINER_INIT_MANAGER@|${CONTAINER_INIT_MANAGER}|g" \
-e "s|@CONTAINER_INIT_SCRIPT@|${CONTAINER_INIT_SCRIPT}|g" \ -e "s|@CONTAINER_INIT_SCRIPT@|${CONTAINER_INIT_SCRIPT}|g" \
-e "s|@WAYLAND_DISPLAY@|${WAYLAND_DISPLAY}|g" \
"${config_in}" > "${lxc_dir}/config" "${config_in}" > "${lxc_dir}/config"
tar -C "${lxc_dir}" -czf "${lxc_tar}" config rootfs tar -C "${lxc_dir}" -czf "${lxc_tar}" config rootfs

View File

@ -11,7 +11,7 @@ do_image_podman_archive() {
src_tar="${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs-oci.tar" src_tar="${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs-oci.tar"
fi fi
dst_tar="${DEPLOY_DIR_IMAGE}/${PODMAN_OUTPUT_NAME}" dst_tar="${DEPLOY_DIR_IMAGE}/${PODMAN_OUTPUT_NAME}"
image_ref="${CONTAINER_NAME}:${PODMAN_TAG}" image_ref="${DCP_NAME}:${PODMAN_TAG}"
if [ ! -f "${src_tar}" ]; then if [ ! -f "${src_tar}" ]; then
bbfatal "Expected OCI tarball not found: ${src_tar}" bbfatal "Expected OCI tarball not found: ${src_tar}"

View File

@ -21,18 +21,18 @@ NO_RECOMMENDATIONS = "1"
######################## ########################
# Container profile # Container profile
######################## ########################
# Select profile in local.conf (e.g. CONTAINER_TYPE = "lvgl", "webkit" or "flutter"). # Select the profile in local.conf (e.g. DCP_NAME = "lvgl", "webkit",
# Defaults to "lvgl" when not set by the build configuration. # "chromium" or "flutter"). Defaults to "lvgl" when not set by the build
CONTAINER_TYPE ?= "lvgl" # configuration.
OVERRIDES:append = ":container-${CONTAINER_TYPE}" DCP_NAME ?= "lvgl"
OVERRIDES:append = ":container-${DCP_NAME}"
######################## ########################
# Container runtime knobs # Container runtime knobs
######################## ########################
CONTAINER_INIT_MANAGER ?= "/usr/bin/docker-init" CONTAINER_INIT_MANAGER ?= "/usr/bin/docker-init"
CONTAINER_INIT_SCRIPT ?= "sleep infinity" CONTAINER_INIT_SCRIPT ?= "sleep infinity"
CONTAINER_NAME ?= "${CONTAINER_TYPE}-container" CONTAINER_PROFILE_DIR ?= "${CONTAINERS_DIR}/${DCP_NAME}"
CONTAINER_PROFILE_DIR ?= "${CONTAINERS_DIR}/${CONTAINER_TYPE}"
CONTAINER_ROOTFS_OVERLAY_DIRS ?= "" CONTAINER_ROOTFS_OVERLAY_DIRS ?= ""
CONTAINER_DEFAULT_ROOTFS_DIR ?= "${CONTAINER_PROFILE_DIR}/rootfs_files" CONTAINER_DEFAULT_ROOTFS_DIR ?= "${CONTAINER_PROFILE_DIR}/rootfs_files"
CONTAINER_ROOTFS_OVERLAY_TARBALLS ?= "" CONTAINER_ROOTFS_OVERLAY_TARBALLS ?= ""
@ -40,15 +40,15 @@ CONTAINER_ROOTFS_OVERLAY_TARBALLS ?= ""
######################## ########################
# Podman output knobs # Podman output knobs
######################## ########################
PODMAN_TAG ?= "${CONTAINER_NAME}-tag" PODMAN_TAG ?= "${DCP_NAME}-tag"
PODMAN_OUTPUT_NAME ?= "${CONTAINER_NAME}_podman_${MACHINE}.tar" PODMAN_OUTPUT_NAME ?= "${DCP_NAME}_podman_${MACHINE}.tar"
######################## ########################
# LXC output knobs # LXC output knobs
######################## ########################
CONTAINERS_DIR ?= "${THISDIR}/../../containers" CONTAINERS_DIR ?= "${THISDIR}/../../containers"
LXC_FOLDER ?= "/var/lib/lxc" LXC_FOLDER ?= "/var/lib/lxc"
LXC_OUTPUT_NAME ?= "${CONTAINER_NAME}_lxc_${MACHINE}.tar.gz" LXC_OUTPUT_NAME ?= "${DCP_NAME}_lxc_${MACHINE}.tar.gz"
LXC_CONFIG_DIR ?= "${CONTAINER_PROFILE_DIR}/configs_lxc" LXC_CONFIG_DIR ?= "${CONTAINER_PROFILE_DIR}/configs_lxc"
LXC_CONFIG_FILE ?= "${LXC_CONFIG_DIR}/config_lxc_${MACHINE}" LXC_CONFIG_FILE ?= "${LXC_CONFIG_DIR}/config_lxc_${MACHINE}"
@ -58,7 +58,7 @@ LXC_CONFIG_FILE ?= "${LXC_CONFIG_DIR}/config_lxc_${MACHINE}"
CONTAINER_ARTIFACT_TEMPLATE_DIR ?= "" CONTAINER_ARTIFACT_TEMPLATE_DIR ?= ""
CONTAINER_DEFAULT_ARTIFACT_TEMPLATE_DIR ?= "${CONTAINER_PROFILE_DIR}/artifact" CONTAINER_DEFAULT_ARTIFACT_TEMPLATE_DIR ?= "${CONTAINER_PROFILE_DIR}/artifact"
META_DIGI_REPO_DIR ?= "${THISDIR}/../../.." META_DIGI_REPO_DIR ?= "${THISDIR}/../../.."
CONTAINER_FRIENDLY_NAME ?= "${CONTAINER_NAME}" CONTAINER_FRIENDLY_NAME ?= "${DCP_NAME}"
CONTAINER_ARTIFACT_VERSION ?= "${PV}" CONTAINER_ARTIFACT_VERSION ?= "${PV}"
CONTAINER_CREATE_ARGS ?= "" CONTAINER_CREATE_ARGS ?= ""
CONTAINER_CREATE_ARGS_PODMAN ?= "${CONTAINER_CREATE_ARGS}" CONTAINER_CREATE_ARGS_PODMAN ?= "${CONTAINER_CREATE_ARGS}"

View File

@ -201,7 +201,7 @@ def sha256(path: Path) -> str:
def build_output_name(*, package_id: str, runtime: str, device_type: str) -> str: def build_output_name(*, package_id: str, runtime: str, device_type: str) -> str:
return f"{package_id}_artifact_{runtime}_{device_type}.tar.gz" return f"{package_id}-{runtime}-{device_type}.tar.gz"
def ensure_lxc_layout(payload: Path) -> tuple[str, str]: def ensure_lxc_layout(payload: Path) -> tuple[str, str]: