use ubuntu-board-gen to start generating images

This commit is contained in:
2023-04-12 04:55:00 +00:00
parent 6943facc81
commit fa9f06cb9a
9 changed files with 387 additions and 13 deletions

View File

@@ -3,7 +3,7 @@
set -euxo pipefail
IMAGE_TYPE="${1:-ubuntu}"
PACKER_BUILD_FILE=
PACKER_BUILD_FILE="${2:-}"
errmsg () {
echo "$@" > /dev/stderr
@@ -14,7 +14,6 @@ preflight () {
ubuntu) PACKER_BUILD_FILE="boards/pi-cm4-ubuntu-22.04.2.json" ;;
raspbian) PACKER_BUILD_FILE="boards/raspberry-pi/raspios-lite-arm.json" ;;
custom)
PACKER_BUILD_FILE="${2:-}"
if [ -z "${PACKER_BUILD_FILE}" ]
then
errmsg "[!] custom board requires a board file path"

6
packer/ubuntu-boards.yml Normal file
View File

@@ -0,0 +1,6 @@
boards:
- version: 22.04.2
size: 32G
name: cm4-cluster-ubuntu-22.04.2.img
scripts:
- scripts/install-base.sh