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 ```
45 lines
768 B
Bash
Executable File
45 lines
768 B
Bash
Executable File
#!/bin/sh
|
|
# vim: set sw=4 ts=4 sts=4 et :
|
|
|
|
set -e
|
|
|
|
. "${CONFIGDIR:=${PWD}}"/config
|
|
|
|
O="${1}"
|
|
|
|
GRUB_MODULES='
|
|
boot
|
|
echo
|
|
efi_gop
|
|
eval
|
|
fat
|
|
gzio
|
|
linux
|
|
loadenv
|
|
normal
|
|
part_gpt
|
|
probe
|
|
regexp
|
|
serial
|
|
squash4
|
|
test
|
|
xzio
|
|
zstd
|
|
'
|
|
|
|
echo 'Creating GRUB image ...'
|
|
mkdir -p "${O}"/efi-part/EFI/BOOT
|
|
grub-mkimage \
|
|
-O arm64-efi \
|
|
-o "${O}"/efi-part/EFI/BOOT/BOOTAA64.efi \
|
|
-d /usr/${target}/usr/lib/grub/arm64-efi \
|
|
-p /EFI/gentoo \
|
|
${GRUB_MODULES}
|
|
|
|
echo 'Generating GRUB configuration file ...'
|
|
mkdir -p "${O}"/efi-part/EFI/gentoo
|
|
cp -uv grub.cfg "${O}"/efi-part/EFI/gentoo
|
|
grub-editenv "${O}"/efi-part/EFI/gentoo/grubenv set rootflags='ro'
|
|
grub-editenv "${O}"/efi-part/EFI/gentoo/grubenv set default=0
|
|
grub-editenv "${O}"/efi-part/EFI/gentoo/grubenv set timeout=5
|