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 ```
22 lines
566 B
Bash
Executable File
22 lines
566 B
Bash
Executable File
#!/bin/sh
|
|
# vim: set sw=4 ts=4 sts=4 et :
|
|
|
|
set -e
|
|
|
|
. "${CONFIGDIR:=${PWD}}"/config
|
|
|
|
podman run \
|
|
--tmpfs /var/tmp \
|
|
--tmpfs /usr/${target}/tmp \
|
|
-v portage:/var/db/repos/gentoo \
|
|
-v packages:/var/cache/binpkgs \
|
|
-v distfiles:/var/cache/distfiles \
|
|
-v packages:/usr/${target}/var/cache/binpkgs \
|
|
-v /mnt/gentoo \
|
|
-v ${PWD}:/tmp/build:rw,z \
|
|
-w /tmp/build \
|
|
-d \
|
|
-e FEATURES='-ipc-sandbox -network-sandbox -pid-sandbox' \
|
|
cross-${target} \
|
|
python -c 'from signal import *;signal(SIGTERM, lambda x, y: None);pause()'
|