Skip to content

Commit d6e56a8

Browse files
committed
cheribsd-release: support vm images
I've put support behind a flag as older CheriBSD trees will break without patchs. If you add the flag --cheribsd-release/build-vm-images to a cheribsd-release-* target and the source tree supports it, an image or images will be built as part of the release process.
1 parent 9032e81 commit d6e56a8

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

pycheribuild/projects/cross/cheribsd.py

+13
Original file line numberDiff line numberDiff line change
@@ -2179,6 +2179,15 @@ def supported_architectures(self) -> "tuple[CrossCompileTarget, ...]":
21792179

21802180

21812181
class BuildFreeBSDReleaseMixin(ReleaseMixinBase):
2182+
@classmethod
2183+
def setup_config_options(cls, **kwargs) -> None:
2184+
super().setup_config_options(**kwargs)
2185+
cls.build_vm_images = cls.add_bool_option(
2186+
"build-vm-images",
2187+
_allow_unknown_targets=True,
2188+
help="Build VM images with releases.",
2189+
)
2190+
21822191
def check_system_dependencies(self) -> None:
21832192
super().check_system_dependencies()
21842193
self.check_required_system_tool("bsdtar", cheribuild_target="bsdtar", apt="libarchive-tools")
@@ -2244,6 +2253,10 @@ def process(self) -> None:
22442253
release_args.set_env(INSTALL="sh " + str(self.source_dir / "tools/install.sh"))
22452254
release_args.set_env(XZ_CMD=str(self.objdir / "tmp/legacy/usr/bin/xz -T 0"))
22462255

2256+
release_args.set_with_options(QEMU=False)
2257+
if self.build_vm_images:
2258+
release_args.set_with_options(CLOUDWARE=True)
2259+
22472260
# Need bsdtar for @file support
22482261
release_args.set_env(TAR_CMD="bsdtar")
22492262

0 commit comments

Comments
 (0)