diff options
| author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-02-19 19:13:52 +0000 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-02-26 01:05:01 +0000 |
| commit | 7e8293ee986031f437a29d19533e3d59a8aeda74 (patch) | |
| tree | 6e9b5f6ff7cb5b773caa4f69dd578267ea3405f9 | |
| parent | 05b30f9e0a8edf59a258a891cf987287b6acb889 (diff) | |
| download | meta-virtualization-7e8293ee986031f437a29d19533e3d59a8aeda74.tar.gz | |
vcontainer: inject vxn-init.sh into vdkr and vpdmn rootfs images
Install vxn-init.sh alongside the existing init scripts in both vdkr
and vpdmn rootfs images. The Xen backend selects it at boot via the
vcontainer.init=/vxn-init.sh kernel command line parameter. Add
file-checksums tracking so rootfs rebuilds when the script changes.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
| -rw-r--r-- | recipes-containers/vcontainer/vdkr-rootfs-image.bb | 4 | ||||
| -rw-r--r-- | recipes-containers/vcontainer/vpdmn-rootfs-image.bb | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/recipes-containers/vcontainer/vdkr-rootfs-image.bb b/recipes-containers/vcontainer/vdkr-rootfs-image.bb index 0bcf40b6..e2921ec7 100644 --- a/recipes-containers/vcontainer/vdkr-rootfs-image.bb +++ b/recipes-containers/vcontainer/vdkr-rootfs-image.bb | |||
| @@ -29,6 +29,7 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda | |||
| 29 | # This adds the file content hash to the task signature | 29 | # This adds the file content hash to the task signature |
| 30 | do_rootfs[file-checksums] += "${THISDIR}/files/vdkr-init.sh:True" | 30 | do_rootfs[file-checksums] += "${THISDIR}/files/vdkr-init.sh:True" |
| 31 | do_rootfs[file-checksums] += "${THISDIR}/files/vcontainer-init-common.sh:True" | 31 | do_rootfs[file-checksums] += "${THISDIR}/files/vcontainer-init-common.sh:True" |
| 32 | do_rootfs[file-checksums] += "${THISDIR}/files/vxn-init.sh:True" | ||
| 32 | 33 | ||
| 33 | # Force rebuild control: | 34 | # Force rebuild control: |
| 34 | # Set VCONTAINER_FORCE_BUILD = "1" in local.conf to disable stamp caching | 35 | # Set VCONTAINER_FORCE_BUILD = "1" in local.conf to disable stamp caching |
| @@ -85,6 +86,9 @@ install_vdkr_init() { | |||
| 85 | install -m 0755 ${THISDIR}/files/vdkr-init.sh ${IMAGE_ROOTFS}/init | 86 | install -m 0755 ${THISDIR}/files/vdkr-init.sh ${IMAGE_ROOTFS}/init |
| 86 | install -m 0755 ${THISDIR}/files/vcontainer-init-common.sh ${IMAGE_ROOTFS}/vcontainer-init-common.sh | 87 | install -m 0755 ${THISDIR}/files/vcontainer-init-common.sh ${IMAGE_ROOTFS}/vcontainer-init-common.sh |
| 87 | 88 | ||
| 89 | # Install vxn-init.sh for Xen backend (selected via vcontainer.init=/vxn-init.sh) | ||
| 90 | install -m 0755 ${THISDIR}/files/vxn-init.sh ${IMAGE_ROOTFS}/vxn-init.sh | ||
| 91 | |||
| 88 | # Create required directories | 92 | # Create required directories |
| 89 | install -d ${IMAGE_ROOTFS}/mnt/input | 93 | install -d ${IMAGE_ROOTFS}/mnt/input |
| 90 | install -d ${IMAGE_ROOTFS}/mnt/state | 94 | install -d ${IMAGE_ROOTFS}/mnt/state |
diff --git a/recipes-containers/vcontainer/vpdmn-rootfs-image.bb b/recipes-containers/vcontainer/vpdmn-rootfs-image.bb index 5ca73953..8808e6b2 100644 --- a/recipes-containers/vcontainer/vpdmn-rootfs-image.bb +++ b/recipes-containers/vcontainer/vpdmn-rootfs-image.bb | |||
| @@ -23,6 +23,7 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda | |||
| 23 | # This adds the file content hash to the task signature | 23 | # This adds the file content hash to the task signature |
| 24 | do_rootfs[file-checksums] += "${THISDIR}/files/vpdmn-init.sh:True" | 24 | do_rootfs[file-checksums] += "${THISDIR}/files/vpdmn-init.sh:True" |
| 25 | do_rootfs[file-checksums] += "${THISDIR}/files/vcontainer-init-common.sh:True" | 25 | do_rootfs[file-checksums] += "${THISDIR}/files/vcontainer-init-common.sh:True" |
| 26 | do_rootfs[file-checksums] += "${THISDIR}/files/vxn-init.sh:True" | ||
| 26 | 27 | ||
| 27 | # Force rebuild control: | 28 | # Force rebuild control: |
| 28 | # Set VCONTAINER_FORCE_BUILD = "1" in local.conf to disable stamp caching | 29 | # Set VCONTAINER_FORCE_BUILD = "1" in local.conf to disable stamp caching |
| @@ -75,6 +76,9 @@ install_vpdmn_init() { | |||
| 75 | install -m 0755 ${THISDIR}/files/vpdmn-init.sh ${IMAGE_ROOTFS}/init | 76 | install -m 0755 ${THISDIR}/files/vpdmn-init.sh ${IMAGE_ROOTFS}/init |
| 76 | install -m 0755 ${THISDIR}/files/vcontainer-init-common.sh ${IMAGE_ROOTFS}/vcontainer-init-common.sh | 77 | install -m 0755 ${THISDIR}/files/vcontainer-init-common.sh ${IMAGE_ROOTFS}/vcontainer-init-common.sh |
| 77 | 78 | ||
| 79 | # Install vxn-init.sh for Xen backend (selected via vcontainer.init=/vxn-init.sh) | ||
| 80 | install -m 0755 ${THISDIR}/files/vxn-init.sh ${IMAGE_ROOTFS}/vxn-init.sh | ||
| 81 | |||
| 78 | # Create required directories | 82 | # Create required directories |
| 79 | install -d ${IMAGE_ROOTFS}/mnt/input | 83 | install -d ${IMAGE_ROOTFS}/mnt/input |
| 80 | install -d ${IMAGE_ROOTFS}/mnt/state | 84 | install -d ${IMAGE_ROOTFS}/mnt/state |
