1. Remove config from .gitignore
2. Add minimal, user-neutral config 3. Change Dockerfile to work around issues building buster on 64-bit hosts 4. Modify export-image/prerun.sh to make sure newly created loop devices are available to mount 5. Add custom setup script 01-run.sh in stage2/04-custom-tweaks
This commit is contained in:
parent
6b72a64f02
commit
45c8dd1406
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,6 +1,5 @@
|
|||
deploy/*
|
||||
work/*
|
||||
config
|
||||
postrun.sh
|
||||
SKIP
|
||||
SKIP_IMAGES
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
FROM debian:buster
|
||||
# Workaround: Use 32-bit base image because building buster images
|
||||
# on 64-bit hosts is currently broken
|
||||
# https://github.com/RPi-Distro/pi-gen/issues/271#issuecomment-556812205
|
||||
FROM i386/debian:buster
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
|
|
9
config
Normal file
9
config
Normal file
|
@ -0,0 +1,9 @@
|
|||
export IMG_NAME=moab_fw
|
||||
export TARGET_HOSTNAME=moab
|
||||
export LOCALE_DEFAULT=en_US.UTF-8
|
||||
export TIMEZONE_DEFAULT="America/Los_Angeles"
|
||||
export DEFAULT_TIMEZONE=America/Los_Angeles
|
||||
export FIRST_USER_NAME=pi
|
||||
export FIRST_USER_PASS="raspberry"
|
||||
export ENABLE_SSH=1
|
||||
export STAGE_LIST="stage0 stage1 stage2"
|
|
@ -39,6 +39,10 @@ BOOT_LENGTH=$(echo "$PARTED_OUT" | grep -e '^1:' | cut -d':' -f 4 | tr -d B)
|
|||
ROOT_OFFSET=$(echo "$PARTED_OUT" | grep -e '^2:' | cut -d':' -f 2 | tr -d B)
|
||||
ROOT_LENGTH=$(echo "$PARTED_OUT" | grep -e '^2:' | cut -d':' -f 4 | tr -d B)
|
||||
|
||||
# Ensures that freshly created loop devices are available to mount
|
||||
# https://github.com/RPi-Distro/pi-gen/issues/320#issuecomment-518484064
|
||||
sleep 5
|
||||
|
||||
BOOT_DEV=$(losetup --show -f -o "${BOOT_OFFSET}" --sizelimit "${BOOT_LENGTH}" "${IMG_FILE}")
|
||||
ROOT_DEV=$(losetup --show -f -o "${ROOT_OFFSET}" --sizelimit "${ROOT_LENGTH}" "${IMG_FILE}")
|
||||
echo "/boot: offset $BOOT_OFFSET, length $BOOT_LENGTH"
|
||||
|
|
16
stage2/04-custom-tweaks/01-run.sh
Executable file
16
stage2/04-custom-tweaks/01-run.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
# Install Docker using default installation script
|
||||
# and perform post-install steps to not require
|
||||
# sudo for docker commands
|
||||
echo "Installing docker..."
|
||||
on_chroot << EOF
|
||||
curl -sSL get.docker.com | sh
|
||||
usermod -aG docker ${FIRST_USER_NAME}
|
||||
EOF
|
||||
|
||||
# Ensure ${FIRST_USER_NAME} is set up for auto-login
|
||||
echo "Setting up ${FIRST_USER_NAME} for auto-login"
|
||||
on_chroot << EOF
|
||||
SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_boot_behaviour B4
|
||||
EOF
|
Loading…
Reference in New Issue
Block a user