summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2026-02-19 19:13:52 +0000
committerBruce Ashfield <bruce.ashfield@gmail.com>2026-02-26 01:05:01 +0000
commit7e8293ee986031f437a29d19533e3d59a8aeda74 (patch)
tree6e9b5f6ff7cb5b773caa4f69dd578267ea3405f9
parent05b30f9e0a8edf59a258a891cf987287b6acb889 (diff)
downloadmeta-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.bb4
-rw-r--r--recipes-containers/vcontainer/vpdmn-rootfs-image.bb4
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
30do_rootfs[file-checksums] += "${THISDIR}/files/vdkr-init.sh:True" 30do_rootfs[file-checksums] += "${THISDIR}/files/vdkr-init.sh:True"
31do_rootfs[file-checksums] += "${THISDIR}/files/vcontainer-init-common.sh:True" 31do_rootfs[file-checksums] += "${THISDIR}/files/vcontainer-init-common.sh:True"
32do_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
24do_rootfs[file-checksums] += "${THISDIR}/files/vpdmn-init.sh:True" 24do_rootfs[file-checksums] += "${THISDIR}/files/vpdmn-init.sh:True"
25do_rootfs[file-checksums] += "${THISDIR}/files/vcontainer-init-common.sh:True" 25do_rootfs[file-checksums] += "${THISDIR}/files/vcontainer-init-common.sh:True"
26do_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