Add a parameter for the last stage to build (2=lite, 4=desktop_4go and 5=official images)
This commit is contained in:
parent
0fee534ea0
commit
b5699a9a4a
|
@ -73,6 +73,10 @@ 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
|
||||
environment. These images include "-qemu" in the image file name.
|
||||
|
||||
* `LAST_STAGE` (Default: `"5"`)
|
||||
|
||||
If you wish to build up to a specified stage (such as building up to stage 2 for a lite system)
|
||||
|
||||
* `RPI_LOCALHOST` (Default: `"raspberrypi"`)
|
||||
|
||||
Your image hostname.
|
||||
|
@ -233,6 +237,8 @@ maintenance and allows for more easy customization.
|
|||
|
||||
### Stage specification
|
||||
|
||||
If you wish to skip some steps you can add an empty file `SKIP` in the directory.
|
||||
It works in `./stage*` or in `./stage*/**-whatever`.
|
||||
If you wish to build up to a specified stage (such as building up to stage 2
|
||||
for a lite system), place an empty file named `SKIP` in each of the `./stage`
|
||||
directories you wish not to include.
|
||||
|
|
13
build.sh
13
build.sh
|
@ -133,6 +133,7 @@ if [ -z "${IMG_NAME}" ]; then
|
|||
fi
|
||||
|
||||
export USE_QEMU="${USE_QEMU:-0}"
|
||||
export LAST_STAGE=${LAST_STAGE:-5}
|
||||
export RPI_LOCALHOST=${RPI_LOCALHOST:-"raspberrypi"}
|
||||
export RPI_USERNAME=${RPI_USERNAME:-"pi"}
|
||||
export RPI_USERPASS=${RPI_USERPASS:-"raspberry"}
|
||||
|
@ -174,14 +175,22 @@ export QUILT_REFRESH_ARGS="-p ab"
|
|||
source "${SCRIPT_DIR}/common"
|
||||
# shellcheck source=scripts/dependencies_check
|
||||
source "${SCRIPT_DIR}/dependencies_check"
|
||||
mkdir -p "${WORK_DIR}"
|
||||
|
||||
# LAST_STAGE validation
|
||||
if [[ "${LAST_STAGE,,}" =~ ^(2|4|5)$ ]]; then
|
||||
log "Valid LAST_STAGE: $LAST_STAGE"
|
||||
else
|
||||
log "ERROR INVALID LAST_STAGE: $LAST_STAGE, try 2, 4 or 5"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
dependencies_check "${BASE_DIR}/depends"
|
||||
|
||||
mkdir -p "${WORK_DIR}"
|
||||
log "Begin ${BASE_DIR}"
|
||||
|
||||
for STAGE_DIR in "${BASE_DIR}/stage"*; do
|
||||
for i in $( seq 0 $LAST_STAGE); do
|
||||
STAGE_DIR=${BASE_DIR}/stage$i
|
||||
run_stage
|
||||
done
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
IMG_NAME="Raspbian"
|
||||
USE_QEMU=1
|
||||
LAST_STAGE=5
|
||||
KEYBOARD_LANG="gb"
|
||||
RPI_LOCALHOST="raspberrypi"
|
||||
RPI_USERNAME="pi"
|
||||
|
|
Loading…
Reference in New Issue
Block a user