summaryrefslogtreecommitdiffstats
path: root/classes/container-bundle.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'classes/container-bundle.bbclass')
-rw-r--r--classes/container-bundle.bbclass36
1 files changed, 3 insertions, 33 deletions
diff --git a/classes/container-bundle.bbclass b/classes/container-bundle.bbclass
index fdd241ee..406e70cc 100644
--- a/classes/container-bundle.bbclass
+++ b/classes/container-bundle.bbclass
@@ -157,45 +157,15 @@ def get_bundle_runtime(d):
157 157
158CONTAINER_BUNDLE_RUNTIME ?= "${@get_bundle_runtime(d)}" 158CONTAINER_BUNDLE_RUNTIME ?= "${@get_bundle_runtime(d)}"
159 159
160# Inherit shared functions for multiconfig/machine/arch mapping
161inherit container-common
162
160# Dependencies on native tools 163# Dependencies on native tools
161# vcontainer-native provides vrunner.sh 164# vcontainer-native provides vrunner.sh
162# Blobs come from multiconfig builds (vdkr-initramfs-create, vpdmn-initramfs-create) 165# Blobs come from multiconfig builds (vdkr-initramfs-create, vpdmn-initramfs-create)
163DEPENDS += "qemuwrapper-cross qemu-system-native skopeo-native" 166DEPENDS += "qemuwrapper-cross qemu-system-native skopeo-native"
164DEPENDS += "vcontainer-native" 167DEPENDS += "vcontainer-native"
165 168
166# Determine multiconfig name for blob building based on target architecture
167def get_vruntime_multiconfig(d):
168 arch = d.getVar('TARGET_ARCH')
169 if arch == 'aarch64':
170 return 'vruntime-aarch64'
171 elif arch in ['x86_64', 'i686', 'i586']:
172 return 'vruntime-x86-64'
173 else:
174 return None
175
176# Get the MACHINE name used in the multiconfig (for deploy path)
177def get_vruntime_machine(d):
178 arch = d.getVar('TARGET_ARCH')
179 if arch == 'aarch64':
180 return 'qemuarm64'
181 elif arch in ['x86_64', 'i686', 'i586']:
182 return 'qemux86-64'
183 else:
184 return None
185
186# Map TARGET_ARCH to blob directory name (aarch64, x86_64)
187def get_blob_arch(d):
188 """Map Yocto TARGET_ARCH to blob directory name"""
189 arch = d.getVar('TARGET_ARCH')
190 blob_map = {
191 'aarch64': 'aarch64',
192 'arm': 'aarch64', # Use aarch64 blobs for 32-bit ARM too
193 'x86_64': 'x86_64',
194 'i686': 'x86_64',
195 'i586': 'x86_64',
196 }
197 return blob_map.get(arch, 'aarch64')
198
199VRUNTIME_MULTICONFIG = "${@get_vruntime_multiconfig(d)}" 169VRUNTIME_MULTICONFIG = "${@get_vruntime_multiconfig(d)}"
200VRUNTIME_MACHINE = "${@get_vruntime_machine(d)}" 170VRUNTIME_MACHINE = "${@get_vruntime_machine(d)}"
201BLOB_ARCH = "${@get_blob_arch(d)}" 171BLOB_ARCH = "${@get_blob_arch(d)}"