summaryrefslogtreecommitdiffstats
path: root/recipes-devtools
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2026-01-05 03:28:17 +0000
committerBruce Ashfield <bruce.ashfield@gmail.com>2026-02-09 03:32:52 +0000
commitc03fa452f381d54af66c6bc0d0394622c3d3d61f (patch)
treef341cba988b577493ec9228ac1c8cb063a10e33f /recipes-devtools
parentf9f8e294e5d870f28dd65f13ddb43c224be958fc (diff)
downloadmeta-virtualization-c03fa452f381d54af66c6bc0d0394622c3d3d61f.tar.gz
vcontainer: add SDK-based standalone tarball
Add vcontainer-tarball.bb recipe that creates a relocatable standalone distribution of vdkr and vpdmn container tools using Yocto SDK infrastructure. Features: - Auto-detects available architectures from built blobs - Custom SDK installer with vcontainer-specific messages - nativesdk-qemu-vcontainer.bb: minimal QEMU without OpenGL deps Recipe changes: - DELETE vdkr-native_1.0.bb (functionality moved to SDK) - DELETE vpdmn-native_1.0.bb (functionality moved to SDK) - ADD vcontainer-tarball.bb (SDK tarball recipe) - ADD toolchain-shar-extract.sh (SDK installer template) - ADD nativesdk-qemu-vcontainer.bb (minimal QEMU for SDK) Usage: MACHINE=qemux86-64 bitbake vcontainer-tarball ./tmp/deploy/sdk/vcontainer-standalone.sh -d /opt/vcontainer -y source /opt/vcontainer/init-env.sh vdkr images Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-devtools')
-rw-r--r--recipes-devtools/qemu/nativesdk-qemu-vcontainer.bb65
1 files changed, 65 insertions, 0 deletions
diff --git a/recipes-devtools/qemu/nativesdk-qemu-vcontainer.bb b/recipes-devtools/qemu/nativesdk-qemu-vcontainer.bb
new file mode 100644
index 00000000..8fc68679
--- /dev/null
+++ b/recipes-devtools/qemu/nativesdk-qemu-vcontainer.bb
@@ -0,0 +1,65 @@
1# SPDX-FileCopyrightText: Copyright (C) 2025 Bruce Ashfield
2#
3# SPDX-License-Identifier: MIT
4#
5# Minimal QEMU variant for vcontainer tools (vdkr/vpdmn)
6#
7# This recipe provides a stripped-down nativesdk QEMU without OpenGL/SDL
8# dependencies, avoiding the mesa -> llvm -> clang build chain.
9#
10# This is separate from the main nativesdk-qemu to avoid affecting other
11# users who may need OpenGL support in their SDK QEMU.
12#
13# VERSION TRACKING: This recipe automatically discovers the QEMU version
14# from oe-core, so no updates are needed when oe-core bumps QEMU.
15
16SUMMARY = "Minimal QEMU for vcontainer tools"
17DESCRIPTION = "QEMU built without OpenGL/virglrenderer for use in vcontainer \
18 standalone tarballs. Avoids pulling in mesa/llvm/clang."
19
20# Dynamically discover QEMU version from oe-core (same pattern as busybox-initrd.bb)
21def get_qemu_pv(d):
22 import os
23 import re
24 corebase = d.getVar('COREBASE')
25 qemu_dir = os.path.join(corebase, 'meta', 'recipes-devtools', 'qemu')
26 if os.path.isdir(qemu_dir):
27 re_bb_name = re.compile(r"^qemu_([0-9.]+)\.bb$")
28 for bb_file in os.listdir(qemu_dir):
29 result = re_bb_name.match(bb_file)
30 if result:
31 return result.group(1)
32 bb.fatal("Cannot find qemu recipe in %s" % qemu_dir)
33
34PV := "${@get_qemu_pv(d)}"
35
36# Point to oe-core qemu files directory for patches and support files
37FILESEXTRAPATHS:prepend := "${COREBASE}/meta/recipes-devtools/qemu/qemu:"
38
39# Use the same base as oe-core qemu
40require recipes-devtools/qemu/qemu.inc
41
42# Pull in the main recipe's dependencies and settings
43DEPENDS += "glib-2.0 zlib pixman"
44DEPENDS:append:libc-musl = " libucontext"
45
46# Inherit nativesdk explicitly (not via BBCLASSEXTEND)
47inherit nativesdk
48
49# Target list for nativesdk (cross-prefix is already set by qemu.inc for class-nativesdk)
50EXTRA_OECONF:append = " --target-list=${@get_qemu_target_list(d)}"
51
52# Minimal PACKAGECONFIG - no opengl, no sdl, no virglrenderer
53# This avoids mesa -> llvm -> clang dependency chain
54# virtfs is needed for volume mounts (-v host:container)
55PACKAGECONFIG = "fdt kvm pie slirp virtfs"
56
57# Only build the QEMU targets we actually need for vcontainer
58# This saves ~150MB compared to building all architectures
59QEMU_TARGETS = "aarch64 x86_64"
60
61# QEMU's configure doesn't support --disable-static, so disable it
62DISABLE_STATIC = ""
63
64# Ensure proper naming
65BPN = "qemu"