Commit Graph

6 Commits (gentoo)

Author SHA1 Message Date
Dustin ab311001a5 ocivm.sh: Allow projects to specify build VM name
Projects can now set a `buildvm` variable in their `config` file to
specify a unique name for their build VMs.  This allows multiple
projects to have running VMs simultaneously.

If a project does not provide a name, the build VM will be called
`aimeebuild`.
2023-04-16 20:09:05 -05:00
Dustin d8e0af477a ocivm: Do not mount tmpfs for Portage
Very large packages cannot be built with `PORTAGE_TMPDIR` on a tmpfs
mount, unless the VM has a tremendous amount of RAM.  The performance
improvement is negligible anyway, so let's not bother.
2023-03-30 11:01:16 -05:00
Dustin 401a58a874 ocivm: Unify Portage cache directories
It turns out that QEMU microvms have a very limited number of I/O ports
available for e.g. attached disks and shared filesystems.  To conserve
ports, we'll use a single volume for both distfiles and binpkgs cache
directories.
2023-03-30 11:01:04 -05:00
Dustin 40bf772034 ocivm: Increase vRAM allocation
Building large packages like *dev-lang/go* and *app-containers/podman*
requires more memory.
2023-03-30 10:57:51 -05:00
Dustin 31d8a98f64 build: Implement CONFIGDIR setting
In effort to support different builds of Aimee OS using the same
scripts, without necessarily having to fork this repository, the build
system now supports a `CONFIGDIR` setting.  When this variable is set,
files defining the target environment, such as the lists of packages to
install, the kernel configuration, the Portage configuration, etc. are
found in the path it specifes.

The reference build, for the Home Assistant Yellow board, is configured
in the `yellow` directory.  To build it, run:

```sh
CONFIGDIR=yellow ./vm-build.sh
```
2023-03-15 21:12:04 -05:00
Dustin 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