Set rudefox defaults

master
B.J. Dweck 2020-09-01 20:40:26 +02:00
parent d6babca3c7
commit d58c7244ec
2 changed files with 35 additions and 18 deletions

View File

@ -1,7 +1,17 @@
# pi-gen
_Tool used to create the raspberrypi.org Raspbian images_ #Burrow Pi Image
This is a fork of the [pi-gen](https://github.com/RPi-Distro/pi-gen) project, the "tool used to create the raspberrypi.org Raspbian images". `pi-gen` serves as a decent base becuase it:
* Builds compact images that self-inflate on the device during the first boot
* Provides a comfortable development workflow
I modified `pi-gen` with the following features:
* Rudefox Burrow installed
* Auto-login
* Read-only filesystem (as a security measure to prevent you from accidentally storing sensitive information on this low-security hardware)
* Most user-space networking packages removed (kernel still included networking capabilities)
## Dependencies ## Dependencies
@ -29,13 +39,17 @@ environment variables.
The following environment variables are supported: The following environment variables are supported:
* `IMG_NAME` **required** (Default: unset) * `IMG_NAME` (Default: `RudefoxBurrow`)
The name of the image to build with the current stage directories. Setting The name of the image to build with the current stage directories. Setting
`IMG_NAME=Raspbian` is logical for an unmodified RPi-Distro/pi-gen build, `IMG_NAME=Raspbian` is logical for an unmodified RPi-Distro/pi-gen build,
but you should use something else for a customized version. Export files but you should use something else for a customized version. Export files
in stages may add suffixes to `IMG_NAME`. in stages may add suffixes to `IMG_NAME`.
* `RUDEFOX_BURROW_VERSION` (Default: `0.0.2`)
The version of Rudefox Burrow to download and install.
* `RELEASE` (Default: buster) * `RELEASE` (Default: buster)
The release version to build images against. Valid values are jessie, stretch The release version to build images against. Valid values are jessie, stretch
@ -83,11 +97,11 @@ The following environment variables are supported:
Setting to '1' enables the QEMU mode - creating an image that can be mounted via QEMU for an emulated Setting to '1' enables the QEMU mode - creating an image that can be mounted via QEMU for an emulated
environment. These images include "-qemu" in the image file name. environment. These images include "-qemu" in the image file name.
* `LOCALE_DEFAULT` (Default: "en_GB.UTF-8" ) * `LOCALE_DEFAULT` (Default: "en_US.UTF-8" )
Default system locale. Default system locale.
* `TARGET_HOSTNAME` (Default: "raspberrypi" ) * `TARGET_HOSTNAME` (Default: "burrow" )
Setting the hostname to the specified value. Setting the hostname to the specified value.
@ -99,7 +113,7 @@ The following environment variables are supported:
keyboard-configuration` and look at the keyboard-configuration` and look at the
`keyboard-configuration/model` value. `keyboard-configuration/model` value.
* `KEYBOARD_KEYMAP` (Default: "gb" ) * `KEYBOARD_KEYMAP` (Default: "us" )
Default keyboard keymap. Default keyboard keymap.
@ -122,11 +136,11 @@ The following environment variables are supported:
To get the current value from a running system, look in To get the current value from a running system, look in
`/etc/timezone`. `/etc/timezone`.
* `FIRST_USER_NAME` (Default: "pi" ) * `FIRST_USER_NAME` (Default: "rudefox" )
Username for the first user Username for the first user
* `FIRST_USER_PASS` (Default: "raspberry") * `FIRST_USER_PASS` (Default: "burrow")
Password for the first user Password for the first user
@ -138,14 +152,17 @@ The following environment variables are supported:
Setting to `1` will enable ssh server for remote log in. Note that if you are using a common password such as the defaults there is a high risk of attackers taking over you Raspberry Pi. Setting to `1` will enable ssh server for remote log in. Note that if you are using a common password such as the defaults there is a high risk of attackers taking over you Raspberry Pi.
* `STAGE_LIST` (Default: `stage*`) * `STAGE_LIST` (Default: `stage[0-2]`)
The default setting builds only the "lite" image for Rudefox Burrow, which is all you need.
If set, then instead of working through the numeric stages in order, this list will be followed. For example setting to `"stage0 stage1 mystage stage2"` will run the contents of `mystage` before stage2. Note that quotes are needed around the list. An absolute or relative path can be given for stages outside the pi-gen directory. If set, then instead of working through the numeric stages in order, this list will be followed. For example setting to `"stage0 stage1 mystage stage2"` will run the contents of `mystage` before stage2. Note that quotes are needed around the list. An absolute or relative path can be given for stages outside the pi-gen directory.
A simple example for building Raspbian: A simple example for building RaspbianBurrow:
```bash ```bash
IMG_NAME='Raspbian' APT_PROXY=http://172.17.10.10:3142
TIMEZONE_DEFAULT="America/Toronto"
``` ```
The config file can also be specified on the command line as an argument the `build.sh` or `build-docker.sh` scripts. The config file can also be specified on the command line as an argument the `build.sh` or `build-docker.sh` scripts.

View File

@ -159,20 +159,20 @@ export DEPLOY_DIR=${DEPLOY_DIR:-"${BASE_DIR}/deploy"}
export DEPLOY_ZIP="${DEPLOY_ZIP:-1}" export DEPLOY_ZIP="${DEPLOY_ZIP:-1}"
export LOG_FILE="${WORK_DIR}/build.log" export LOG_FILE="${WORK_DIR}/build.log"
export TARGET_HOSTNAME=${TARGET_HOSTNAME:-raspberrypi} export TARGET_HOSTNAME=${TARGET_HOSTNAME:-burrow}
export FIRST_USER_NAME=${FIRST_USER_NAME:-pi} export FIRST_USER_NAME=${FIRST_USER_NAME:-rudefox}
export FIRST_USER_PASS=${FIRST_USER_PASS:-raspberry} export FIRST_USER_PASS=${FIRST_USER_PASS:-burrow}
export RELEASE=${RELEASE:-buster} export RELEASE=${RELEASE:-buster}
export WPA_ESSID export WPA_ESSID
export WPA_PASSWORD export WPA_PASSWORD
export WPA_COUNTRY export WPA_COUNTRY
export ENABLE_SSH="${ENABLE_SSH:-0}" export ENABLE_SSH="${ENABLE_SSH:-0}"
export LOCALE_DEFAULT="${LOCALE_DEFAULT:-en_GB.UTF-8}" export LOCALE_DEFAULT="${LOCALE_DEFAULT:-en_US.UTF-8}"
export KEYBOARD_MODEL="${KEYBOARD_MODEL:-Generic 101-key PC}" export KEYBOARD_MODEL="${KEYBOARD_MODEL:-Generic 101-key PC}"
export KEYBOARD_KEYMAP="${KEYBOARD_KEYMAP:-gb}" export KEYBOARD_KEYMAP="${KEYBOARD_KEYMAP:-us}"
export KEYBOARD_LAYOUT="${KEYBOARD_LAYOUT:-English (UK)}" export KEYBOARD_LAYOUT="${KEYBOARD_LAYOUT:-English (UK)}"
export TIMEZONE_DEFAULT="${TIMEZONE_DEFAULT:-Europe/London}" export TIMEZONE_DEFAULT="${TIMEZONE_DEFAULT:-Europe/London}"
@ -227,7 +227,7 @@ fi
mkdir -p "${WORK_DIR}" mkdir -p "${WORK_DIR}"
log "Begin ${BASE_DIR}" log "Begin ${BASE_DIR}"
STAGE_LIST=${STAGE_LIST:-${BASE_DIR}/stage*} STAGE_LIST=${STAGE_LIST:-${BASE_DIR}/stage[0-2]}
for STAGE_DIR in $STAGE_LIST; do for STAGE_DIR in $STAGE_LIST; do
STAGE_DIR=$(realpath "${STAGE_DIR}") STAGE_DIR=$(realpath "${STAGE_DIR}")