This repository has been archived on 2025-09-06. You can view files and clone it, but cannot push or open issues or pull requests.
Files
home-assistant-yellow/ocivm.sh
Dustin C. Hatch b2aac7c74e vm-build: Add script to build in a microvm
This script uses the `ocivm` tool to launch a QEMU micro VM to build
the operating system.  This is necessary to produce an SELinux-enabled
system, since container runtimes interfere with the SELinux policy
build and filesystem labeling processes.
2023-03-08 11:12:00 -06:00

24 lines
517 B
Bash
Executable File

#!/bin/sh
set -e
. ./config
name=build_yellow
if ! ocivm list | grep -q localhost/cross-${target}; then
ocivm import localhost/cross-${target}
fi
ocivm \
--log-level DEBUG \
run \
-n ${name} \
-w /tmp/src \
-v "${PWD}":/tmp/src \
-v distfiles:/var/cache/distfiles:size=4G \
-v packages:/var/cache/binpkgs \
-v portage:/var/db/repos/gentoo:size=4G \
--tmpfs /usr/aarch64-unknown-linux-gnu/tmp \
--tmpfs /var/tmp \
localhost/cross-aarch64-unknown-linux-gnu \
"$@"