summaryrefslogtreecommitdiffstats
path: root/recipes-containers/vcontainer/files
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2026-01-23 15:46:16 -0500
committerBruce Ashfield <bruce.ashfield@gmail.com>2026-02-09 03:34:12 +0000
commitabf81c8c676bb8997efe4d92a6e4369dcdd6961a (patch)
tree9d87667bc28e50d1594fb147c7f8b8d3dd3c028f /recipes-containers/vcontainer/files
parent60b7b35234926f690913ad3d83df35d73a69b61f (diff)
downloadmeta-virtualization-abf81c8c676bb8997efe4d92a6e4369dcdd6961a.tar.gz
vcontainer: add tiny initramfs image infrastructure
Add proper Yocto image recipes for the tiny initramfs used by vdkr/vpdmn in the switch_root boot flow: - vcontainer-tiny-initramfs-image.inc: Shared image configuration - vcontainer-preinit_1.0.bb: Preinit script package (shared) - vdkr-tiny-initramfs-image.bb: Tiny initramfs for vdkr - vpdmn-tiny-initramfs-image.bb: Tiny initramfs for vpdmn The tiny initramfs contains only busybox and a preinit script that: 1. Mounts devtmpfs, proc, sysfs 2. Mounts the squashfs rootfs.img from /dev/vda 3. Creates tmpfs overlay for writes 4. Performs switch_root to the real rootfs This replaces ad-hoc file extraction with proper image-based builds, improving reproducibility and maintainability. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-containers/vcontainer/files')
-rw-r--r--recipes-containers/vcontainer/files/vcontainer-preinit.sh (renamed from recipes-containers/vcontainer/files/vdkr-preinit.sh)6
1 files changed, 3 insertions, 3 deletions
diff --git a/recipes-containers/vcontainer/files/vdkr-preinit.sh b/recipes-containers/vcontainer/files/vcontainer-preinit.sh
index 08738022..6f1b7e09 100644
--- a/recipes-containers/vcontainer/files/vdkr-preinit.sh
+++ b/recipes-containers/vcontainer/files/vcontainer-preinit.sh
@@ -3,7 +3,7 @@
3# 3#
4# SPDX-License-Identifier: GPL-2.0-only 4# SPDX-License-Identifier: GPL-2.0-only
5# 5#
6# vdkr-preinit.sh 6# vcontainer-preinit.sh
7# Minimal init for initramfs - mounts rootfs and does switch_root 7# Minimal init for initramfs - mounts rootfs and does switch_root
8# 8#
9# This script runs from the initramfs and: 9# This script runs from the initramfs and:
@@ -12,7 +12,7 @@
12# 3. Creates overlayfs with tmpfs for writes 12# 3. Creates overlayfs with tmpfs for writes
13# 4. Executes switch_root to the overlay root filesystem 13# 4. Executes switch_root to the overlay root filesystem
14# 14#
15# The real init (/init or /sbin/init on rootfs) then runs vdkr-init.sh logic 15# The real init (/init or /sbin/init on rootfs) then continues boot
16 16
17# Mount essential filesystems first (needed to check cmdline) 17# Mount essential filesystems first (needed to check cmdline)
18mount -t proc proc /proc 18mount -t proc proc /proc
@@ -31,7 +31,7 @@ log() {
31 [ "$QUIET" = "0" ] && echo "$@" 31 [ "$QUIET" = "0" ] && echo "$@"
32} 32}
33 33
34log "=== vdkr preinit (squashfs) ===" 34log "=== vcontainer preinit (squashfs) ==="
35 35
36# Wait for block devices to appear 36# Wait for block devices to appear
37log "Waiting for block devices..." 37log "Waiting for block devices..."