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
|
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.
|
||||||
|
|
||||||
|
* `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"`)
|
* `RPI_LOCALHOST` (Default: `"raspberrypi"`)
|
||||||
|
|
||||||
Your image hostname.
|
Your image hostname.
|
||||||
|
@ -233,6 +237,8 @@ maintenance and allows for more easy customization.
|
||||||
|
|
||||||
### Stage specification
|
### 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
|
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`
|
for a lite system), place an empty file named `SKIP` in each of the `./stage`
|
||||||
directories you wish not to include.
|
directories you wish not to include.
|
||||||
|
|
13
build.sh
13
build.sh
|
@ -133,6 +133,7 @@ if [ -z "${IMG_NAME}" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export USE_QEMU="${USE_QEMU:-0}"
|
export USE_QEMU="${USE_QEMU:-0}"
|
||||||
|
export LAST_STAGE=${LAST_STAGE:-5}
|
||||||
export RPI_LOCALHOST=${RPI_LOCALHOST:-"raspberrypi"}
|
export RPI_LOCALHOST=${RPI_LOCALHOST:-"raspberrypi"}
|
||||||
export RPI_USERNAME=${RPI_USERNAME:-"pi"}
|
export RPI_USERNAME=${RPI_USERNAME:-"pi"}
|
||||||
export RPI_USERPASS=${RPI_USERPASS:-"raspberry"}
|
export RPI_USERPASS=${RPI_USERPASS:-"raspberry"}
|
||||||
|
@ -174,14 +175,22 @@ export QUILT_REFRESH_ARGS="-p ab"
|
||||||
source "${SCRIPT_DIR}/common"
|
source "${SCRIPT_DIR}/common"
|
||||||
# shellcheck source=scripts/dependencies_check
|
# shellcheck source=scripts/dependencies_check
|
||||||
source "${SCRIPT_DIR}/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"
|
dependencies_check "${BASE_DIR}/depends"
|
||||||
|
|
||||||
mkdir -p "${WORK_DIR}"
|
|
||||||
log "Begin ${BASE_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
|
run_stage
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
IMG_NAME="Raspbian"
|
IMG_NAME="Raspbian"
|
||||||
USE_QEMU=1
|
USE_QEMU=1
|
||||||
|
LAST_STAGE=5
|
||||||
KEYBOARD_LANG="gb"
|
KEYBOARD_LANG="gb"
|
||||||
RPI_LOCALHOST="raspberrypi"
|
RPI_LOCALHOST="raspberrypi"
|
||||||
RPI_USERNAME="pi"
|
RPI_USERNAME="pi"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user