diff --git a/.gitignore b/.gitignore index a6883c2049..535b621f13 100644 --- a/.gitignore +++ b/.gitignore @@ -2,8 +2,6 @@ deploy/* work/* config postrun.sh -SKIP -SKIP_IMAGES .pc *-pc apt-cacher-ng/ diff --git a/BUILD-GREENGRASS.md b/BUILD-GREENGRASS.md new file mode 100644 index 0000000000..65753ac6c2 --- /dev/null +++ b/BUILD-GREENGRASS.md @@ -0,0 +1,14 @@ +# How to build custom Grassbian image? + +Place create `./config` file. The sensible minimal one might look like +the following: + +``` +IMG_NAME=CustomGrassbian +HOSTNAME=grassbian +``` + +`HOSTNAME` is optional but it will be randomly-generated otherwise. + +If interested in building a full desktop version please remove `SKIP` +and `SKIP_IMAGES` files from all stages. diff --git a/Dockerfile b/Dockerfile index 4e4264f8e6..706a5fb5a3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ -FROM debian:stretch +FROM debian:buster ENV DEBIAN_FRONTEND noninteractive RUN apt-get -y update && \ apt-get -y install \ git vim parted \ - quilt realpath qemu-user-static debootstrap zerofree pxz zip dosfstools \ - bsdtar libcap2-bin rsync grep udev xz-utils curl xxd \ + quilt coreutils qemu-user-static debootstrap zerofree zip dosfstools \ + bsdtar libcap2-bin rsync grep udev xz-utils curl xxd file kmod\ && rm -rf /var/lib/apt/lists/* COPY . /pi-gen/ diff --git a/README.md b/README.md old mode 100755 new mode 100644 index f00115ac10..f9435337d1 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Grassbian Users -[use this guide](./SETUP-GREENGRASS.md) to get started +* [Get started](./SETUP-GREENGRASS.md) +* [Build own image](./BUILD-GREENGRASS.md) # pi-gen @@ -10,14 +11,15 @@ _Tool used to create the raspberrypi.org Raspbian images_ ## Dependencies pi-gen runs on Debian based operating systems. Currently it is only supported on -either Debian Stretch or Ubuntu Xenial and is known to have issues building on -earlier releases of these systems. +either Debian Buster or Ubuntu Xenial and is known to have issues building on +earlier releases of these systems. On other Linux distributions it may be possible +to use the Docker build described below. To install the required dependencies for pi-gen you should run: ```bash -apt-get install quilt parted realpath qemu-user-static debootstrap zerofree pxz zip \ -dosfstools bsdtar libcap2-bin grep rsync xz-utils +apt-get install coreutils quilt parted qemu-user-static debootstrap zerofree zip \ +dosfstools bsdtar libcap2-bin grep rsync xz-utils file git curl ``` The file `depends` contains a list of tools needed. The format of this @@ -65,18 +67,72 @@ The following environment variables are supported: be built and cached. Note, `WORK_DIR` stores a complete copy of the target system for each build stage, amounting to tens of gigabytes in the case of Raspbian. - + **CAUTION**: If your working directory is on an NTFS partition you probably won't be able to build. Make sure this is a proper Linux filesystem. * `DEPLOY_DIR` (Default: `"$BASE_DIR/deploy"`) Output directory for target system images and NOOBS bundles. + * `DEPLOY_ZIP` (Default: `1`) + + Setting to `0` will deploy the actual image (`.img`) instead of a zipped image (`.zip`). + * `USE_QEMU` (Default: `"0"`) 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. + * `LOCALE_DEFAULT` (Default: "en_GB.UTF-8" ) + + Default system locale. + + * `HOSTNAME` (Default: "raspberrypi" ) + + Setting the hostname to the specified value. + + * `KEYBOARD_KEYMAP` (Default: "gb" ) + + Default keyboard keymap. + + To get the current value from a running system, run `debconf-show + keyboard-configuration` and look at the + `keyboard-configuration/xkb-keymap` value. + + * `KEYBOARD_LAYOUT` (Default: "English (UK)" ) + + Default keyboard layout. + + To get the current value from a running system, run `debconf-show + keyboard-configuration` and look at the + `keyboard-configuration/variant` value. + + * `TIMEZONE_DEFAULT` (Default: "Europe/London" ) + + Default keyboard layout. + + To get the current value from a running system, look in + `/etc/timezone`. + + * `FIRST_USER_NAME` (Default: "pi" ) + + Username for the first user + + * `FIRST_USER_PASS` (Default: "raspberry") + + Password for the first user + + * `WPA_ESSID`, `WPA_PASSWORD` and `WPA_COUNTRY` (Default: unset) + + If these are set, they are use to configure `wpa_supplicant.conf`, so that the raspberry pi can automatically connect to a wifi network on first boot. + + * `ENABLE_SSH` (Default: `0`) + + 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 RaspberryPi. + + * `STAGE_LIST` (Default: `stage*`) + + 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: @@ -84,6 +140,13 @@ A simple example for building Raspbian: IMG_NAME='Raspbian' ``` +The config file can also be specified on the command line as an argument the `build.sh` or `build-docker.sh` scripts. + +``` +./build.sh -c myconfig +``` + +This is parsed after `config` so can be used to override values set there. ## How the build process works @@ -132,6 +195,13 @@ It is recommended to examine build.sh for finer details. ## Docker Build +Docker can be used to perform the build inside a container. This partially isolates +the build from the host system, and allows using the script on non-debian based +systems (e.g. Fedora Linux). The isolate is not complete due to the need to use +some kernel level services for arm emulation (binfmt) and loop devices (losetup). + +To build: + ```bash vi config # Edit your config file. See above. ./build-docker.sh @@ -147,6 +217,12 @@ continue: CONTINUE=1 ./build-docker.sh ``` +To examine the container after a failure you can enter a shell within it using: + +```bash +sudo docker run -it --privileged --volumes-from=pigen_work pi-gen /bin/bash +``` + After successful build, the build container is by default removed. This may be undesired when making incremental changes to a customized build. To prevent the build script from remove the container add ```bash @@ -253,3 +329,29 @@ follows: * Once you're happy with the image you can remove the SKIP_IMAGES files and export your image to test +# Troubleshooting + +## `64 Bit Systems` +Please note there is currently an issue when compiling with a 64 Bit OS. See https://github.com/RPi-Distro/pi-gen/issues/271 + +## `binfmt_misc` + +Linux is able execute binaries from other architectures, meaning that it should be +possible to make use of `pi-gen` on an x86_64 system, even though it will be running +ARM binaries. This requires support from the [`binfmt_misc`](https://en.wikipedia.org/wiki/Binfmt_misc) +kernel module. + +You may see the following error: + +``` +update-binfmts: warning: Couldn't load the binfmt_misc module. +``` + +To resolve this, ensure that the following files are available (install them if necessary): + +``` +/lib/modules/$(uname -r)/kernel/fs/binfmt_misc.ko +/usr/bin/qemu-arm-static +``` + +You may also need to load the module by hand - run `modprobe binfmt_misc`. diff --git a/SETUP-GREENGRASS.md b/SETUP-GREENGRASS.md index 1e16372fbd..e9bda5d627 100644 --- a/SETUP-GREENGRASS.md +++ b/SETUP-GREENGRASS.md @@ -6,9 +6,10 @@ You can get the latest image [here](https://github.com/iopipe/pi-gen-greengrass/ 2. Burn the image 3. Eject and re-insert the card, go into the mounted drive partition (boot partition for Linux afficionados) 4. Copy the certs/ and config/ folders from the .tar.gz you recieved when you created a greengrass core into the boot partition in the greengrass folder +5. If default AWS certificate (*Amazon Root CA 1*) is not suitable please copy the one used into the boot partition in `greengrass/certs` folder 6. (optional) Add a file titled `ssh` with no extension if you want to ssh into your raspberry pi 7. (optional) [Set up WiFi headlessly](https://www.raspberrypi.org/documentation/configuration/wireless/headless.md) 7. Eject sd and place it into raspberry pi and apply power to pi 8. If you haven't set wifi up on the SD card, [do so now](https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md) with an attached keybeard and mouse. Otherwise, you can ssh in if you completed the ssh and headless wifi step. 8. On the Pi, after boot, run `sudo systemctl status greengrass.service` to ensure greengrass service has booted and is running -9. If not, `sudo systemctl stop greengrass.service` and `cd /greengrass/ggc/core/`, then `./greengrassd` to see output from startup sequences for troubleshooting \ No newline at end of file +9. If not, `sudo systemctl stop greengrass.service` and `cd /greengrass/ggc/core/`, then `./greengrassd` to see output from startup sequences for troubleshooting diff --git a/build-docker.sh b/build-docker.sh index 16d20f554b..79b68d45e1 100755 --- a/build-docker.sh +++ b/build-docker.sh @@ -1,86 +1,108 @@ -#!/bin/bash -e +#!/bin/bash -eu +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" + +BUILD_OPTS="$*" DOCKER="docker" -set +e -$DOCKER ps >/dev/null 2>&1 -if [ $? != 0 ]; then + +if ! ${DOCKER} ps >/dev/null 2>&1; then DOCKER="sudo docker" fi -if ! $DOCKER ps >/dev/null; then +if ! ${DOCKER} ps >/dev/null; then echo "error connecting to docker:" - $DOCKER ps + ${DOCKER} ps exit 1 fi -set -e -config_file=() -if [ -f config ]; then - config_file=("--env-file" "$(pwd)/config") - source config +CONFIG_FILE="" +if [ -f "${DIR}/config" ]; then + CONFIG_FILE="${DIR}/config" +fi + +while getopts "c:" flag +do + case "${flag}" in + c) + CONFIG_FILE="${OPTARG}" + ;; + *) + ;; + esac +done + +# Ensure that the configuration file is an absolute path +if test -x /usr/bin/realpath; then + CONFIG_FILE=$(realpath -s "$CONFIG_FILE") +fi + +# Ensure that the confguration file is present +if test -z "${CONFIG_FILE}"; then + echo "Configuration file need to be present in '${DIR}/config' or path passed as parameter" + exit 1 +else + # shellcheck disable=SC1090 + source "${CONFIG_FILE}" fi CONTAINER_NAME=${CONTAINER_NAME:-pigen_work} CONTINUE=${CONTINUE:-0} PRESERVE_CONTAINER=${PRESERVE_CONTAINER:-0} -if [ "$*" != "" ] || [ -z "${IMG_NAME}" ]; then - if [ -z "${IMG_NAME}" ]; then - echo "IMG_NAME not set in 'config'" 1>&2 - echo 1>&2 - fi - cat >&2 < ) - CONTAINER_NAME=pigen_work set a name for the build container - CONTINUE=1 continue from a previously started container - PRESERVE_CONTAINER=1 keep build container even on successful build -EOF - exit 1 +if [ -z "${IMG_NAME}" ]; then + echo "IMG_NAME not set in 'config'" 1>&2 + echo 1>&2 +exit 1 fi -CONTAINER_EXISTS=$($DOCKER ps -a --filter name="$CONTAINER_NAME" -q) -CONTAINER_RUNNING=$($DOCKER ps --filter name="$CONTAINER_NAME" -q) -if [ "$CONTAINER_RUNNING" != "" ]; then - echo "The build is already running in container $CONTAINER_NAME. Aborting." +# Ensure the Git Hash is recorded before entering the docker container +GIT_HASH=${GIT_HASH:-"$(git rev-parse HEAD)"} + +CONTAINER_EXISTS=$(${DOCKER} ps -a --filter name="${CONTAINER_NAME}" -q) +CONTAINER_RUNNING=$(${DOCKER} ps --filter name="${CONTAINER_NAME}" -q) +if [ "${CONTAINER_RUNNING}" != "" ]; then + echo "The build is already running in container ${CONTAINER_NAME}. Aborting." exit 1 fi -if [ "$CONTAINER_EXISTS" != "" ] && [ "$CONTINUE" != "1" ]; then - echo "Container $CONTAINER_NAME already exists and you did not specify CONTINUE=1. Aborting." +if [ "${CONTAINER_EXISTS}" != "" ] && [ "${CONTINUE}" != "1" ]; then + echo "Container ${CONTAINER_NAME} already exists and you did not specify CONTINUE=1. Aborting." echo "You can delete the existing container like this:" - echo " $DOCKER rm -v $CONTAINER_NAME" + echo " ${DOCKER} rm -v ${CONTAINER_NAME}" exit 1 fi -$DOCKER build -t pi-gen . -if [ "$CONTAINER_EXISTS" != "" ]; then - trap "echo 'got CTRL+C... please wait 5s'; $DOCKER stop -t 5 ${CONTAINER_NAME}_cont" SIGINT SIGTERM - time $DOCKER run --rm --privileged \ +# Modify original build-options to allow config file to be mounted in the docker container +BUILD_OPTS="$(echo "${BUILD_OPTS:-}" | sed -E 's@\-c\s?([^ ]+)@-c /config@')" + +${DOCKER} build -t pi-gen "${DIR}" +if [ "${CONTAINER_EXISTS}" != "" ]; then + trap 'echo "got CTRL+C... please wait 5s" && ${DOCKER} stop -t 5 ${CONTAINER_NAME}_cont' SIGINT SIGTERM + time ${DOCKER} run --rm --privileged \ + --volume "${CONFIG_FILE}":/config:ro \ + -e "GIT_HASH=${GIT_HASH}" \ --volumes-from="${CONTAINER_NAME}" --name "${CONTAINER_NAME}_cont" \ - -e IMG_NAME="${IMG_NAME}"\ pi-gen \ bash -e -o pipefail -c "dpkg-reconfigure qemu-user-static && - cd /pi-gen; ./build.sh; + cd /pi-gen; ./build.sh ${BUILD_OPTS} && rsync -av work/*/build.log deploy/" & wait "$!" else - trap "echo 'got CTRL+C... please wait 5s'; $DOCKER stop -t 5 ${CONTAINER_NAME}" SIGINT SIGTERM - time $DOCKER run --name "${CONTAINER_NAME}" --privileged \ - -e IMG_NAME="${IMG_NAME}"\ - "${config_file[@]}" \ + trap 'echo "got CTRL+C... please wait 5s" && ${DOCKER} stop -t 5 ${CONTAINER_NAME}' SIGINT SIGTERM + time ${DOCKER} run --name "${CONTAINER_NAME}" --privileged \ + --volume "${CONFIG_FILE}":/config:ro \ + -e "GIT_HASH=${GIT_HASH}" \ pi-gen \ bash -e -o pipefail -c "dpkg-reconfigure qemu-user-static && - cd /pi-gen; ./build.sh && + cd /pi-gen; ./build.sh ${BUILD_OPTS} && rsync -av work/*/build.log deploy/" & wait "$!" fi echo "copying results from deploy/" -$DOCKER cp "${CONTAINER_NAME}":/pi-gen/deploy . +${DOCKER} cp "${CONTAINER_NAME}":/pi-gen/deploy . ls -lah deploy # cleanup -if [ "$PRESERVE_CONTAINER" != "1" ]; then - $DOCKER rm -v $CONTAINER_NAME +if [ "${PRESERVE_CONTAINER}" != "1" ]; then + ${DOCKER} rm -v "${CONTAINER_NAME}" fi echo "Done! Your image(s) should be in deploy/" diff --git a/build.sh b/build.sh index ebeb46ab1a..a730e44285 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,5 @@ #!/bin/bash -e -# shellcheck disable=SC2119,SC1091 +# shellcheck disable=SC2119 run_sub_stage() { log "Begin ${SUB_STAGE_DIR}" @@ -46,11 +46,11 @@ EOF SUB_STAGE_QUILT_PATCH_DIR="$(basename "$SUB_STAGE_DIR")-pc" mkdir -p "$SUB_STAGE_QUILT_PATCH_DIR" ln -snf "$SUB_STAGE_QUILT_PATCH_DIR" .pc + quilt upgrade if [ -e "${SUB_STAGE_DIR}/${i}-patches/EDIT" ]; then echo "Dropping into bash to edit patches..." bash fi - quilt upgrade RC=0 quilt push -a || RC=$? case "$RC" in @@ -102,7 +102,7 @@ run_stage(){ ./prerun.sh log "End ${STAGE_DIR}/prerun.sh" fi - for SUB_STAGE_DIR in ${STAGE_DIR}/*; do + for SUB_STAGE_DIR in "${STAGE_DIR}"/*; do if [ -d "${SUB_STAGE_DIR}" ] && [ ! -f "${SUB_STAGE_DIR}/SKIP" ]; then run_sub_stage @@ -124,9 +124,26 @@ fi if [ -f config ]; then + # shellcheck disable=SC1091 source config fi +while getopts "c:" flag +do + case "$flag" in + c) + EXTRA_CONFIG="$OPTARG" + # shellcheck disable=SC1090 + source "$EXTRA_CONFIG" + ;; + *) + ;; + esac +done + +export PI_GEN=${PI_GEN:-pi-gen} +export PI_GEN_REPO=${PI_GEN_REPO:-https://github.com/RPi-Distro/pi-gen} + if [ -z "${IMG_NAME}" ]; then echo "IMG_NAME not set" 1>&2 exit 1 @@ -134,13 +151,34 @@ fi export USE_QEMU="${USE_QEMU:-0}" export IMG_DATE="${IMG_DATE:-"$(date +%Y-%m-%d)"}" +export IMG_FILENAME="${IMG_FILENAME:-"${IMG_DATE}-${IMG_NAME}"}" +export ZIP_FILENAME="${ZIP_FILENAME:-"image_${IMG_DATE}-${IMG_NAME}"}" BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" export SCRIPT_DIR="${BASE_DIR}/scripts" export WORK_DIR="${WORK_DIR:-"${BASE_DIR}/work/${IMG_DATE}-${IMG_NAME}"}" export DEPLOY_DIR=${DEPLOY_DIR:-"${BASE_DIR}/deploy"} +export DEPLOY_ZIP="${DEPLOY_ZIP:-1}" export LOG_FILE="${WORK_DIR}/build.log" +export HOSTNAME=${HOSTNAME:-raspberrypi} + +export FIRST_USER_NAME=${FIRST_USER_NAME:-pi} +export FIRST_USER_PASS=${FIRST_USER_PASS:-raspberry} +export WPA_ESSID +export WPA_PASSWORD +export WPA_COUNTRY +export ENABLE_SSH="${ENABLE_SSH:-0}" + +export LOCALE_DEFAULT="${LOCALE_DEFAULT:-en_GB.UTF-8}" + +export KEYBOARD_KEYMAP="${KEYBOARD_KEYMAP:-gb}" +export KEYBOARD_LAYOUT="${KEYBOARD_LAYOUT:-English (UK)}" + +export TIMEZONE_DEFAULT="${TIMEZONE_DEFAULT:-Europe/London}" + +export GIT_HASH=${GIT_HASH:-"$(git rev-parse HEAD)"} + export BASE_DIR export CLEAN @@ -170,13 +208,26 @@ source "${SCRIPT_DIR}/common" # shellcheck source=scripts/dependencies_check source "${SCRIPT_DIR}/dependencies_check" - dependencies_check "${BASE_DIR}/depends" +#check username is valid +if [[ ! "$FIRST_USER_NAME" =~ ^[a-z][-a-z0-9_]*$ ]]; then + echo "Invalid FIRST_USER_NAME: $FIRST_USER_NAME" + exit 1 +fi + +if [[ -n "${APT_PROXY}" ]] && ! curl --silent "${APT_PROXY}" >/dev/null ; then + echo "Could not reach APT_PROXY server: ${APT_PROXY}" + exit 1 +fi + mkdir -p "${WORK_DIR}" log "Begin ${BASE_DIR}" -for STAGE_DIR in "${BASE_DIR}/stage"*; do +STAGE_LIST=${STAGE_LIST:-${BASE_DIR}/stage*} + +for STAGE_DIR in $STAGE_LIST; do + STAGE_DIR=$(realpath "${STAGE_DIR}") run_stage done diff --git a/depends b/depends index d516533115..6238eb1eed 100644 --- a/depends +++ b/depends @@ -1,10 +1,10 @@ quilt parted -realpath +realpath:coreutils qemu-arm-static:qemu-user-static debootstrap zerofree -pxz zip +zip mkdosfs:dosfstools capsh:libcap2-bin bsdtar @@ -13,3 +13,6 @@ rsync xz:xz-utils curl xxd +file +git +lsmod:kmod diff --git a/export-image/00-allow-rerun/00-run.sh b/export-image/00-allow-rerun/00-run.sh index f7c5b4e126..dd67f4cbe4 100755 --- a/export-image/00-allow-rerun/00-run.sh +++ b/export-image/00-allow-rerun/00-run.sh @@ -3,3 +3,7 @@ if [ ! -x "${ROOTFS_DIR}/usr/bin/qemu-arm-static" ]; then cp /usr/bin/qemu-arm-static "${ROOTFS_DIR}/usr/bin/" fi + +if [ -e "${ROOTFS_DIR}/etc/ld.so.preload" ]; then + mv "${ROOTFS_DIR}/etc/ld.so.preload" "${ROOTFS_DIR}/etc/ld.so.preload.disabled" +fi diff --git a/export-image/01-set-sources/00-patches/0-sources.diff b/export-image/01-set-sources/00-patches/0-sources.diff deleted file mode 100644 index 17badff14b..0000000000 --- a/export-image/01-set-sources/00-patches/0-sources.diff +++ /dev/null @@ -1,9 +0,0 @@ -Index: export-jessie/rootfs/etc/apt/sources.list.d/raspi.list -=================================================================== ---- export-jessie.orig/rootfs/etc/apt/sources.list.d/raspi.list -+++ export-jessie/rootfs/etc/apt/sources.list.d/raspi.list -@@ -1,3 +1,3 @@ --deb http://archive.raspberrypi.org/debian/ stretch main ui staging -+deb http://archive.raspberrypi.org/debian/ stretch main ui - # Uncomment line below then 'apt-get update' to enable 'apt-get source' - #deb-src http://archive.raspberrypi.org/debian/ stretch main ui diff --git a/export-image/01-set-sources/00-patches/series b/export-image/01-set-sources/00-patches/series deleted file mode 100644 index 49ccdbcfec..0000000000 --- a/export-image/01-set-sources/00-patches/series +++ /dev/null @@ -1 +0,0 @@ -0-sources.diff diff --git a/export-image/03-set-partuuid/00-run.sh b/export-image/03-set-partuuid/00-run.sh index 29edc671a7..1538c07f24 100755 --- a/export-image/03-set-partuuid/00-run.sh +++ b/export-image/03-set-partuuid/00-run.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -IMG_FILE="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.img" +IMG_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img" IMGID="$(dd if="${IMG_FILE}" skip=440 bs=1 count=4 2>/dev/null | xxd -e | cut -f 2 -d' ')" diff --git a/export-image/04-finalise/01-run.sh b/export-image/04-finalise/01-run.sh index e8662a0591..0864639b23 100755 --- a/export-image/04-finalise/01-run.sh +++ b/export-image/04-finalise/01-run.sh @@ -1,20 +1,32 @@ #!/bin/bash -e -IMG_FILE="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.img" -INFO_FILE="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.info" +IMG_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img" +INFO_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.info" on_chroot << EOF -/etc/init.d/fake-hwclock stop -hardlink -t /usr/share/doc +if [ -x /etc/init.d/fake-hwclock ]; then + /etc/init.d/fake-hwclock stop +fi +if hash hardlink 2>/dev/null; then + hardlink -t /usr/share/doc +fi EOF -if [ -d "${ROOTFS_DIR}/home/pi/.config" ]; then - chmod 700 "${ROOTFS_DIR}/home/pi/.config" +if [ -d "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config" ]; then + chmod 700 "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config" fi rm -f "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache" rm -f "${ROOTFS_DIR}/usr/bin/qemu-arm-static" +if [ "${USE_QEMU}" != "1" ]; then + if [ -e "${ROOTFS_DIR}/etc/ld.so.preload.disabled" ]; then + mv "${ROOTFS_DIR}/etc/ld.so.preload.disabled" "${ROOTFS_DIR}/etc/ld.so.preload" + fi +fi + +rm -f "${ROOTFS_DIR}/etc/network/interfaces.dpkg-old" + rm -f "${ROOTFS_DIR}/etc/apt/sources.list~" rm -f "${ROOTFS_DIR}/etc/apt/trusted.gpg~" @@ -22,6 +34,8 @@ rm -f "${ROOTFS_DIR}/etc/passwd-" rm -f "${ROOTFS_DIR}/etc/group-" rm -f "${ROOTFS_DIR}/etc/shadow-" rm -f "${ROOTFS_DIR}/etc/gshadow-" +rm -f "${ROOTFS_DIR}/etc/subuid-" +rm -f "${ROOTFS_DIR}/etc/subgid-" rm -f "${ROOTFS_DIR}"/var/cache/debconf/*-old rm -f "${ROOTFS_DIR}"/var/lib/dpkg/*-old @@ -41,24 +55,24 @@ rm -f "${ROOTFS_DIR}/etc/vnc/updateid" update_issue "$(basename "${EXPORT_DIR}")" install -m 644 "${ROOTFS_DIR}/etc/rpi-issue" "${ROOTFS_DIR}/boot/issue.txt" -install files/LICENSE.oracle "${ROOTFS_DIR}/boot/" - cp "$ROOTFS_DIR/etc/rpi-issue" "$INFO_FILE" { - firmware=$(zgrep "firmware as of" \ - "$ROOTFS_DIR/usr/share/doc/raspberrypi-kernel/changelog.Debian.gz" | \ - head -n1 | sed -n 's|.* \([^ ]*\)$|\1|p') - printf "\nFirmware: https://github.com/raspberrypi/firmware/tree/%s\n" "$firmware" + if [ -f "$ROOTFS_DIR/usr/share/doc/raspberrypi-kernel/changelog.Debian.gz" ]; then + firmware=$(zgrep "firmware as of" \ + "$ROOTFS_DIR/usr/share/doc/raspberrypi-kernel/changelog.Debian.gz" | \ + head -n1 | sed -n 's|.* \([^ ]*\)$|\1|p') + printf "\nFirmware: https://github.com/raspberrypi/firmware/tree/%s\n" "$firmware" - kernel="$(curl -s -L "https://github.com/raspberrypi/firmware/raw/$firmware/extra/git_hash")" - printf "Kernel: https://github.com/raspberrypi/linux/tree/%s\n" "$kernel" + kernel="$(curl -s -L "https://github.com/raspberrypi/firmware/raw/$firmware/extra/git_hash")" + printf "Kernel: https://github.com/raspberrypi/linux/tree/%s\n" "$kernel" - uname="$(curl -s -L "https://github.com/raspberrypi/firmware/raw/$firmware/extra/uname_string7")" + uname="$(curl -s -L "https://github.com/raspberrypi/firmware/raw/$firmware/extra/uname_string7")" + printf "Uname string: %s\n" "$uname" + fi - printf "Uname string: %s\n" "$uname" printf "\nPackages:\n" dpkg -l --root "$ROOTFS_DIR" } >> "$INFO_FILE" @@ -66,17 +80,22 @@ cp "$ROOTFS_DIR/etc/rpi-issue" "$INFO_FILE" ROOT_DEV="$(mount | grep "${ROOTFS_DIR} " | cut -f1 -d' ')" unmount "${ROOTFS_DIR}" -zerofree -v "${ROOT_DEV}" +zerofree "${ROOT_DEV}" unmount_image "${IMG_FILE}" mkdir -p "${DEPLOY_DIR}" -rm -f "${DEPLOY_DIR}/image_${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.zip" +rm -f "${DEPLOY_DIR}/${ZIP_FILENAME}${IMG_SUFFIX}.zip" +rm -f "${DEPLOY_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img" -pushd "${STAGE_WORK_DIR}" > /dev/null -zip "${DEPLOY_DIR}/image_${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.zip" \ - "$(basename "${IMG_FILE}")" -popd > /dev/null +if [ "${DEPLOY_ZIP}" == "1" ]; then + pushd "${STAGE_WORK_DIR}" > /dev/null + zip "${DEPLOY_DIR}/${ZIP_FILENAME}${IMG_SUFFIX}.zip" \ + "$(basename "${IMG_FILE}")" + popd > /dev/null +else + cp "$IMG_FILE" "$DEPLOY_DIR" +fi cp "$INFO_FILE" "$DEPLOY_DIR" diff --git a/export-image/04-finalise/files/LICENSE.oracle b/export-image/04-finalise/files/LICENSE.oracle deleted file mode 100644 index 00898cae08..0000000000 --- a/export-image/04-finalise/files/LICENSE.oracle +++ /dev/null @@ -1,72 +0,0 @@ -Taken from http://www.java.com/license - -Oracle Binary Code License Agreement for the Java SE Platform Products and JavaFX - -ORACLE AMERICA, INC. ("ORACLE"), FOR AND ON BEHALF OF ITSELF AND ITS SUBSIDIARIES AND AFFILIATES UNDER COMMON CONTROL, IS WILLING TO LICENSE THE SOFTWARE TO YOU ONLY UPON THE CONDITION THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS BINARY CODE LICENSE AGREEMENT AND SUPPLEMENTAL LICENSE TERMS (COLLECTIVELY "AGREEMENT"). PLEASE READ THE AGREEMENT CAREFULLY. BY SELECTING THE "ACCEPT LICENSE AGREEMENT" (OR THE EQUIVALENT) BUTTON AND/OR BY USING THE SOFTWARE YOU ACKNOWLEDGE THAT YOU HAVE READ THE TERMS AND AGREE TO THEM. IF YOU ARE AGREEING TO THESE TERMS ON BEHALF OF A COMPANY OR OTHER LEGAL ENTITY, YOU REPRESENT THAT YOU HAVE THE LEGAL AUTHORITY TO BIND THE LEGAL ENTITY TO THESE TERMS. IF YOU DO NOT HAVE SUCH AUTHORITY, OR IF YOU DO NOT WISH TO BE BOUND BY THE TERMS, THEN SELECT THE "DECLINE LICENSE AGREEMENT" (OR THE EQUIVALENT) BUTTON AND YOU MUST NOT USE THE SOFTWARE ON THIS SITE OR ANY OTHER MEDIA ON WHICH THE SOFTWARE IS CONTAINED. - -1. DEFINITIONS. "Software" means the software identified above in binary form that you selected for download, install or use (in the version You selected for download, install or use) from Oracle or its authorized licensees, any other machine readable materials (including, but not limited to, libraries, source files, header files, and data files), any updates or error corrections provided by Oracle, and any user manuals, programming guides and other documentation provided to you by Oracle under this Agreement. "General Purpose Desktop Computers and Servers" means computers, including desktop and laptop computers, or servers, used for general computing functions under end user control (such as but not specifically limited to email, general purpose Internet browsing, and office suite productivity tools). The use of Software in systems and solutions that provide dedicated functionality (other than as mentioned above) or designed for use in embedded or function-specific software applications, for example but not limited to: Software embedded in or bundled with industrial control systems, wireless mobile telephones, wireless handheld devices, kiosks, TV/STB, Blu-ray Disc devices, telematics and network control switching equipment, printers and storage management systems, and other related systems are excluded from this definition and not licensed under this Agreement. "Programs" means (a) Java technology applets and applications intended to run on the Java Platform, Standard Edition platform on Java-enabled General Purpose Desktop Computers and Servers; and (b) JavaFX technology applications intended to run on the JavaFX Runtime on JavaFX-enabled General Purpose Desktop Computers and Servers. “Commercial Features” means those features identified in Table 1-1 (Commercial Features In Java SE Product Editions) of the Java SE documentation accessible at http://www.oracle.com/technetwork/java/javase/documentation/index.html. “README File” means the README file for the Software accessible at http://www.oracle.com/technetwork/java/javase/documentation/index.html. - -2. LICENSE TO USE. Subject to the terms and conditions of this Agreement including, but not limited to, the Java Technology Restrictions of the Supplemental License Terms, Oracle grants you a non-exclusive, non-transferable, limited license without license fees to reproduce and use internally the Software complete and unmodified for the sole purpose of running Programs. THE LICENSE SET FORTH IN THIS SECTION 2 DOES NOT EXTEND TO THE COMMERCIAL FEATURES. YOUR RIGHTS AND OBLIGATIONS RELATED TO THE COMMERCIAL FEATURES ARE AS SET FORTH IN THE SUPPLEMENTAL TERMS ALONG WITH ADDITIONAL LICENSES FOR DEVELOPERS AND PUBLISHERS. - -3. RESTRICTIONS. Software is copyrighted. Title to Software and all associated intellectual property rights is retained by Oracle and/or its licensors. Unless enforcement is prohibited by applicable law, you may not modify, decompile, or reverse engineer Software. You acknowledge that the Software is developed for general use in a variety of information management applications; it is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use the Software in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle disclaims any express or implied warranty of fitness for such uses. No right, title or interest in or to any trademark, service mark, logo or trade name of Oracle or its licensors is granted under this Agreement. Additional restrictions for developers and/or publishers licenses are set forth in the Supplemental License Terms. - -4. DISCLAIMER OF WARRANTY. THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ORACLE FURTHER DISCLAIMS ALL WARRANTIES, EXPRESS AND IMPLIED, INCLUDING WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. - -5. LIMITATION OF LIABILITY. IN NO EVENT SHALL ORACLE BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, OR DAMAGES FOR LOSS OF PROFITS, REVENUE, DATA OR DATA USE, INCURRED BY YOU OR ANY THIRD PARTY, WHETHER IN AN ACTION IN CONTRACT OR TORT, EVEN IF ORACLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. ORACLE'S ENTIRE LIABILITY FOR DAMAGES HEREUNDER SHALL IN NO EVENT EXCEED ONE THOUSAND DOLLARS (U.S. $1,000). - -6. TERMINATION. This Agreement is effective until terminated. You may terminate this Agreement at any time by destroying all copies of Software. This Agreement will terminate immediately without notice from Oracle if you fail to comply with any provision of this Agreement. Either party may terminate this Agreement immediately should any Software become, or in either party's opinion be likely to become, the subject of a claim of infringement of any intellectual property right. Upon termination, you must destroy all copies of Software. - -7. EXPORT REGULATIONS. You agree that U.S. export control laws and other applicable export and import laws govern your use of the Software, including technical data; additional information can be found on Oracle's Global Trade Compliance web site (http://www.oracle.com/products/export). You agree that neither the Software nor any direct product thereof will be exported, directly, or indirectly, in violation of these laws, or will be used for any purpose prohibited by these laws including, without limitation, nuclear, chemical, or biological weapons proliferation. - -8. TRADEMARKS AND LOGOS. You acknowledge and agree as between you -and Oracle that Oracle owns the ORACLE and JAVA trademarks and all ORACLE- and JAVA-related trademarks, service marks, logos and other brand -designations ("Oracle Marks"), and you agree to comply with the Third -Party Usage Guidelines for Oracle Trademarks currently located at -http://www.oracle.com/us/legal/third-party-trademarks/index.html . Any use you make of the Oracle Marks inures to Oracle's benefit. - -9. U.S. GOVERNMENT LICENSE RIGHTS. If Software is being acquired by or on behalf of the U.S. Government or by a U.S. Government prime contractor or subcontractor (at any tier), then the Government's rights in Software and accompanying documentation shall be only those set forth in this Agreement. - -10. GOVERNING LAW. This agreement is governed by the substantive and procedural laws of California. You and Oracle agree to submit to the exclusive jurisdiction of, and venue in, the courts of San Francisco, or Santa Clara counties in California in any dispute arising out of or relating to this agreement. - -11. SEVERABILITY. If any provision of this Agreement is held to be unenforceable, this Agreement will remain in effect with the provision omitted, unless omission would frustrate the intent of the parties, in which case this Agreement will immediately terminate. - -12. INTEGRATION. This Agreement is the entire agreement between you and Oracle relating to its subject matter. It supersedes all prior or contemporaneous oral or written communications, proposals, representations and warranties and prevails over any conflicting or additional terms of any quote, order, acknowledgment, or other communication between the parties relating to its subject matter during the term of this Agreement. No modification of this Agreement will be binding, unless in writing and signed by an authorized representative of each party. - -SUPPLEMENTAL LICENSE TERMS - -These Supplemental License Terms add to or modify the terms of the Binary Code License Agreement. Capitalized terms not defined in these Supplemental Terms shall have the same meanings ascribed to them in the Binary Code License Agreement. These Supplemental Terms shall supersede any inconsistent or conflicting terms in the Binary Code License Agreement, or in any license contained within the Software. - -A. COMMERCIAL FEATURES. You may not use the Commercial Features for running Programs, Java applets or applications in your internal business operations or for any commercial or production purpose, or for any purpose other than as set forth in Sections B, C, D and E of these Supplemental Terms. If You want to use the Commercial Features for any purpose other than as permitted in this Agreement, You must obtain a separate license from Oracle. - -B. SOFTWARE INTERNAL USE FOR DEVELOPMENT LICENSE GRANT. Subject to the terms and conditions of this Agreement and restrictions and exceptions set forth in the README File incorporated herein by reference, including, but not limited to the Java Technology Restrictions of these Supplemental Terms, Oracle grants you a non-exclusive, non-transferable, limited license without fees to reproduce internally and use internally the Software complete and unmodified for the purpose of designing, developing, and testing your Programs. - -C. LICENSE TO DISTRIBUTE SOFTWARE. Subject to the terms and conditions of this Agreement and restrictions and exceptions set forth in the README File, including, but not limited to the Java Technology Restrictions and Limitations on Redistribution of these Supplemental Terms, Oracle grants you a non-exclusive, non-transferable, limited license without fees to reproduce and distribute the Software, provided that (i) you distribute the Software complete and unmodified and only bundled as part of, and for the sole purpose of running, your Programs, (ii) the Programs add significant and primary functionality to the Software, (iii) you do not distribute additional software intended to replace any component(s) of the Software, (iv) you do not remove or alter any proprietary legends or notices contained in the Software, (v) you only distribute the Software subject to a license agreement that: (a) is a complete, unmodified reproduction of this Agreement; or (b) protects Oracle's interests consistent with the terms contained in this Agreement and that includes the notice set forth in Section H, and (vi) you agree to defend and indemnify Oracle and its licensors from and against any damages, costs, liabilities, settlement amounts and/or expenses (including attorneys' fees) incurred in connection with any claim, lawsuit or action by any third party that arises or results from the use or distribution of any and all Programs and/or Software. The license set forth in this Section C does not extend to the Software identified in Section G. - -D. LICENSE TO DISTRIBUTE REDISTRIBUTABLES. Subject to the terms and conditions of this Agreement and restrictions and exceptions set forth in the README File, including but not limited to the Java Technology Restrictions and Limitations on Redistribution of these Supplemental Terms, Oracle grants you a non-exclusive, non-transferable, limited license without fees to reproduce and distribute those files specifically identified as redistributable in the README File ("Redistributables") provided that: (i) you distribute the Redistributables complete and unmodified, and only bundled as part of Programs, (ii) the Programs add significant and primary functionality to the Redistributables, (iii) you do not distribute additional software intended to supersede any component(s) of the Redistributables (unless otherwise specified in the applicable README File), (iv) you do not remove or alter any proprietary legends or notices contained in or on the Redistributables, (v) you only distribute the Redistributables pursuant to a license agreement that: (a) is a complete, unmodified reproduction of this Agreement; or (b) protects Oracle's interests consistent with the terms contained in the Agreement and includes the notice set forth in Section H, (vi) you agree to defend and indemnify Oracle and its licensors from and against any damages, costs, liabilities, settlement amounts and/or expenses (including attorneys' fees) incurred in connection with any claim, lawsuit or action by any third party that arises or results from the use or distribution of any and all Programs and/or Software. The license set forth in this Section D does not extend to the Software identified in Section G. - -E. DISTRIBUTION BY PUBLISHERS. This section pertains to your distribution of the JavaTM SE Development Kit Software (“JDK”) with your printed book or magazine (as those terms are commonly used in the industry) relating to Java technology ("Publication"). Subject to and conditioned upon your compliance with the restrictions and obligations contained in the Agreement, Oracle hereby grants to you a non-exclusive, nontransferable limited right to reproduce complete and unmodified copies of the JDK on electronic media (the "Media") for the sole purpose of inclusion and distribution with your Publication(s), subject to the following terms: (i) You may not distribute the JDK on a stand-alone basis; it must be distributed with your Publication(s); (ii) You are responsible for downloading the JDK from the applicable Oracle web site; (iii) You must refer to the JDK as JavaTM SE Development Kit; (iv) The JDK must be reproduced in its entirety and without any modification whatsoever (including with respect to all proprietary notices) and distributed with your Publication subject to a license agreement that is a complete, unmodified reproduction of this Agreement; (v) The Media label shall include the following information: “Copyright [YEAR], Oracle America, Inc. All rights reserved. Use is subject to license terms. ORACLE and JAVA trademarks and all ORACLE- and JAVA-related trademarks, service marks, logos and other brand designations are trademarks or registered trademarks of Oracle in the U.S. and other countries.” [YEAR] is the year of Oracle's release of the Software; the year information can typically be found in the Software’s “About” box or screen. This information must be placed on the Media label in such a manner as to only apply to the JDK; (vi) You must clearly identify the JDK as Oracle's product on the Media holder or Media label, and you may not state or imply that Oracle is responsible for any third-party software contained on the Media; (vii) You may not include any third party software on the Media which is intended to be a replacement or substitute for the JDK; (viii) You agree to defend and indemnify Oracle and its licensors from and against any damages, costs, liabilities, settlement amounts and/or expenses (including attorneys' fees) incurred in connection with any claim, lawsuit or action by any third party that arises or results from the use or distribution of the JDK and/or the Publication; ; and (ix) You shall provide Oracle with a written notice for each Publication; such notice shall include the following information: (1) title of Publication, (2) author(s), (3) date of Publication, and (4) ISBN or ISSN numbers. Such notice shall be sent to Oracle America, Inc., 500 Oracle Parkway, Redwood Shores, California 94065 U.S.A , Attention: General Counsel. - -F. JAVA TECHNOLOGY RESTRICTIONS. You may not create, modify, or change the behavior of, or authorize your licensees to create, modify, or change the behavior of, classes, interfaces, or subpackages that are in any way identified as "java", "javax", "sun", “oracle” or similar convention as specified by Oracle in any naming convention designation. - -G. LIMITATIONS ON REDISTRIBUTION. You may not redistribute or otherwise transfer patches, bug fixes or updates made available by Oracle through Oracle Premier Support, including those made available under Oracle's Java SE Support program. - -H. COMMERCIAL FEATURES NOTICE. For purpose of complying with Supplemental Term Section C.(v)(b) and D.(v)(b), your license agreement shall include the following notice, where the notice is displayed in a manner that anyone using the Software will see the notice: - -Use of the Commercial Features for any commercial or production purpose requires a separate license from Oracle. “Commercial Features” means those features identified Table 1-1 (Commercial Features In Java SE Product Editions) of the Java SE documentation accessible at http://www.oracle.com/technetwork/java/javase/documentation/index.html - - - -I. SOURCE CODE. Software may contain source code that, unless expressly licensed for other purposes, is provided solely for reference purposes pursuant to the terms of this Agreement. Source code may not be redistributed unless expressly provided for in this Agreement. - -J. THIRD PARTY CODE. Additional copyright notices and license terms applicable to portions of the Software are set forth in the THIRDPARTYLICENSEREADME file accessible at http://www.oracle.com/technetwork/java/javase/documentation/index.html. In addition to any terms and conditions of any third party opensource/freeware license identified in the THIRDPARTYLICENSEREADME file, the disclaimer of warranty and limitation of liability provisions in paragraphs 4 and 5 of the Binary Code License Agreement shall apply to all Software in this distribution. - -K. TERMINATION FOR INFRINGEMENT. Either party may terminate this Agreement immediately should any Software become, or in either party's opinion be likely to become, the subject of a claim of infringement of any intellectual property right. - -L. INSTALLATION AND AUTO-UPDATE. The Software's installation and auto-update processes transmit a limited amount of data to Oracle (or its service provider) about those specific processes to help Oracle understand and optimize them. Oracle does not associate the data with personally identifiable information. You can find more information about the data Oracle collects as a result of your Software download at http://www.oracle.com/technetwork/java/javase/documentation/index.html. - -For inquiries please contact: Oracle America, Inc., 500 Oracle Parkway, - -Redwood Shores, California 94065, USA. - -Last updated 02 April 2013 - diff --git a/export-image/prerun.sh b/export-image/prerun.sh index 0ac718178f..cecde32bed 100755 --- a/export-image/prerun.sh +++ b/export-image/prerun.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -IMG_FILE="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.img" +IMG_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img" unmount_image "${IMG_FILE}" @@ -9,44 +9,35 @@ rm -f "${IMG_FILE}" rm -rf "${ROOTFS_DIR}" mkdir -p "${ROOTFS_DIR}" -BOOT_SIZE=$(du --apparent-size -s "${EXPORT_ROOTFS_DIR}/boot" --block-size=1 | cut -f 1) -TOTAL_SIZE=$(du --apparent-size -s "${EXPORT_ROOTFS_DIR}" --exclude var/cache/apt/archives --block-size=1 | cut -f 1) +BOOT_SIZE="$((256 * 1024 * 1024))" +ROOT_SIZE=$(du --apparent-size -s "${EXPORT_ROOTFS_DIR}" --exclude var/cache/apt/archives --exclude boot --block-size=1 | cut -f 1) -ROUND_SIZE="$((4 * 1024 * 1024))" -ROUNDED_ROOT_SECTOR=$(((2 * BOOT_SIZE + ROUND_SIZE) / ROUND_SIZE * ROUND_SIZE / 512 + 8192)) -IMG_SIZE=$(((BOOT_SIZE + TOTAL_SIZE + (800 * 1024 * 1024) + ROUND_SIZE - 1) / ROUND_SIZE * ROUND_SIZE)) +# All partition sizes and starts will be aligned to this size +ALIGN="$((4 * 1024 * 1024))" +# Add this much space to the calculated file size. This allows for +# some overhead (since actual space usage is usually rounded up to the +# filesystem block size) and gives some free space on the resulting +# image. +ROOT_MARGIN=$((800*1024*1024)) -truncate -s "${IMG_SIZE}" "${IMG_FILE}" -fdisk -H 255 -S 63 "${IMG_FILE}" <&2 exit 1 @@ -13,23 +15,31 @@ mount "$part1" /tmp/1 mount "$part2" /tmp/2 sed /tmp/1/cmdline.txt -i -e "s|root=[^ ]*|root=${part2}|" -sed /tmp/2/etc/fstab -i -e "s|^.* / |${part2} / |" -sed /tmp/2/etc/fstab -i -e "s|^.* /boot |${part1} /boot |" - -if [ -f /mnt/ssh ]; then - cp /mnt/ssh /tmp/1/ -fi - -if [ -f /mnt/ssh.txt ]; then - cp /mnt/ssh.txt /tmp/1/ -fi - -if [ -f /settings/wpa_supplicant.conf ]; then - cp /settings/wpa_supplicant.conf /tmp/1/ -fi - -if ! grep -q resize /proc/cmdline; then - sed -i 's| quiet init=/usr/lib/raspi-config/init_resize.sh||' /tmp/1/cmdline.txt +sed /tmp/2/etc/fstab -i -e "s|^[^#].* / |${part2} / |" +sed /tmp/2/etc/fstab -i -e "s|^[^#].* /boot |${part1} /boot |" + +# shellcheck disable=SC2154 +if [ -z "$restore" ]; then + if [ -f /mnt/ssh ]; then + cp /mnt/ssh /tmp/1/ + fi + + if [ -f /mnt/ssh.txt ]; then + cp /mnt/ssh.txt /tmp/1/ + fi + + if [ -f /settings/wpa_supplicant.conf ]; then + cp /settings/wpa_supplicant.conf /tmp/1/ + fi + + if ! grep -q resize /proc/cmdline; then + if ! grep -q splash /tmp/1/cmdline.txt; then + sed -i "s| quiet||g" /tmp/1/cmdline.txt + fi + sed -i 's| init=/usr/lib/raspi-config/init_resize.sh||' /tmp/1/cmdline.txt + else + sed -i '1 s|.*|& sdhci.debug_quirks2=4|' /tmp/1/cmdline.txt + fi fi umount /tmp/1 diff --git a/export-noobs/00-release/files/partitions.json b/export-noobs/00-release/files/partitions.json index c2e2bcbe01..3d060173a3 100644 --- a/export-noobs/00-release/files/partitions.json +++ b/export-noobs/00-release/files/partitions.json @@ -6,7 +6,8 @@ "mkfs_options": "-F 32", "partition_size_nominal": BOOT_NOM, "uncompressed_tarball_size": BOOT_SIZE, - "want_maximised": false + "want_maximised": false, + "sha256sum": "BOOT_SHASUM" }, { "filesystem_type": "ext4", @@ -14,7 +15,8 @@ "mkfs_options": "-O ^huge_file", "partition_size_nominal": ROOT_NOM, "uncompressed_tarball_size": ROOT_SIZE, - "want_maximised": true + "want_maximised": true, + "sha256sum": "ROOT_SHASUM" } ] } diff --git a/export-noobs/00-release/files/release_notes.txt b/export-noobs/00-release/files/release_notes.txt index fac14ee560..45e8576fc6 100644 --- a/export-noobs/00-release/files/release_notes.txt +++ b/export-noobs/00-release/files/release_notes.txt @@ -1,4 +1,193 @@ UNRELEASED: + * +2019-09-26: + * rpi-eeprom included + - This will automatically update the SPI EEPROM on the Raspberry Pi 4 to the latest stable version. + See https://rpf.io/eeprom for more information. + * New icon theme for file manager icons + * Appearance Settings - option for identical desktop on both monitors + * Appearance Settings - option to show different desktop icons on both monitors + * Taskbar automatically moved to monitor 0 if monitor 1 not found at boot + * Switching of audio output between two HDMI devices added to volume plugin + * Switching of audio input devices added to volume plugin + * .asoundrc (ALSA config file) now uses 'plug' values to support more devices + * Audio Settings tool modified to integrate more closely with volume plugin to reduce duplicated code + * Screen Configuration tool now shows separate menus for resolution and refresh rate + * Primary and active monitor settings removed from Screen Configuration tool + * Overscan support added for FKMS driver + * New keyboard shortcuts added - Ctrl-Alt-End brings up shutdown menu; Ctrl-Alt-M moves taskbar between monitors + * Latest changes to Bluez ALSA interface integrated to improve connection to Bluetooth audio devices + * Mousepad used as simple text editor instead of leafpad + * Version 3.2 of Thonny added + * Version 74 of Chromium added + * Version 3.0.8 of VLC added + * Version 32.0.0.255 of Flash player added + * Version 6.5.0 of RealVNC Server added + * Version 6.19.715 of RealVNC Viewer added (full image only) + * Version 12.0.1 of Mathematica added (full image only) + * Version 0.20.8 of NodeRED added (full image only) + * Version 3.1.0 of Sonic Pi added (full image only) + * Scratch 3 added (full image only) + * Bug fix - URL handling in Terminal + * Bug fix - octal values in SSIDs in network plugin + * Bug fix - remaining value in progress bar when transferring files + * Bug fix - integration of xarchiver tool with file manager + * Bug fix - start menu opening on incorrect monitor + * Bug fix - minimised applications wrongly displayed on taskbar on second monitor + * Bug fix - Bluetooth icon disappearing on x86 platforms when Bluetooth turned off + * Bug fix - Screen Configuration tool not shown on x86 platforms and settings not being saved + * Various translation updates + * Various minor bug fixes + * Epiphany/Web removed + * ntfs-3g included + * pciutils added + * Linux kernel 4.19.75 + * Raspberry Pi firmware 01508e81ec1e918448227ca864616d56c430b46d +2019-07-10: + * Clearer options for switching of Pi 4 video output in Raspberry Pi Configuration + * Option added to Appearance Settings to move taskbar to second monitor + * Option added to Recommended Software to restrict package installs by architecture + * New version of Adobe Flash player (32.0.0.223) + * Selection of screen refresh rates added to Screen Configuration + * Fix for missing text insertion cursor in LibreOffice on Pi 4 + * Fix for Wi-fi interruption when Wi-fi icon on taskbar is clicked + * FIx for incorrect desktop background behind desktop login prompt + * Fix for segmentation faults when launching obconf and lxapperarance + * Fix for unclosed file pointer in Screen Configuration + * Fix for Bluetooth plugin freeze when large numbers of devices detected + * Fix for opening URLs not working in lxterminal + * Fix for start menu opening on incorrect monitor when launched from keyboard + * Fix for taskbar item not having [] removed when un-minimising on second monitor + * Fix for Chromium video playback and WebGL performance on Pi 4 + * Remove 4kp60 option from Raspberry Pi Configuration + * Rename hdmi_enable_4k to hdmi_enable_4kp60 in /boot/config.txt and raspi-config + * Linux kernel 4.19.57 + * Raspberry Pi firmware 356f5c2880a3c7e8774025aa6fc934a617553e7b +2019-06-20: + * Based on Debian Buster + * Support for Raspberry Pi 4 hardware + * FKMS OpenGL desktop graphics driver and xcompmgr compositing window manager used when running on Raspberry Pi 4 + * Screen Configuration application added for use with FKMS driver + * Raspberry Pi 4 video output options added to Raspberry Pi Configuration + * Uses new PiXflat UI theme for GTK and Openbox + * CPU activity gauge plugin no longer shown on taskbar by default + * CPU temperature gauge plugin added (not shown by default) + * USB ejecter and Bluetooth taskbar icons hidden when not appropriate + * Version 74.0.3729.157 of Chromium web browser included + * Version 32.0.0.207 of Flash player included + * IDLE Python IDE removed + * Wolfram Mathematica removed temporarily due to incompatibility with Buster + * Display of package sizes removed from Recommended Software + * Appearance Settings modified to support independent settings for two monitors + * Oracle Java 7 and 8 replaced with OpenJDK 11 + * Miscellaneous small bug fixes + * On-board 5GHz WiFi blocked by rfkill by default + The block is removed when taking one of the following actions: + - Selecting a locale in the first run wizard + - Setting the WiFi country in the Raspberry Pi Configuration tool or the Network Settings applet + - Setting the WiFi country in raspi-config + - Providing a wpa_supplicant.conf file through the boot partition + - Running 'rfkill unblock wifi' + * Boot partition size set to 256M + * Linux kernel 4.19.50 + * Raspberry Pi firmware 88ca9081f5e51cdedd16d5dbc85ed12a25123201 +2019-04-08: + * Chromium browser updated to version 72 + * VLC media player updated to version 3.0.6 + * RealVNC Server updated to version 6.4.0 + * Flash player updated to version 32.0.0.156 + * Performance improvements to SDL library + * Performance improvements to pixman library + * Option to set display underscan added to startup wizard + * Mounted external drives now displayed on desktop by default + * Network plugin modified for improved compatibility with wpa_passphrase + * SD Card Copier tweaks to reduce copy failures + * Various minor bug fixes and appearance tweaks + * Added ethtool + * Added rng-tools + * Add PINN restore support + * Linux kernel 4.14.98 + * Raspberry Pi firmware f8939644f7bd3065068787f1f92b3f3c79cf3de9 +2018-11-13: + * Two versions of image created - "base" image has no optional software packages included; "full" image has all optional packages + - Removed from "base" image - LibreOffice, Thonny, Scratch, Scratch 2, Sonic Pi, Minecraft, Python Games, SmartSim, SenseHAT Emulator + - Added to "full" image - Mathematica, BlueJ, Greenfoot, Node-RED, Claws Mail, VNC Viewer + * Python Games and SmartSim added to Recommended Software + * VLC media player with VideoCore hardware acceleration included in image + * Version 3.0.5 of Thonny included + * Modifications to LXDE components to enable local configuration to override global configuration correctly + * Modifications to Appearance Settings to support above configuration changes + * Modifications to various initial config defaults and relevant package to support above configuration changes + * Selecting default option in Appearance Settings now deletes relevant local configuration files + * PiX theme modified so that all changes made in Appearance Settings are in override files rather than in theme files + * Design of scrollbar buttons changed + * Image Viewer moved into Graphics category on main menu + * Recommended Software now installs LibreOffice language support files if needed, and suggests reboot if needed + * Latest version of Pepper Flash plugin included + * Chromium h264ify plugin permissions set correctly by default + * Corrections to various MIME types so that files open in sensible default applications + * Set default timezone to 'Europe/London' + * Linux kernel 4.14.79 + * Raspberry Pi firmware 12e0bf86e08d6067372bc0a45d7e8a10d3113210 +2018-10-09: + * Raspberry Pi 3A+ support + * In startup wizard, assign keyboard to country as per Debian installer recommendations + * In startup wizard, add option to use US keyboard in preference to country-specific option + * In startup wizard, show IP address on first page + * In startup wizard, check for existing wifi network connection and show it if there is one + * In startup wizard, install language support packages for LibreOffice and other applications + * In startup wizard, improve operation with keyboard only and no mouse + * Password change in Raspberry Pi Configuration and startup wizard now works properly if passwords contain shell characters + * Battery indicator plugin modified to cope with Pi-top hardware monitor crashing + * Networking plugin hides wifi password characters by default + * In Scratch 2 GPIO plugin, set pin from dropdown list rather than free text + * In Scratch 2 SenseHAT plugin, swap x and y axis values for LED array + * Include latest Adobe Flash player (31.0.0.108) + * Include latest RealVNC Server (6.3.1) + * Include libav-tools + * Include ssh-import-id + * Removed Mathematica + * Merge in latest third-party code for Bluetooth ALSA interface + * Add ability to prevent software update changing configuration files, by creating ~/.config/.lock file + * Various other small bug fixes, tweaks and changes to text + * Make dhcpcd work with 3G devices + * Add hw acceleration to ffmpeg + * Improved WiFi-BT coexistence parameters + * Run fake-hwclock before systemd-fsck-root + * Raspberry Pi PoE HAT support + * Linux kernel 4.14.71 + * Raspberry Pi firmware 5b49caa17e91d0e64024380119ad739bb201c674 +2018-06-27: + * New first-boot configuration wizard added + * Recommended Software installer added + * Bluej, Greenfoot, NodeRED, Claws Mail, VNC Viewer removed from image - can now be installed from Recommended Applications + * Qpdfview PDF viewer installed instead of Xpdf + * Version 65.0 of Chromium browser included, with latest Flash player + * Volume up / down keys now change by 5% increments and affect currently-selected output device rather than internal device only + * Network plugin now remembers previously-entered WiFi network passwords when prompting for reconnection + * Serial port and serial console can now be switched separately in Raspberry Pi Configuration + * Lxkeymap keyboard language setting application removed - replaced with dialog within Raspberry Pi Configuration + * Wifi country and keyboard language setting dialogs in Raspberry Pi Configuration now callable from other applications + * New version of Piboto font included to render with correct weight under some rogue applications + * Reconnection to Bluetooth audio devices on reboot improved + * Disable click-to-rename behaviour in file manager if single-click selection enabled + * Appearance Settings dialog makes config changes to some Qt files to match selected theme + * MIME file type associations improved + * Multiple desktop management options removed from mouse middle-click menu + * Menu shortcuts to Raspberry Pi website amended + * Python 2 IDLE menu link removed + * Sample Magpi PDF installed in /home/pi/MagPi + * Various minor tweaks, bug fixes and appearance changes + * Bluetooth updates + - Firmware with Bluetooth 4.2 features + - SCO profile suppot added via bthelper.service + * Linux kernel 4.14.50+ + * Raspberry Pi firmware 748fb17992426bb29d99224b93cb962fefbdc833 +2018-04-18: + * Fixed race between wifi-country.service and raspberrypi-net-mods.service + * Linux kernel 4.14.34+ + * Raspberry Pi firmware 5db8e4e1c63178e200d6fbea23ed4a9bf4656658 +2018-03-13: * Raspberry Pi 3 B+ support * WiFi is disabled until wireless regulatory domain is set (Pi 3 B+ only) - The domain can be done through 'Raspberry Pi Configuration' (rc_gui), diff --git a/export-noobs/prerun.sh b/export-noobs/prerun.sh index 1889567d26..54e0c59f07 100755 --- a/export-noobs/prerun.sh +++ b/export-noobs/prerun.sh @@ -1,24 +1,20 @@ #!/bin/bash -e -IMG_FILE="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.img" +IMG_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img" NOOBS_DIR="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}" unmount_image "${IMG_FILE}" mkdir -p "${STAGE_WORK_DIR}" -cp "${WORK_DIR}/export-image/${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.img" "${STAGE_WORK_DIR}/" +cp "${WORK_DIR}/export-image/${IMG_FILENAME}${IMG_SUFFIX}.img" "${STAGE_WORK_DIR}/" -rm -rf "${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}" +rm -rf "${NOOBS_DIR}" -PARTED_OUT=$(parted -s "${IMG_FILE}" unit b print) -BOOT_OFFSET=$(echo "$PARTED_OUT" | grep -e '^ 1'| xargs echo -n \ -| cut -d" " -f 2 | tr -d B) -BOOT_LENGTH=$(echo "$PARTED_OUT" | grep -e '^ 1'| xargs echo -n \ -| cut -d" " -f 4 | tr -d B) +PARTED_OUT=$(parted -sm "${IMG_FILE}" unit b print) +BOOT_OFFSET=$(echo "$PARTED_OUT" | grep -e '^1:' | cut -d':' -f 2 | tr -d B) +BOOT_LENGTH=$(echo "$PARTED_OUT" | grep -e '^1:' | cut -d':' -f 4 | tr -d B) -ROOT_OFFSET=$(echo "$PARTED_OUT" | grep -e '^ 2'| xargs echo -n \ -| cut -d" " -f 2 | tr -d B) -ROOT_LENGTH=$(echo "$PARTED_OUT" | grep -e '^ 2'| xargs echo -n \ -| 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) 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}") @@ -33,8 +29,8 @@ mount "$BOOT_DEV" "${STAGE_WORK_DIR}/rootfs/boot" ln -sv "/lib/systemd/system/apply_noobs_os_config.service" "$ROOTFS_DIR/etc/systemd/system/multi-user.target.wants/apply_noobs_os_config.service" -bsdtar --numeric-owner --format gnutar --use-compress-program pxz -C "${STAGE_WORK_DIR}/rootfs/boot" -cpf "${NOOBS_DIR}/boot.tar.xz" . +bsdtar --numeric-owner --format gnutar -C "${STAGE_WORK_DIR}/rootfs/boot" -cpf - . | xz -T0 > "${NOOBS_DIR}/boot.tar.xz" umount "${STAGE_WORK_DIR}/rootfs/boot" -bsdtar --numeric-owner --format gnutar --use-compress-program pxz -C "${STAGE_WORK_DIR}/rootfs" --one-file-system -cpf "${NOOBS_DIR}/root.tar.xz" . +bsdtar --numeric-owner --format gnutar -C "${STAGE_WORK_DIR}/rootfs" --one-file-system -cpf - . | xz -T0 > "${NOOBS_DIR}/root.tar.xz" unmount_image "${IMG_FILE}" diff --git a/scripts/common b/scripts/common index efd867efb3..e2048d904f 100644 --- a/scripts/common +++ b/scripts/common @@ -4,21 +4,26 @@ log (){ export -f log bootstrap(){ - local ARCH - ARCH=$(dpkg --print-architecture) + local BOOTSTRAP_CMD=debootstrap + local BOOTSTRAP_ARGS=() export http_proxy=${APT_PROXY} - if [ "$ARCH" != "armhf" ]; then - local BOOTSTRAP_CMD=qemu-debootstrap - else - local BOOTSTRAP_CMD=debootstrap + if [ "$(dpkg --print-architecture)" != "armhf" ] && [ "$(dpkg --print-architecture)" != "aarch64" ]; then + BOOTSTRAP_CMD=qemu-debootstrap fi - capsh --drop=cap_setfcap -- "${BOOTSTRAP_CMD}" --components=main,contrib,non-free \ - --arch armhf \ - --keyring "${STAGE_DIR}/files/raspberrypi.gpg" \ - "$1" "$2" "$3" || rmdir "$2/debootstrap" + BOOTSTRAP_ARGS+=(--arch armhf) + BOOTSTRAP_ARGS+=(--components "main,contrib,non-free") + BOOTSTRAP_ARGS+=(--keyring "${STAGE_DIR}/files/raspberrypi.gpg") + BOOTSTRAP_ARGS+=("$@") + printf -v BOOTSTRAP_STR '%q ' "${BOOTSTRAP_ARGS[@]}" + + setarch linux32 capsh --drop=cap_setfcap -- -c "'${BOOTSTRAP_CMD}' $BOOTSTRAP_STR" || true + + if [ -d "$2/debootstrap" ]; then + rmdir "$2/debootstrap" + fi } export -f bootstrap @@ -53,7 +58,7 @@ unmount_image(){ sync sleep 1 local LOOP_DEVICES - LOOP_DEVICES=$(losetup -j "${1}" | cut -f1 -d':') + LOOP_DEVICES=$(losetup --list | grep "$(basename "${1}")" | cut -f1 -d' ') for LOOP_DEV in ${LOOP_DEVICES}; do if [ -n "${LOOP_DEV}" ]; then local MOUNTED_DIR @@ -85,14 +90,11 @@ on_chroot() { mount --bind /sys "${ROOTFS_DIR}/sys" fi - capsh --drop=cap_setfcap "--chroot=${ROOTFS_DIR}/" -- "$@" + setarch linux32 capsh --drop=cap_setfcap "--chroot=${ROOTFS_DIR}/" -- -e "$@" } export -f on_chroot update_issue() { - local GIT_HASH - GIT_HASH=$(git rev-parse HEAD) - echo -e "Raspberry Pi reference ${IMG_DATE}\nGenerated using pi-gen, https://github.com/RPi-Distro/pi-gen, ${GIT_HASH}, ${1}" > "${ROOTFS_DIR}/etc/rpi-issue" + echo -e "Raspberry Pi reference ${IMG_DATE}\nGenerated using ${PI_GEN}, ${PI_GEN_REPO}, ${GIT_HASH}, ${1}" > "${ROOTFS_DIR}/etc/rpi-issue" } export -f update_issue - diff --git a/scripts/dependencies_check b/scripts/dependencies_check index 1b92a9cfa9..375512b751 100644 --- a/scripts/dependencies_check +++ b/scripts/dependencies_check @@ -27,4 +27,12 @@ dependencies_check() echo "$missing" false fi + + + if ! grep -q "/proc/sys/fs/binfmt_misc" /proc/mounts; then + echo "Module binfmt_misc not loaded in host" + echo "Please run:" + echo " sudo modprobe binfmt_misc" + exit 1 + fi } diff --git a/stage0/00-configure-apt/files/raspi.list b/stage0/00-configure-apt/files/raspi.list index 656ab48132..122287e1d5 100644 --- a/stage0/00-configure-apt/files/raspi.list +++ b/stage0/00-configure-apt/files/raspi.list @@ -1,3 +1,3 @@ -deb http://archive.raspberrypi.org/debian/ stretch main ui staging +deb http://archive.raspberrypi.org/debian/ buster main # Uncomment line below then 'apt-get update' to enable 'apt-get source' -#deb-src http://archive.raspberrypi.org/debian/ stretch main ui +#deb-src http://archive.raspberrypi.org/debian/ buster main diff --git a/stage0/00-configure-apt/files/sources.list b/stage0/00-configure-apt/files/sources.list index 45e5210f63..61820ac04e 100644 --- a/stage0/00-configure-apt/files/sources.list +++ b/stage0/00-configure-apt/files/sources.list @@ -1,3 +1,3 @@ -deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi +deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi # Uncomment line below then 'apt-get update' to enable 'apt-get source' -#deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi +#deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi diff --git a/stage0/01-locale/00-debconf b/stage0/01-locale/00-debconf index 8251ea304d..b0ad3e4afb 100644 --- a/stage0/01-locale/00-debconf +++ b/stage0/01-locale/00-debconf @@ -1,6 +1,6 @@ # Locales to be generated: # Choices: All locales, aa_DJ ISO-8859-1, aa_DJ.UTF-8 UTF-8, aa_ER UTF-8, aa_ER@saaho UTF-8, aa_ET UTF-8, af_ZA ISO-8859-1, af_ZA.UTF-8 UTF-8, ak_GH UTF-8, am_ET UTF-8, an_ES ISO-8859-15, an_ES.UTF-8 UTF-8, anp_IN UTF-8, ar_AE ISO-8859-6, ar_AE.UTF-8 UTF-8, ar_BH ISO-8859-6, ar_BH.UTF-8 UTF-8, ar_DZ ISO-8859-6, ar_DZ.UTF-8 UTF-8, ar_EG ISO-8859-6, ar_EG.UTF-8 UTF-8, ar_IN UTF-8, ar_IQ ISO-8859-6, ar_IQ.UTF-8 UTF-8, ar_JO ISO-8859-6, ar_JO.UTF-8 UTF-8, ar_KW ISO-8859-6, ar_KW.UTF-8 UTF-8, ar_LB ISO-8859-6, ar_LB.UTF-8 UTF-8, ar_LY ISO-8859-6, ar_LY.UTF-8 UTF-8, ar_MA ISO-8859-6, ar_MA.UTF-8 UTF-8, ar_OM ISO-8859-6, ar_OM.UTF-8 UTF-8, ar_QA ISO-8859-6, ar_QA.UTF-8 UTF-8, ar_SA ISO-8859-6, ar_SA.UTF-8 UTF-8, ar_SD ISO-8859-6, ar_SD.UTF-8 UTF-8, ar_SS UTF-8, ar_SY ISO-8859-6, ar_SY.UTF-8 UTF-8, ar_TN ISO-8859-6, ar_TN.UTF-8 UTF-8, ar_YE ISO-8859-6, ar_YE.UTF-8 UTF-8, as_IN UTF-8, ast_ES ISO-8859-15, ast_ES.UTF-8 UTF-8, ayc_PE UTF-8, az_AZ UTF-8, be_BY CP1251, be_BY.UTF-8 UTF-8, be_BY@latin UTF-8, bem_ZM UTF-8, ber_DZ UTF-8, ber_MA UTF-8, bg_BG CP1251, bg_BG.UTF-8 UTF-8, bho_IN UTF-8, bn_BD UTF-8, bn_IN UTF-8, bo_CN UTF-8, bo_IN UTF-8, br_FR ISO-8859-1, br_FR.UTF-8 UTF-8, br_FR@euro ISO-8859-15, brx_IN UTF-8, bs_BA ISO-8859-2, bs_BA.UTF-8 UTF-8, byn_ER UTF-8, ca_AD ISO-8859-15, ca_AD.UTF-8 UTF-8, ca_ES ISO-8859-1, ca_ES.UTF-8 UTF-8, ca_ES.UTF-8@valencia UTF-8, ca_ES@euro ISO-8859-15, ca_ES@valencia ISO-8859-15, ca_FR ISO-8859-15, ca_FR.UTF-8 UTF-8, ca_IT ISO-8859-15, ca_IT.UTF-8 UTF-8, cmn_TW UTF-8, crh_UA UTF-8, cs_CZ ISO-8859-2, cs_CZ.UTF-8 UTF-8, csb_PL UTF-8, cv_RU UTF-8, cy_GB ISO-8859-14, cy_GB.UTF-8 UTF-8, da_DK ISO-8859-1, da_DK.UTF-8 UTF-8, de_AT ISO-8859-1, de_AT.UTF-8 UTF-8, de_AT@euro ISO-8859-15, de_BE ISO-8859-1, de_BE.UTF-8 UTF-8, de_BE@euro ISO-8859-15, de_CH ISO-8859-1, de_CH.UTF-8 UTF-8, de_DE ISO-8859-1, de_DE.UTF-8 UTF-8, de_DE@euro ISO-8859-15, de_LI.UTF-8 UTF-8, de_LU ISO-8859-1, de_LU.UTF-8 UTF-8, de_LU@euro ISO-8859-15, doi_IN UTF-8, dv_MV UTF-8, dz_BT UTF-8, el_CY ISO-8859-7, el_CY.UTF-8 UTF-8, el_GR ISO-8859-7, el_GR.UTF-8 UTF-8, en_AG UTF-8, en_AU ISO-8859-1, en_AU.UTF-8 UTF-8, en_BW ISO-8859-1, en_BW.UTF-8 UTF-8, en_CA ISO-8859-1, en_CA.UTF-8 UTF-8, en_DK ISO-8859-1, en_DK.ISO-8859-15 ISO-8859-15, en_DK.UTF-8 UTF-8, en_GB ISO-8859-1, en_GB.ISO-8859-15 ISO-8859-15, en_GB.UTF-8 UTF-8, en_HK ISO-8859-1, en_HK.UTF-8 UTF-8, en_IE ISO-8859-1, en_IE.UTF-8 UTF-8, en_IE@euro ISO-8859-15, en_IN UTF-8, en_NG UTF-8, en_NZ ISO-8859-1, en_NZ.UTF-8 UTF-8, en_PH ISO-8859-1, en_PH.UTF-8 UTF-8, en_SG ISO-8859-1, en_SG.UTF-8 UTF-8, en_US ISO-8859-1, en_US.ISO-8859-15 ISO-8859-15, en_US.UTF-8 UTF-8, en_ZA ISO-8859-1, en_ZA.UTF-8 UTF-8, en_ZM UTF-8, en_ZW ISO-8859-1, en_ZW.UTF-8 UTF-8, eo ISO-8859-3, eo.UTF-8 UTF-8, es_AR ISO-8859-1, es_AR.UTF-8 UTF-8, es_BO ISO-8859-1, es_BO.UTF-8 UTF-8, es_CL ISO-8859-1, es_CL.UTF-8 UTF-8, es_CO ISO-8859-1, es_CO.UTF-8 UTF-8, es_CR ISO-8859-1, es_CR.UTF-8 UTF-8, es_CU UTF-8, es_DO ISO-8859-1, es_DO.UTF-8 UTF-8, es_EC ISO-8859-1, es_EC.UTF-8 UTF-8, es_ES ISO-8859-1, es_ES.UTF-8 UTF-8, es_ES@euro ISO-8859-15, es_GT ISO-8859-1, es_GT.UTF-8 UTF-8, es_HN ISO-8859-1, es_HN.UTF-8 UTF-8, es_MX ISO-8859-1, es_MX.UTF-8 UTF-8, es_NI ISO-8859-1, es_NI.UTF-8 UTF-8, es_PA ISO-8859-1, es_PA.UTF-8 UTF-8, es_PE ISO-8859-1, es_PE.UTF-8 UTF-8, es_PR ISO-8859-1, es_PR.UTF-8 UTF-8, es_PY ISO-8859-1, es_PY.UTF-8 UTF-8, es_SV ISO-8859-1, es_SV.UTF-8 UTF-8, es_US ISO-8859-1, es_US.UTF-8 UTF-8, es_UY ISO-8859-1, es_UY.UTF-8 UTF-8, es_VE ISO-8859-1, es_VE.UTF-8 UTF-8, et_EE ISO-8859-1, et_EE.ISO-8859-15 ISO-8859-15, et_EE.UTF-8 UTF-8, eu_ES ISO-8859-1, eu_ES.UTF-8 UTF-8, eu_ES@euro ISO-8859-15, eu_FR ISO-8859-1, eu_FR.UTF-8 UTF-8, eu_FR@euro ISO-8859-15, fa_IR UTF-8, ff_SN UTF-8, fi_FI ISO-8859-1, fi_FI.UTF-8 UTF-8, fi_FI@euro ISO-8859-15, fil_PH UTF-8, fo_FO ISO-8859-1, fo_FO.UTF-8 UTF-8, fr_BE ISO-8859-1, fr_BE.UTF-8 UTF-8, fr_BE@euro ISO-8859-15, fr_CA ISO-8859-1, fr_CA.UTF-8 UTF-8, fr_CH ISO-8859-1, fr_CH.UTF-8 UTF-8, fr_FR ISO-8859-1, fr_FR.UTF-8 UTF-8, fr_FR@euro ISO-8859-15, fr_LU ISO-8859-1, fr_LU.UTF-8 UTF-8, fr_LU@euro ISO-8859-15, fur_IT UTF-8, fy_DE UTF-8, fy_NL UTF-8, ga_IE ISO-8859-1, ga_IE.UTF-8 UTF-8, ga_IE@euro ISO-8859-15, gd_GB ISO-8859-15, gd_GB.UTF-8 UTF-8, gez_ER UTF-8, gez_ER@abegede UTF-8, gez_ET UTF-8, gez_ET@abegede UTF-8, gl_ES ISO-8859-1, gl_ES.UTF-8 UTF-8, gl_ES@euro ISO-8859-15, gu_IN UTF-8, gv_GB ISO-8859-1, gv_GB.UTF-8 UTF-8, ha_NG UTF-8, hak_TW UTF-8, he_IL ISO-8859-8, he_IL.UTF-8 UTF-8, hi_IN UTF-8, hne_IN UTF-8, hr_HR ISO-8859-2, hr_HR.UTF-8 UTF-8, hsb_DE ISO-8859-2, hsb_DE.UTF-8 UTF-8, ht_HT UTF-8, hu_HU ISO-8859-2, hu_HU.UTF-8 UTF-8, hy_AM UTF-8, hy_AM.ARMSCII-8 ARMSCII-8, ia_FR UTF-8, id_ID ISO-8859-1, id_ID.UTF-8 UTF-8, ig_NG UTF-8, ik_CA UTF-8, is_IS ISO-8859-1, is_IS.UTF-8 UTF-8, it_CH ISO-8859-1, it_CH.UTF-8 UTF-8, it_IT ISO-8859-1, it_IT.UTF-8 UTF-8, it_IT@euro ISO-8859-15, iu_CA UTF-8, iw_IL ISO-8859-8, iw_IL.UTF-8 UTF-8, ja_JP.EUC-JP EUC-JP, ja_JP.UTF-8 UTF-8, ka_GE GEORGIAN-PS, ka_GE.UTF-8 UTF-8, kk_KZ PT154, kk_KZ RK1048, kk_KZ.UTF-8 UTF-8, kl_GL ISO-8859-1, kl_GL.UTF-8 UTF-8, km_KH UTF-8, kn_IN UTF-8, ko_KR.EUC-KR EUC-KR, ko_KR.UTF-8 UTF-8, kok_IN UTF-8, ks_IN UTF-8, ks_IN@devanagari UTF-8, ku_TR ISO-8859-9, ku_TR.UTF-8 UTF-8, kw_GB ISO-8859-1, kw_GB.UTF-8 UTF-8, ky_KG UTF-8, lb_LU UTF-8, lg_UG ISO-8859-10, lg_UG.UTF-8 UTF-8, li_BE UTF-8, li_NL UTF-8, lij_IT UTF-8, lo_LA UTF-8, lt_LT ISO-8859-13, lt_LT.UTF-8 UTF-8, lv_LV ISO-8859-13, lv_LV.UTF-8 UTF-8, lzh_TW UTF-8, mag_IN UTF-8, mai_IN UTF-8, mg_MG ISO-8859-15, mg_MG.UTF-8 UTF-8, mhr_RU UTF-8, mi_NZ ISO-8859-13, mi_NZ.UTF-8 UTF-8, mk_MK ISO-8859-5, mk_MK.UTF-8 UTF-8, ml_IN UTF-8, mn_MN UTF-8, mni_IN UTF-8, mr_IN UTF-8, ms_MY ISO-8859-1, ms_MY.UTF-8 UTF-8, mt_MT ISO-8859-3, mt_MT.UTF-8 UTF-8, my_MM UTF-8, nan_TW UTF-8, nan_TW@latin UTF-8, nb_NO ISO-8859-1, nb_NO.UTF-8 UTF-8, nds_DE UTF-8, nds_NL UTF-8, ne_NP UTF-8, nhn_MX UTF-8, niu_NU UTF-8, niu_NZ UTF-8, nl_AW UTF-8, nl_BE ISO-8859-1, nl_BE.UTF-8 UTF-8, nl_BE@euro ISO-8859-15, nl_NL ISO-8859-1, nl_NL.UTF-8 UTF-8, nl_NL@euro ISO-8859-15, nn_NO ISO-8859-1, nn_NO.UTF-8 UTF-8, nr_ZA UTF-8, nso_ZA UTF-8, oc_FR ISO-8859-1, oc_FR.UTF-8 UTF-8, om_ET UTF-8, om_KE ISO-8859-1, om_KE.UTF-8 UTF-8, or_IN UTF-8, os_RU UTF-8, pa_IN UTF-8, pa_PK UTF-8, pap_AN UTF-8, pap_AW UTF-8, pap_CW UTF-8, pl_PL ISO-8859-2, pl_PL.UTF-8 UTF-8, ps_AF UTF-8, pt_BR ISO-8859-1, pt_BR.UTF-8 UTF-8, pt_PT ISO-8859-1, pt_PT.UTF-8 UTF-8, pt_PT@euro ISO-8859-15, quz_PE UTF-8, ro_RO ISO-8859-2, ro_RO.UTF-8 UTF-8, ru_RU ISO-8859-5, ru_RU.CP1251 CP1251, ru_RU.KOI8-R KOI8-R, ru_RU.UTF-8 UTF-8, ru_UA KOI8-U, ru_UA.UTF-8 UTF-8, rw_RW UTF-8, sa_IN UTF-8, sat_IN UTF-8, sc_IT UTF-8, sd_IN UTF-8, sd_IN@devanagari UTF-8, se_NO UTF-8, shs_CA UTF-8, si_LK UTF-8, sid_ET UTF-8, sk_SK ISO-8859-2, sk_SK.UTF-8 UTF-8, sl_SI ISO-8859-2, sl_SI.UTF-8 UTF-8, so_DJ ISO-8859-1, so_DJ.UTF-8 UTF-8, so_ET UTF-8, so_KE ISO-8859-1, so_KE.UTF-8 UTF-8, so_SO ISO-8859-1, so_SO.UTF-8 UTF-8, sq_AL ISO-8859-1, sq_AL.UTF-8 UTF-8, sq_MK UTF-8, sr_ME UTF-8, sr_RS UTF-8, sr_RS@latin UTF-8, ss_ZA UTF-8, st_ZA ISO-8859-1, st_ZA.UTF-8 UTF-8, sv_FI ISO-8859-1, sv_FI.UTF-8 UTF-8, sv_FI@euro ISO-8859-15, sv_SE ISO-8859-1, sv_SE.ISO-8859-15 ISO-8859-15, sv_SE.UTF-8 UTF-8, sw_KE UTF-8, sw_TZ UTF-8, szl_PL UTF-8, ta_IN UTF-8, ta_LK UTF-8, te_IN UTF-8, tg_TJ KOI8-T, tg_TJ.UTF-8 UTF-8, th_TH TIS-620, th_TH.UTF-8 UTF-8, the_NP UTF-8, ti_ER UTF-8, ti_ET UTF-8, tig_ER UTF-8, tk_TM UTF-8, tl_PH ISO-8859-1, tl_PH.UTF-8 UTF-8, tn_ZA UTF-8, tr_CY ISO-8859-9, tr_CY.UTF-8 UTF-8, tr_TR ISO-8859-9, tr_TR.UTF-8 UTF-8, ts_ZA UTF-8, tt_RU UTF-8, tt_RU@iqtelif UTF-8, ug_CN UTF-8, uk_UA KOI8-U, uk_UA.UTF-8 UTF-8, unm_US UTF-8, ur_IN UTF-8, ur_PK UTF-8, uz_UZ ISO-8859-1, uz_UZ.UTF-8 UTF-8, uz_UZ@cyrillic UTF-8, ve_ZA UTF-8, vi_VN UTF-8, wa_BE ISO-8859-1, wa_BE.UTF-8 UTF-8, wa_BE@euro ISO-8859-15, wae_CH UTF-8, wal_ET UTF-8, wo_SN UTF-8, xh_ZA ISO-8859-1, xh_ZA.UTF-8 UTF-8, yi_US CP1255, yi_US.UTF-8 UTF-8, yo_NG UTF-8, yue_HK UTF-8, zh_CN GB2312, zh_CN.GB18030 GB18030, zh_CN.GBK GBK, zh_CN.UTF-8 UTF-8, zh_HK BIG5-HKSCS, zh_HK.UTF-8 UTF-8, zh_SG GB2312, zh_SG.GBK GBK, zh_SG.UTF-8 UTF-8, zh_TW BIG5, zh_TW.EUC-TW EUC-TW, zh_TW.UTF-8 UTF-8, zu_ZA ISO-8859-1, zu_ZA.UTF-8 UTF-8 -locales locales/locales_to_be_generated multiselect en_US.UTF-8 UTF-8 +locales locales/locales_to_be_generated multiselect ${LOCALE_DEFAULT} UTF-8 # Default locale for the system environment: # Choices: None, C.UTF-8, en_GB.UTF-8 -locales locales/default_environment_locale select en_US.UTF-8 +locales locales/default_environment_locale select ${LOCALE_DEFAULT} diff --git a/stage0/02-firmware/01-packages b/stage0/02-firmware/01-packages index 008e9b3090..b166aa8dff 100644 --- a/stage0/02-firmware/01-packages +++ b/stage0/02-firmware/01-packages @@ -1 +1,2 @@ raspberrypi-bootloader +raspberrypi-kernel diff --git a/stage0/prerun.sh b/stage0/prerun.sh index 7c09b02504..9ce3e0227f 100755 --- a/stage0/prerun.sh +++ b/stage0/prerun.sh @@ -1,5 +1,5 @@ #!/bin/bash -e if [ ! -d "${ROOTFS_DIR}" ]; then - bootstrap stretch "${ROOTFS_DIR}" http://raspbian.raspberrypi.org/raspbian/ + bootstrap buster "${ROOTFS_DIR}" http://raspbian.raspberrypi.org/raspbian/ fi diff --git a/stage1/00-boot-files/files/cmdline.txt b/stage1/00-boot-files/files/cmdline.txt index 2b0634bf04..b815bd89db 100644 --- a/stage1/00-boot-files/files/cmdline.txt +++ b/stage1/00-boot-files/files/cmdline.txt @@ -1 +1 @@ -dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait +console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait diff --git a/stage1/00-boot-files/files/config.txt b/stage1/00-boot-files/files/config.txt index 06364c54e4..548f4accc2 100644 --- a/stage1/00-boot-files/files/config.txt +++ b/stage1/00-boot-files/files/config.txt @@ -47,10 +47,19 @@ #dtparam=i2s=on #dtparam=spi=on -# Uncomment this to enable the lirc-rpi module -#dtoverlay=lirc-rpi +# Uncomment this to enable infrared communication. +#dtoverlay=gpio-ir,gpio_pin=17 +#dtoverlay=gpio-ir-tx,gpio_pin=18 # Additional overlays and parameters are documented /boot/overlays/README # Enable audio (loads snd_bcm2835) dtparam=audio=on + +[pi4] +# Enable DRM VC4 V3D driver on top of the dispmanx display stack +dtoverlay=vc4-fkms-v3d +max_framebuffers=2 + +[all] +#dtoverlay=vc4-fkms-v3d diff --git a/stage1/01-sys-tweaks/00-run.sh b/stage1/01-sys-tweaks/00-run.sh index 61ba51bbf1..9c380ec558 100755 --- a/stage1/01-sys-tweaks/00-run.sh +++ b/stage1/01-sys-tweaks/00-run.sh @@ -5,10 +5,10 @@ install -m 644 files/noclear.conf "${ROOTFS_DIR}/etc/systemd/system/getty@tty1.s install -v -m 644 files/fstab "${ROOTFS_DIR}/etc/fstab" on_chroot << EOF -if ! id -u pi >/dev/null 2>&1; then - adduser --disabled-password --gecos "" pi +if ! id -u ${FIRST_USER_NAME} >/dev/null 2>&1; then + adduser --disabled-password --gecos "" ${FIRST_USER_NAME} fi -echo "pi:raspberry" | chpasswd +echo "${FIRST_USER_NAME}:${FIRST_USER_PASS}" | chpasswd echo "root:root" | chpasswd EOF diff --git a/stage1/02-net-tweaks/00-packages b/stage1/02-net-tweaks/00-packages new file mode 100644 index 0000000000..3e09fe92ed --- /dev/null +++ b/stage1/02-net-tweaks/00-packages @@ -0,0 +1 @@ +netbase diff --git a/stage1/02-net-tweaks/00-patches/01-hosts.diff b/stage1/02-net-tweaks/00-patches/01-hosts.diff deleted file mode 100644 index ad07ae586a..0000000000 --- a/stage1/02-net-tweaks/00-patches/01-hosts.diff +++ /dev/null @@ -1,9 +0,0 @@ -Index: jessie-stage1/rootfs/etc/hosts -=================================================================== ---- jessie-stage1.orig/rootfs/etc/hosts -+++ jessie-stage1/rootfs/etc/hosts -@@ -3,3 +3,4 @@ - ff02::1 ip6-allnodes - ff02::2 ip6-allrouters - -+127.0.1.1 raspberrypi diff --git a/stage1/02-net-tweaks/00-patches/series b/stage1/02-net-tweaks/00-patches/series deleted file mode 100644 index 3dc19a258e..0000000000 --- a/stage1/02-net-tweaks/00-patches/series +++ /dev/null @@ -1 +0,0 @@ -01-hosts.diff diff --git a/stage1/02-net-tweaks/00-run.sh b/stage1/02-net-tweaks/00-run.sh index 96a1774e04..fc9e7638ee 100755 --- a/stage1/02-net-tweaks/00-run.sh +++ b/stage1/02-net-tweaks/00-run.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -install -m 644 files/ipv6.conf "${ROOTFS_DIR}/etc/modprobe.d/ipv6.conf" -install -m 644 files/hostname "${ROOTFS_DIR}/etc/hostname" +echo "${HOSTNAME}" > "${ROOTFS_DIR}/etc/hostname" +echo "127.0.1.1 ${HOSTNAME}" >> "${ROOTFS_DIR}/etc/hosts" ln -sf /dev/null "${ROOTFS_DIR}/etc/systemd/network/99-default.link" diff --git a/stage1/02-net-tweaks/files/hostname b/stage1/02-net-tweaks/files/hostname deleted file mode 100644 index 41757af4a7..0000000000 --- a/stage1/02-net-tweaks/files/hostname +++ /dev/null @@ -1 +0,0 @@ -raspberrypi diff --git a/stage1/02-net-tweaks/files/interfaces b/stage1/02-net-tweaks/files/interfaces deleted file mode 100644 index 88a8c6adf5..0000000000 --- a/stage1/02-net-tweaks/files/interfaces +++ /dev/null @@ -1,4 +0,0 @@ -auto lo - -iface lo inet loopback -iface eth0 inet dhcp diff --git a/stage1/02-net-tweaks/files/ipv6.conf b/stage1/02-net-tweaks/files/ipv6.conf deleted file mode 100644 index 1a1c1a63e4..0000000000 --- a/stage1/02-net-tweaks/files/ipv6.conf +++ /dev/null @@ -1,3 +0,0 @@ -# Don't load ipv6 by default -alias net-pf-10 off -#alias ipv6 off diff --git a/stage2/00-copies-and-fills/02-run.sh b/stage2/00-copies-and-fills/02-run.sh new file mode 100755 index 0000000000..366ac248b2 --- /dev/null +++ b/stage2/00-copies-and-fills/02-run.sh @@ -0,0 +1,6 @@ +#!/bin/bash -e + +if [ -f "${ROOTFS_DIR}/etc/ld.so.preload" ]; then + mv "${ROOTFS_DIR}/etc/ld.so.preload" "${ROOTFS_DIR}/etc/ld.so.preload.disabled" +fi + diff --git a/stage2/01-sys-tweaks/00-debconf b/stage2/01-sys-tweaks/00-debconf index 41e9435d63..c13e3b1949 100644 --- a/stage2/01-sys-tweaks/00-debconf +++ b/stage2/01-sys-tweaks/00-debconf @@ -7,12 +7,6 @@ console-setup console-setup/codeset47 select Guess optimal character set # Font for the console: # Choices: Fixed, Goha, GohaClassic, Terminus, TerminusBold, TerminusBoldVGA, VGA, Do not change the boot/kernel font, Let the system select a suitable font console-setup console-setup/fontface47 select Do not change the boot/kernel font -# Geographic area: -# Choices: Africa, America, Antarctica, Australia, Arctic Ocean, Asia, Atlantic Ocean, Europe, Indian Ocean, Pacific Ocean, System V timezones, US, None of the above -tzdata tzdata/Areas select Etc -# Time zone: -# Choices: GMT, GMT+0, GMT+1, GMT+10, GMT+11, GMT+12, GMT+2, GMT+3, GMT+4, GMT+5, GMT+6, GMT+7, GMT+8, GMT+9, GMT-0, GMT-1, GMT-10, GMT-11, GMT-12, GMT-13, GMT-14, GMT-2, GMT-3, GMT-4, GMT-5, GMT-6, GMT-7, GMT-8, GMT-9, GMT0, Greenwich, UCT, UTC, Universal, Zulu -tzdata tzdata/Zones/Etc select UTC # Key to function as AltGr: # Choices: The default for the keyboard layout, No AltGr key, Right Alt (AltGr), Right Control, Right Logo key, Menu key, Left Alt, Left Logo key, Keypad Enter key, Both Logo keys, Both Alt keys keyboard-configuration keyboard-configuration/altgr select The default for the keyboard layout @@ -21,7 +15,7 @@ keyboard-configuration keyboard-configuration/altgr select The default for the k keyboard-configuration keyboard-configuration/model select Generic 105-key (Intl) PC # Keymap to use: # Choices: American English, Albanian, Arabic, Asturian, Bangladesh, Belarusian, Bengali, Belgian, Bosnian, Brazilian, British English, Bulgarian, Bulgarian (phonetic layout), Burmese, Canadian French, Canadian Multilingual, Catalan, Chinese, Croatian, Czech, Danish, Dutch, Dvorak, Dzongkha, Esperanto, Estonian, Ethiopian, Finnish, French, Georgian, German, Greek, Gujarati, Gurmukhi, Hebrew, Hindi, Hungarian, Icelandic, Irish, Italian, Japanese, Kannada, Kazakh, Khmer, Kirghiz, Korean, Kurdish (F layout), Kurdish (Q layout), Lao, Latin American, Latvian, Lithuanian, Macedonian, Malayalam, Nepali, Northern Sami, Norwegian, Persian, Philippines, Polish, Portuguese, Punjabi, Romanian, Russian, Serbian (Cyrillic), Sindhi, Sinhala, Slovak, Slovenian, Spanish, Swedish, Swiss French, Swiss German, Tajik, Tamil, Telugu, Thai, Tibetan, Turkish (F layout), Turkish (Q layout), Ukrainian, Uyghur, Vietnamese -keyboard-configuration keyboard-configuration/xkb-keymap select gb +keyboard-configuration keyboard-configuration/xkb-keymap select ${KEYBOARD_KEYMAP} # Compose key: # Choices: No compose key, Right Alt (AltGr), Right Control, Right Logo key, Menu key, Left Logo key, Caps Lock keyboard-configuration keyboard-configuration/compose select No compose key @@ -29,4 +23,4 @@ keyboard-configuration keyboard-configuration/compose select No compose key keyboard-configuration keyboard-configuration/ctrl_alt_bksp boolean true # Keyboard layout: # Choices: English (UK), English (UK) - English (UK\, Colemak), English (UK) - English (UK\, Dvorak with UK punctuation), English (UK) - English (UK\, Dvorak), English (UK) - English (UK\, Macintosh international), English (UK) - English (UK\, Macintosh), English (UK) - English (UK\, extended WinKeys), English (UK) - English (UK\, international with dead keys), Other -keyboard-configuration keyboard-configuration/variant select English (UK) +keyboard-configuration keyboard-configuration/variant select ${KEYBOARD_LAYOUT} diff --git a/stage2/01-sys-tweaks/00-packages b/stage2/01-sys-tweaks/00-packages index f792f374f5..16b9350f36 100644 --- a/stage2/01-sys-tweaks/00-packages +++ b/stage2/01-sys-tweaks/00-packages @@ -14,7 +14,6 @@ raspberrypi-sys-mods pi-bluetooth apt-listchanges usb-modeswitch -apt-transport-https libpam-chksshpwd rpi-update libmtp-runtime @@ -22,3 +21,10 @@ rsync htop man-db policykit-1 +ssh-import-id +rng-tools +ethtool +vl805fw +ntfs-3g +pciutils +rpi-eeprom diff --git a/stage2/01-sys-tweaks/00-patches/06-rc_local.diff b/stage2/01-sys-tweaks/00-patches/06-rc_local.diff deleted file mode 100644 index 98b44b8b06..0000000000 --- a/stage2/01-sys-tweaks/00-patches/06-rc_local.diff +++ /dev/null @@ -1,15 +0,0 @@ -Index: jessie-stage2/rootfs/etc/rc.local -=================================================================== ---- jessie-stage2.orig/rootfs/etc/rc.local -+++ jessie-stage2/rootfs/etc/rc.local -@@ -11,4 +11,10 @@ - # - # By default this script does nothing. - -+# Print the IP address -+_IP=$(hostname -I) || true -+if [ "$_IP" ]; then -+ printf "My IP address is %s\n" "$_IP" -+fi -+ - exit 0 diff --git a/stage2/01-sys-tweaks/00-patches/07-resize-init.diff b/stage2/01-sys-tweaks/00-patches/07-resize-init.diff index 07016415e8..8c41357e8f 100644 --- a/stage2/01-sys-tweaks/00-patches/07-resize-init.diff +++ b/stage2/01-sys-tweaks/00-patches/07-resize-init.diff @@ -1,5 +1,5 @@ ---- a/rootfs/boot/cmdline.txt -+++ b/rootfs/boot/cmdline.txt +--- stage2.orig/rootfs/boot/cmdline.txt ++++ stage2/rootfs/boot/cmdline.txt @@ -1 +1 @@ --dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait -+dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet init=/usr/lib/raspi-config/init_resize.sh +-console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait ++console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet init=/usr/lib/raspi-config/init_resize.sh diff --git a/stage2/01-sys-tweaks/01-run.sh b/stage2/01-sys-tweaks/01-run.sh index 4e9c7d0d8c..8d28adccc1 100755 --- a/stage2/01-sys-tweaks/01-run.sh +++ b/stage2/01-sys-tweaks/01-run.sh @@ -15,7 +15,11 @@ on_chroot << EOF systemctl disable hwclock.sh systemctl disable nfs-common systemctl disable rpcbind -systemctl disable ssh +if [ "${ENABLE_SSH}" == "1" ]; then + systemctl enable ssh +else + systemctl disable ssh +fi systemctl enable regenerate_ssh_host_keys EOF @@ -32,12 +36,12 @@ systemctl enable resize2fs_once EOF fi -on_chroot << \EOF +on_chroot <> "${ROOTFS_DIR}/etc/wpa_supplicant/wpa_supplicant.conf" +fi + +if [ -v WPA_ESSID ] && [ -v WPA_PASSWORD ]; then +on_chroot <> "/etc/wpa_supplicant/wpa_supplicant.conf" +EOF +fi + +# Disable wifi on 5GHz models +mkdir -p "${ROOTFS_DIR}/var/lib/systemd/rfkill/" +echo 1 > "${ROOTFS_DIR}/var/lib/systemd/rfkill/platform-3f300000.mmc:wlan" +echo 1 > "${ROOTFS_DIR}/var/lib/systemd/rfkill/platform-fe300000.mmc:wlan" diff --git a/stage2/03-accept-mathematica-eula/00-debconf b/stage2/03-accept-mathematica-eula/00-debconf new file mode 100644 index 0000000000..d9743fe9a0 --- /dev/null +++ b/stage2/03-accept-mathematica-eula/00-debconf @@ -0,0 +1,2 @@ +# Do you accept the Wolfram - Raspberry Pi® Bundle License Agreement? +wolfram-engine shared/accepted-wolfram-eula boolean true diff --git a/stage2/03-set-timezone/02-run.sh b/stage2/03-set-timezone/02-run.sh new file mode 100755 index 0000000000..96b22c7f4e --- /dev/null +++ b/stage2/03-set-timezone/02-run.sh @@ -0,0 +1,8 @@ +#!/bin/bash -e + +echo "${TIMEZONE_DEFAULT}" > "${ROOTFS_DIR}/etc/timezone" +rm "${ROOTFS_DIR}/etc/localtime" + +on_chroot << EOF +dpkg-reconfigure -f noninteractive tzdata +EOF diff --git a/stage98/00-install-nodejs/00-run-chroot.sh b/stage2/04-install-nodejs/00-run-chroot.sh similarity index 100% rename from stage98/00-install-nodejs/00-run-chroot.sh rename to stage2/04-install-nodejs/00-run-chroot.sh diff --git a/stage98/00-install-nodejs/01-packages b/stage2/04-install-nodejs/01-packages similarity index 100% rename from stage98/00-install-nodejs/01-packages rename to stage2/04-install-nodejs/01-packages diff --git a/stage99/00-install-greengrass/00-packages b/stage2/05-install-greengrass/00-packages similarity index 100% rename from stage99/00-install-greengrass/00-packages rename to stage2/05-install-greengrass/00-packages diff --git a/stage99/00-install-greengrass/00-run-chroot.sh b/stage2/05-install-greengrass/00-run-chroot.sh similarity index 65% rename from stage99/00-install-greengrass/00-run-chroot.sh rename to stage2/05-install-greengrass/00-run-chroot.sh index 2b4805fced..c2c3fddbc4 100755 --- a/stage99/00-install-greengrass/00-run-chroot.sh +++ b/stage2/05-install-greengrass/00-run-chroot.sh @@ -8,8 +8,8 @@ cat </etc/init.d/S02greengrass #!/bin/sh mkdir -p /greengrass/certs mkdir -p /greengrass/config -cp /boot/certs/* /greengrass/certs/ -cp /boot/config/* /greengrass/config/ +cp /boot/greengrass/certs/* /greengrass/certs/ +cp /boot/greengrass/config/* /greengrass/config/ cd /greengrass/ggc/core ./greengrassd \$@ EOF @@ -17,11 +17,14 @@ chmod 755 /etc/init.d/S02greengrass cat </etc/systemd/system/greengrass.service [Unit] -Description=AWS Greengrass Service +Description=AWS Greengrass Daemon [Service] -Type=notify +Type=forking +PIDFile=/var/run/greengrassd.pid ExecStart=/etc/init.d/S02greengrass start +ExecReload=/etc/init.d/S02greengrass restart +ExecStop=/etc/init.d/S02greengrass stop Restart=on-failure [Install] diff --git a/stage99/00-install-greengrass/00-run.sh b/stage2/05-install-greengrass/00-run.sh similarity index 92% rename from stage99/00-install-greengrass/00-run.sh rename to stage2/05-install-greengrass/00-run.sh index 3949efcd33..b7e1522e10 100755 --- a/stage99/00-install-greengrass/00-run.sh +++ b/stage2/05-install-greengrass/00-run.sh @@ -10,6 +10,8 @@ tar Czxf ${ROOTFS_DIR} files/greengrass*.tar.gz # Users should place the extracted keys/config into the fat32 partition. rm -rf ${ROOTFS_DIR}/greengrass/certs \ ${ROOTFS_DIR}/greengrass/config +mkdir -p ${ROOTFS_DIR}/greengrass/certs +mkdir -p ${ROOTFS_DIR}/greengrass/config mkdir -p ${ROOTFS_DIR}/boot/greengrass/certs mkdir -p ${ROOTFS_DIR}/boot/greengrass/config diff --git a/stage2/05-install-greengrass/files/greengrass-linux-armv7l-1.9.4.tar.gz b/stage2/05-install-greengrass/files/greengrass-linux-armv7l-1.9.4.tar.gz new file mode 100644 index 0000000000..8bda123205 Binary files /dev/null and b/stage2/05-install-greengrass/files/greengrass-linux-armv7l-1.9.4.tar.gz differ diff --git a/stage2/05-install-greengrass/files/root.ca.pem b/stage2/05-install-greengrass/files/root.ca.pem new file mode 100644 index 0000000000..a6f3e92af5 --- /dev/null +++ b/stage2/05-install-greengrass/files/root.ca.pem @@ -0,0 +1,20 @@ +-----BEGIN CERTIFICATE----- +MIIDQTCCAimgAwIBAgITBmyfz5m/jAo54vB4ikPmljZbyjANBgkqhkiG9w0BAQsF +ADA5MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6 +b24gUm9vdCBDQSAxMB4XDTE1MDUyNjAwMDAwMFoXDTM4MDExNzAwMDAwMFowOTEL +MAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZMBcGA1UEAxMQQW1hem9uIFJv +b3QgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4gHHKeNXj +ca9HgFB0fW7Y14h29Jlo91ghYPl0hAEvrAIthtOgQ3pOsqTQNroBvo3bSMgHFzZM +9O6II8c+6zf1tRn4SWiw3te5djgdYZ6k/oI2peVKVuRF4fn9tBb6dNqcmzU5L/qw +IFAGbHrQgLKm+a/sRxmPUDgH3KKHOVj4utWp+UhnMJbulHheb4mjUcAwhmahRWa6 +VOujw5H5SNz/0egwLX0tdHA114gk957EWW67c4cX8jJGKLhD+rcdqsq08p8kDi1L +93FcXmn/6pUCyziKrlA4b9v7LWIbxcceVOF34GfID5yHI9Y/QCB/IIDEgEw+OyQm +jgSubJrIqg0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC +AYYwHQYDVR0OBBYEFIQYzIU07LwMlJQuCFmcx7IQTgoIMA0GCSqGSIb3DQEBCwUA +A4IBAQCY8jdaQZChGsV2USggNiMOruYou6r4lK5IpDB/G/wkjUu0yKGX9rbxenDI +U5PMCCjjmCXPI6T53iHTfIUJrU6adTrCC2qJeHZERxhlbI1Bjjt/msv0tadQ1wUs +N+gDS63pYaACbvXy8MWy7Vu33PqUXHeeE6V/Uq2V8viTO96LXFvKWlJbYK8U90vv +o/ufQJVtMVT8QtPHRh8jrdkPSHCa2XV4cdFyQzR1bldZwgJcJmApzyMZFo6IQ6XU +5MsI+yMRQ+hDKXJioaldXgjUkK642M4UwtBV8ob2xJNDd2ZhwLnoQdeXeGADbkpy +rqXRfboQnoZsG4q5WTP468SQvvG5 +-----END CERTIFICATE----- diff --git a/stage2/EXPORT_IMAGE b/stage2/EXPORT_IMAGE new file mode 100644 index 0000000000..aa8f936488 --- /dev/null +++ b/stage2/EXPORT_IMAGE @@ -0,0 +1,4 @@ +IMG_SUFFIX="-lite" +if [ "${USE_QEMU}" = "1" ]; then + export IMG_SUFFIX="${IMG_SUFFIX}-qemu" +fi diff --git a/stage2/EXPORT_NOOBS b/stage2/EXPORT_NOOBS new file mode 100644 index 0000000000..49891c6d25 --- /dev/null +++ b/stage2/EXPORT_NOOBS @@ -0,0 +1,2 @@ +NOOBS_NAME="Grassbian Lite" +NOOBS_DESCRIPTION="A port of Debian with AWS Greengrass Core and no desktop environment" diff --git a/stage3/00-install-packages/00-debconf b/stage3/00-install-packages/00-debconf new file mode 100644 index 0000000000..7dbd12eb28 --- /dev/null +++ b/stage3/00-install-packages/00-debconf @@ -0,0 +1,2 @@ +# Adobe Flash Player. Copyright 1996-2015. Adobe Systems Incorporated. All Rights Reserved. +rpi-chromium-mods rpi-chromium-mods/adobe note diff --git a/stage3/00-install-packages/00-packages b/stage3/00-install-packages/00-packages new file mode 100644 index 0000000000..eac74ea545 --- /dev/null +++ b/stage3/00-install-packages/00-packages @@ -0,0 +1,15 @@ +gstreamer1.0-x gstreamer1.0-omx gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-alsa gstreamer1.0-libav +qpdfview gtk2-engines alsa-utils +desktop-base +git +omxplayer +raspberrypi-artwork +policykit-1 +gvfs +rfkill +chromium-browser rpi-chromium-mods +gldriver-test +fonts-droid-fallback +fonts-liberation2 +obconf +arandr diff --git a/stage3/00-install-packages/00-packages-nr b/stage3/00-install-packages/00-packages-nr new file mode 100644 index 0000000000..ffc324bf4a --- /dev/null +++ b/stage3/00-install-packages/00-packages-nr @@ -0,0 +1,6 @@ +xserver-xorg-video-fbdev xserver-xorg xinit xserver-xorg-video-fbturbo +mousepad +lxde lxtask menu-xdg +zenity xdg-utils +gvfs-backends gvfs-fuse +lightdm gnome-themes-standard-data gnome-icon-theme diff --git a/stage3/00-install-packages/01-run.sh b/stage3/00-install-packages/01-run.sh new file mode 100755 index 0000000000..d76874722a --- /dev/null +++ b/stage3/00-install-packages/01-run.sh @@ -0,0 +1,8 @@ +#!/bin/bash -e + +on_chroot << EOF +update-alternatives --install /usr/bin/x-www-browser \ + x-www-browser /usr/bin/chromium-browser 86 +update-alternatives --install /usr/bin/gnome-www-browser \ + gnome-www-browser /usr/bin/chromium-browser 86 +EOF diff --git a/stage3/01-tweaks/00-run.sh b/stage3/01-tweaks/00-run.sh new file mode 100755 index 0000000000..5da7c1a197 --- /dev/null +++ b/stage3/01-tweaks/00-run.sh @@ -0,0 +1,3 @@ +#!/bin/bash -e + +rm -f "${ROOTFS_DIR}/etc/systemd/system/dhcpcd.service.d/wait.conf" diff --git a/stage3/SKIP b/stage3/SKIP new file mode 100644 index 0000000000..e69de29bb2 diff --git a/stage98/prerun.sh b/stage3/prerun.sh similarity index 100% rename from stage98/prerun.sh rename to stage3/prerun.sh diff --git a/stage4/00-install-packages/00-debconf b/stage4/00-install-packages/00-debconf new file mode 100644 index 0000000000..87932e2080 --- /dev/null +++ b/stage4/00-install-packages/00-debconf @@ -0,0 +1,2 @@ +# Enable realtime process priority? +jackd2 jackd/tweak_rt_limits boolean true diff --git a/stage4/00-install-packages/00-packages b/stage4/00-install-packages/00-packages new file mode 100644 index 0000000000..7dadd73061 --- /dev/null +++ b/stage4/00-install-packages/00-packages @@ -0,0 +1,26 @@ +python python3-pygame python-pygame python-tk +python3 python3-tk thonny +python3-pgzero +python-serial python3-serial +python-picamera python3-picamera +debian-reference-en dillo +raspberrypi-net-mods raspberrypi-ui-mods +python-pip python3-pip +python3-numpy +pypy +alacarte rc-gui sense-hat +tree +libgl1-mesa-dri libgles1 libgles2-mesa xcompmgr +geany +piclone +wiringpi pigpio python-pigpio python3-pigpio raspi-gpio python-gpiozero python3-gpiozero python3-rpi.gpio +python-spidev python3-spidev +python-twython python3-twython +python-smbus python3-smbus +python-flask python3-flask +python-picraft python3-picraft +pprompt +piwiz +rp-prefapps +ffmpeg +vlc diff --git a/stage4/00-install-packages/00-packages-nr b/stage4/00-install-packages/00-packages-nr new file mode 100644 index 0000000000..b904b8081f --- /dev/null +++ b/stage4/00-install-packages/00-packages-nr @@ -0,0 +1,2 @@ +pi-package +realvnc-vnc-server diff --git a/stage4/00-install-packages/01-packages b/stage4/00-install-packages/01-packages new file mode 100644 index 0000000000..fdf5e7346e --- /dev/null +++ b/stage4/00-install-packages/01-packages @@ -0,0 +1,22 @@ +python-automationhat python3-automationhat +python-blinkt python3-blinkt +python-cap1xxx python3-cap1xxx +python-drumhat python3-drumhat +python-envirophat python3-envirophat +python-explorerhat python3-explorerhat +python-fourletterphat python3-fourletterphat +python-microdotphat python3-microdotphat +python-mote python3-mote +python-motephat python3-motephat +python-phatbeat python3-phatbeat +python-pianohat python3-pianohat +python-piglow python3-piglow +python-rainbowhat python3-rainbowhat +python-scrollphat python3-scrollphat +python-scrollphathd python3-scrollphathd +python-sn3218 python3-sn3218 +python-skywriter python3-skywriter +python-touchphat python3-touchphat +python-buttonshim python3-buttonshim +python-unicornhathd python3-unicornhathd +python-pantilthat python3-pantilthat diff --git a/stage4/00-install-packages/02-packages b/stage4/00-install-packages/02-packages new file mode 100644 index 0000000000..fc43d17313 --- /dev/null +++ b/stage4/00-install-packages/02-packages @@ -0,0 +1,4 @@ +hunspell-en-gb +hyphen-en-gb +wamerican +wbritish diff --git a/stage4/01-console-autologin/00-run.sh b/stage4/01-console-autologin/00-run.sh new file mode 100755 index 0000000000..665dcdb7a1 --- /dev/null +++ b/stage4/01-console-autologin/00-run.sh @@ -0,0 +1,5 @@ +#!/bin/bash -e + +on_chroot << EOF + SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_boot_behaviour B4 +EOF diff --git a/stage4/02-extras/00-run.sh b/stage4/02-extras/00-run.sh new file mode 100755 index 0000000000..6a24f8254f --- /dev/null +++ b/stage4/02-extras/00-run.sh @@ -0,0 +1,7 @@ +#!/bin/bash -e + +#Alacarte fixes +install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.local" +install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.local/share" +install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.local/share/applications" +install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.local/share/desktop-directories" diff --git a/stage4/03-magpi/00-run.sh b/stage4/03-magpi/00-run.sh new file mode 100755 index 0000000000..cc5a820817 --- /dev/null +++ b/stage4/03-magpi/00-run.sh @@ -0,0 +1,15 @@ +#!/bin/sh -e + +magpi_regex="MagPi[[:digit:]]*.pdf" +magpi_loc="https://www.raspberrypi.org/magpi-issues" +magpi_latest="$(curl "$magpi_loc/?C=M;O=D" -s | grep "$magpi_regex" -m 1 -o | head -n 1)" + +if [ ! -f "files/$magpi_latest" ]; then + find files/ -regextype grep -regex "files/$magpi_regex" -delete + wget "$magpi_loc/$magpi_latest" -O "files/$magpi_latest" +fi + +file "files/$magpi_latest" | grep -q "PDF document" + +install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/MagPi" +install -v -o 1000 -g 1000 -m 644 "files/$magpi_latest" "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/MagPi/" diff --git a/stage4/03-magpi/files/.gitignore b/stage4/03-magpi/files/.gitignore new file mode 100644 index 0000000000..a136337994 --- /dev/null +++ b/stage4/03-magpi/files/.gitignore @@ -0,0 +1 @@ +*.pdf diff --git a/stage4/04-enable-xcompmgr/00-run.sh b/stage4/04-enable-xcompmgr/00-run.sh new file mode 100755 index 0000000000..ad6298df7b --- /dev/null +++ b/stage4/04-enable-xcompmgr/00-run.sh @@ -0,0 +1,5 @@ +#!/bin/bash -e + +on_chroot << EOF + raspi-config nonint do_xcompmgr 0 +EOF diff --git a/stage99/EXPORT_IMAGE b/stage4/EXPORT_IMAGE similarity index 100% rename from stage99/EXPORT_IMAGE rename to stage4/EXPORT_IMAGE diff --git a/stage4/EXPORT_NOOBS b/stage4/EXPORT_NOOBS new file mode 100644 index 0000000000..2ef6d7b486 --- /dev/null +++ b/stage4/EXPORT_NOOBS @@ -0,0 +1,2 @@ +NOOBS_NAME="Raspbian" +NOOBS_DESCRIPTION="A port of Debian with the Raspberry Pi Desktop" diff --git a/stage4/SKIP b/stage4/SKIP new file mode 100644 index 0000000000..e69de29bb2 diff --git a/stage4/SKIP_IMAGES b/stage4/SKIP_IMAGES new file mode 100644 index 0000000000..e69de29bb2 diff --git a/stage99/prerun.sh b/stage4/prerun.sh similarity index 100% rename from stage99/prerun.sh rename to stage4/prerun.sh diff --git a/stage5/00-install-extras/00-packages b/stage5/00-install-extras/00-packages new file mode 100644 index 0000000000..0deac8384d --- /dev/null +++ b/stage5/00-install-extras/00-packages @@ -0,0 +1,15 @@ +mu-editor +sonic-pi +scratch nuscratch scratch2 scratch3 +smartsim + +minecraft-pi python-minecraftpi +python-sense-emu sense-emu-tools python-sense-emu-doc + +wolfram-engine +claws-mail +greenfoot-unbundled bluej +nodered +realvnc-vnc-viewer + +python-games diff --git a/stage5/00-install-libreoffice/00-packages b/stage5/00-install-libreoffice/00-packages new file mode 100644 index 0000000000..148e7b941f --- /dev/null +++ b/stage5/00-install-libreoffice/00-packages @@ -0,0 +1,3 @@ +libreoffice-pi +libreoffice-help-en-gb +libreoffice-l10n-en-gb diff --git a/stage5/EXPORT_IMAGE b/stage5/EXPORT_IMAGE new file mode 100644 index 0000000000..a81a844fe4 --- /dev/null +++ b/stage5/EXPORT_IMAGE @@ -0,0 +1,4 @@ +IMG_SUFFIX="-full" +if [ "${USE_QEMU}" = "1" ]; then + export IMG_SUFFIX="${IMG_SUFFIX}-qemu" +fi diff --git a/stage5/EXPORT_NOOBS b/stage5/EXPORT_NOOBS new file mode 100644 index 0000000000..430f55ac34 --- /dev/null +++ b/stage5/EXPORT_NOOBS @@ -0,0 +1,2 @@ +NOOBS_NAME="Greengrass Full" +NOOBS_DESCRIPTION="A port of Debian with AWS Greengrass Core, desktop and recommended applications" diff --git a/stage5/SKIP b/stage5/SKIP new file mode 100644 index 0000000000..e69de29bb2 diff --git a/stage5/SKIP_IMAGES b/stage5/SKIP_IMAGES new file mode 100644 index 0000000000..e69de29bb2 diff --git a/stage5/prerun.sh b/stage5/prerun.sh new file mode 100755 index 0000000000..9acd13cbd3 --- /dev/null +++ b/stage5/prerun.sh @@ -0,0 +1,5 @@ +#!/bin/bash -e + +if [ ! -d "${ROOTFS_DIR}" ]; then + copy_previous +fi diff --git a/stage99/00-install-greengrass/files/greengrass-linux-armv7l-1.5.0.tar.gz b/stage99/00-install-greengrass/files/greengrass-linux-armv7l-1.5.0.tar.gz deleted file mode 100644 index 61ed9ed670..0000000000 Binary files a/stage99/00-install-greengrass/files/greengrass-linux-armv7l-1.5.0.tar.gz and /dev/null differ diff --git a/stage99/00-install-greengrass/files/root.ca.pem b/stage99/00-install-greengrass/files/root.ca.pem deleted file mode 100644 index a9490be3a0..0000000000 --- a/stage99/00-install-greengrass/files/root.ca.pem +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCB -yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL -ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJp -U2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxW -ZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0 -aG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCByjEL -MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZW -ZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2ln -biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJp -U2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9y -aXR5IC0gRzUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvJAgIKXo1 -nmAMqudLO07cfLw8RRy7K+D+KQL5VwijZIUVJ/XxrcgxiV0i6CqqpkKzj/i5Vbex -t0uz/o9+B1fs70PbZmIVYc9gDaTY3vjgw2IIPVQT60nKWVSFJuUrjxuf6/WhkcIz -SdhDY2pSS9KP6HBRTdGJaXvHcPaz3BJ023tdS1bTlr8Vd6Gw9KIl8q8ckmcY5fQG -BO+QueQA5N06tRn/Arr0PO7gi+s3i+z016zy9vA9r911kTMZHRxAy3QkGSGT2RT+ -rCpSx4/VBEnkjWNHiDxpg8v+R70rfk/Fla4OndTRQ8Bnc+MUCH7lP59zuDMKz10/ -NIeWiu5T6CUVAgMBAAGjgbIwga8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8E -BAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEwHzAH -BgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVy -aXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFH/TZafC3ey78DAJ80M5+gKv -MzEzMA0GCSqGSIb3DQEBBQUAA4IBAQCTJEowX2LP2BqYLz3q3JktvXf2pXkiOOzE -p6B4Eq1iDkVwZMXnl2YtmAl+X6/WzChl8gGqCBpH3vn5fJJaCGkgDdk+bW48DW7Y -5gaRQBi5+MHt39tBquCWIMnNZBU4gcmU7qKEKQsTb47bDN0lAtukixlE0kF6BWlK -WE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiCKm0oHw0LxOXnGiYZ -4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vEZV8N -hnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq ------END CERTIFICATE----- \ No newline at end of file diff --git a/stage99/EXPORT_NOOBS b/stage99/EXPORT_NOOBS deleted file mode 100644 index 03b9fd690c..0000000000 --- a/stage99/EXPORT_NOOBS +++ /dev/null @@ -1,2 +0,0 @@ -NOOBS_NAME="Grassbian" -NOOBS_DESCRIPTION="A port of Debian Stretch for the Raspberry Pi (AWS Lambda Greengrass Core)"