docs: theme, documenting intro and packer.
This commit is contained in:
@@ -12,7 +12,8 @@ errmsg () {
|
||||
preflight () {
|
||||
case "${IMAGE_TYPE}" in
|
||||
ubuntu) PACKER_BUILD_FILE="boards/cm4-cluster-ubuntu-22.04.2.json" ;;
|
||||
raspbian) PACKER_BUILD_FILE="boards/raspberry-pi/raspios-lite-arm.json" ;;
|
||||
## TODO(kyle): look into building a Raspbian version if needed.
|
||||
# raspbian) PACKER_BUILD_FILE="boards/raspberry-pi/raspios-lite-arm.json" ;;
|
||||
custom)
|
||||
if [ -z "${PACKER_BUILD_FILE}" ]
|
||||
then
|
||||
@@ -23,7 +24,7 @@ preflight () {
|
||||
*)
|
||||
errmsg "[!] invalid image type ${IMAGE_TYPE}."
|
||||
errmsg "[!] valid image types are"
|
||||
errmsg " - raspbian"
|
||||
# errmsg " - raspbian"
|
||||
errmsg " - ubuntu"
|
||||
errmsg " - custom path/to/board/file"
|
||||
exit 1
|
||||
|
||||
@@ -9,9 +9,13 @@ PACKER_FILE=packer_${PACKER_VERSION}_linux_${ARCH}
|
||||
UPSTREAM="https://github.com/mkaczanowski/packer-builder-arm"
|
||||
UPGRADE="false"
|
||||
BUILD_DIR="$(pwd)/build"
|
||||
FORCE_DEPENDENCY_INSTALL="no"
|
||||
|
||||
prep () {
|
||||
sudo apt-get update && sudo apt-get -y install git unzip qemu-user-static e2fsprogs dosfstools 'bsdtar|libarchive-tools'
|
||||
if [ -z "$(command -v git)" -o "${FORCE_DEPENDENCY_INSTALL}" = "yes" ]
|
||||
then
|
||||
sudo apt-get update && sudo apt-get -y install git unzip qemu-user-static e2fsprogs dosfstools libarchive-tools
|
||||
fi
|
||||
mkdir -p ${BUILD_DIR}
|
||||
pushd ${BUILD_DIR}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user