Skip to content

Commit

Permalink
Merge branch 'upstream'
Browse files Browse the repository at this point in the history
* upstream:
  stage2: install raspinfo
  Add new changelog entry
  Update release notes
  Bookshelf PDF download
  Exposed RELEASE as a configurable variable (RPi-Distro#391)
  Dockerfile: use --no-install-recommends in apt-get install (RPi-Distro#383)
  BusyBox realpath does not support -s flag, fallback to use no flags (RPi-Distro#384)
  Retry apt downloads 3 times
  Update release notes
  Update release notes
  Update release notes
  Update release notes
  Update release notes
  Update release notes
  Update persistent rkfill files
  Update MagPi URL scheme
  stage5: install code-the-classics
  Update ROOT_MARGIN
  Rename HOSTNAME variable to TARGET_HOSTNAME
  • Loading branch information
oschrenk committed Jul 5, 2020
2 parents f0d91fd + 9a3a10b commit 2bb86e3
Show file tree
Hide file tree
Showing 20 changed files with 110 additions and 34 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ FROM debian:buster
ENV DEBIAN_FRONTEND noninteractive

RUN apt-get -y update && \
apt-get -y install \
apt-get -y install --no-install-recommends \
git vim parted \
quilt coreutils qemu-user-static debootstrap zerofree zip dosfstools \
bsdtar libcap2-bin rsync grep udev xz-utils curl xxd file kmod\
bsdtar libcap2-bin rsync grep udev xz-utils curl xxd file kmod bc\
binfmt-support ca-certificates \
&& rm -rf /var/lib/apt/lists/*

COPY . /pi-gen/
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ FIRST_USER_PASS="********"
Config written to ./config
Skipping stage3 to stage 5
```

## Usage
Expand Down
4 changes: 2 additions & 2 deletions build-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ done

# Ensure that the configuration file is an absolute path
if test -x /usr/bin/realpath; then
CONFIG_FILE=$(realpath -s "$CONFIG_FILE")
CONFIG_FILE=$(realpath -s "$CONFIG_FILE" || realpath "$CONFIG_FILE")
fi

# Ensure that the confguration file is present
Expand All @@ -41,7 +41,7 @@ if test -z "${CONFIG_FILE}"; then
exit 1
else
# shellcheck disable=SC1090
source "${CONFIG_FILE}"
source ${CONFIG_FILE}
fi

CONTAINER_NAME=${CONTAINER_NAME:-pigen_work}
Expand Down
7 changes: 4 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ EOF
PACKAGES="$(sed -f "${SCRIPT_DIR}/remove-comments.sed" < "${i}-packages-nr")"
if [ -n "$PACKAGES" ]; then
on_chroot << EOF
apt-get install --no-install-recommends -y $PACKAGES
apt-get -o APT::Acquire::Retries=3 install --no-install-recommends -y $PACKAGES
EOF
fi
log "End ${SUB_STAGE_DIR}/${i}-packages-nr"
Expand All @@ -30,7 +30,7 @@ EOF
PACKAGES="$(sed -f "${SCRIPT_DIR}/remove-comments.sed" < "${i}-packages")"
if [ -n "$PACKAGES" ]; then
on_chroot << EOF
apt-get install -y $PACKAGES
apt-get -o APT::Acquire::Retries=3 install -y $PACKAGES
EOF
fi
log "End ${SUB_STAGE_DIR}/${i}-packages"
Expand Down Expand Up @@ -162,10 +162,11 @@ 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 TARGET_HOSTNAME=${TARGET_HOSTNAME:-raspberrypi}

export FIRST_USER_NAME=${FIRST_USER_NAME:-pi}
export FIRST_USER_PASS=${FIRST_USER_PASS:-raspberry}
export RELEASE=${RELEASE:-buster}
export WPA_ESSID
export WPA_PASSWORD
export WPA_COUNTRY
Expand Down
1 change: 1 addition & 0 deletions depends
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ xxd
file
git
lsmod:kmod
bc
2 changes: 1 addition & 1 deletion export-image/prerun.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ALIGN="$((4 * 1024 * 1024))"
# 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))
ROOT_MARGIN="$(echo "($ROOT_SIZE * 0.2 + 200 * 1024 * 1024) / 1" | bc)"

BOOT_PART_START=$((ALIGN))
BOOT_PART_SIZE=$(((BOOT_SIZE + ALIGN - 1) / ALIGN * ALIGN))
Expand Down
1 change: 1 addition & 0 deletions export-noobs/00-release/00-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ sed "${NOOBS_DIR}/partitions.json" -i -e "s|ROOT_NOM|${ROOT_NOM}|"
sed "${NOOBS_DIR}/os.json" -i -e "s|UNRELEASED|${IMG_DATE}|"
sed "${NOOBS_DIR}/os.json" -i -e "s|NOOBS_NAME|${NOOBS_NAME}|"
sed "${NOOBS_DIR}/os.json" -i -e "s|NOOBS_DESCRIPTION|${NOOBS_DESCRIPTION}|"
sed "${NOOBS_DIR}/os.json" -i -e "s|RELEASE|${RELEASE}|"

sed "${NOOBS_DIR}/release_notes.txt" -i -e "s|UNRELEASED|${IMG_DATE}|"

Expand Down
2 changes: 1 addition & 1 deletion export-noobs/00-release/files/os.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
],
"url": "http://www.raspbian.org/",
"username": "pi",
"version": "buster"
"version": "RELEASE"
}
69 changes: 69 additions & 0 deletions export-noobs/00-release/files/release_notes.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,74 @@
UNRELEASED:
*
2020-05-27
* Added Bookshelf application
* Added Raspberry Pi Diagnostics application
* Added magnifier plugin to taskbar - needs magnifier application installed from Recommended Software to enable
* Added Magnifier application to Recommended Software
* Added marketing questionnaire as initial Chromium tab
* Version 0.25 of Scratch 2 included - uses external application to access IMU on SenseHAT
* Version 1.0.5 of Scratch 3 included - uses external application to access IMU on SenseHAT
* Version 32.0.0.371 of Flash player included
* Version 1.0.6 of Node-RED included
* Version 6.7.1 of VNC Server included
* Version 6.20.113 of VNC Client included
* Internal audio outputs enabled as separate ALSA devices
* MagPi preinstall removed and replaced with Beginner’s Guide
* MagPi weblink removed from main menu
* Chromium made default application for PDF files
* Common icon loading code for lxpanel plugins used
* Italian translations added
* Initial move of mouse pointer to menu button disabled
* Padding at left of menu button removed
* Focus behaviour changed so that focus moves to desktop if no windows are opened - improves reliability of Orca screen reader
* Bug fix - focus bug in volume plugin
* Bug fix - keyboard repeat interval bug in Mouse & Keyboard Settings
* Bug fix - battery detection bug in battery plugin
* Bug fix - spurious active areas on taskbar when plugins are hidden
* Bug fix - occasional crash in file manager on file selection
* Disk ID is now regenerated on first boot
* Updated udev rules
- Remove unused argon rule
- Add vcsm-cma to video group
- Add pwm to gpio group
* i2cprobe: More flexible I2C/SPI alias mapping
* Raspberry Pi firmware 21e1fe3477ffb708a5736ed61a924fd650031136
* Linux kernel 4.19.118
2020-02-13:
* Raspberry Pi Configuration - screen blanking setting disabled if Xscreensaver is installed
* Bug fix - switch to turn off VNC server in Raspberry Pi Configuration has no effect
* Bug fix - fix %20 characters in file names
* Linux kernel 4.19.97
* Raspberry Pi firmware 9a34efbf2fc6a27231607ce91a7cb6bf3bdbc0c5
- gencmd: Fix measure_clock name for CLOCK_OUTPUT_108
- mmal isp: Remote alignment requirements for RGB24 formats
- Add missing flags for VC_IMAGE_PROP_YUVUV_4K_CHROMA_ALIGN
- platform: Compromise on gpu overclock settings
2020-02-05:
* Version 3.2.6 of Thonny included - significant improvements in speed, particularly when debugging
* Version 1.0.4 of Scratch 3 included - adds new "display stage" and "display sprite" blocks to SenseHAT extension, and loading of files from command line
* Version 32.0.0.314 of Flash player included
* Version 1.0.3 of NodeRED included
* Version 6.6.0 of RealVNC Server and version 6.19.923 of RealVNC Viewer included - adds support for audio
* Version 78.0.3904.108 of Chromium included
* Mesa updated to 19.3.2 for OpenGL ES 3.1 conformance
* Pixel doubling option added in Raspberry Pi Configuration on platforms using FKMS display driver
* Orca screen reader added to Recommended Software
* Code The Classics Python games added to Recommended Software
* File manager - new "places" pane added at top of sidebar to show mounted drives in simplified view; "new folder" icon added to taskbar; expanders in directory browser now correctly show state of subfolders
* Multiple monitor support improved - alignment of icons on second desktop corrected, Appearance Settings opens on correct tab when launched from context menu
* Raspberry Pi Touchscreen correctly aligned with display
* System clock synchronised before installing new packages in startup wizard and Recommended Software
* Mixer dialogs added to taskbar volume plugin; separate Audio Preferences application removed
* Raspberry Pi Configuration - separate tab added for display options; screen blanking control added
* Volume taskbar plugin and raspi-config modified to support separate ALSA devices for internal audio outputs (analogue and HDMI 1 and 2)
* Robustness improvements in volume, ejecter and battery taskbar plugins
* Movement of mouse pointer to menu button on startup now controlled by point_at_menu parameter in Global section of lxpanel configuration file
* Ctrl-Alt-Del and Ctrl-Alt-End shortcuts added to open shutdown options box
* Ctrl-Shift-Esc shortcut added to open task manager
* Enabled NEON routines in OpenSSL
* Linux kernel 4.19.97
* Raspberry Pi firmware 149cd7f0487e08e148efe604f8d4d359541cecf4
2019-09-26:
* rpi-eeprom included
- This will automatically update the SPI EEPROM on the Raspberry Pi 4 to the latest stable version.
Expand Down
2 changes: 2 additions & 0 deletions stage0/00-configure-apt/00-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

install -m 644 files/sources.list "${ROOTFS_DIR}/etc/apt/"
install -m 644 files/raspi.list "${ROOTFS_DIR}/etc/apt/sources.list.d/"
sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list"
sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list.d/raspi.list"

if [ -n "$APT_PROXY" ]; then
install -m 644 files/51cache "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache"
Expand Down
4 changes: 2 additions & 2 deletions stage0/00-configure-apt/files/raspi.list
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
deb http://archive.raspberrypi.org/debian/ buster main
deb http://archive.raspberrypi.org/debian/ RELEASE main
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ buster main
#deb-src http://archive.raspberrypi.org/debian/ RELEASE main
4 changes: 2 additions & 2 deletions stage0/00-configure-apt/files/sources.list
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
deb http://raspbian.raspberrypi.org/raspbian/ RELEASE main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
#deb-src http://raspbian.raspberrypi.org/raspbian/ RELEASE main contrib non-free rpi
2 changes: 1 addition & 1 deletion stage0/prerun.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash -e

if [ ! -d "${ROOTFS_DIR}" ]; then
bootstrap buster "${ROOTFS_DIR}" http://raspbian.raspberrypi.org/raspbian/
bootstrap ${RELEASE} "${ROOTFS_DIR}" http://raspbian.raspberrypi.org/raspbian/
fi
4 changes: 2 additions & 2 deletions stage1/02-net-tweaks/00-run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -e

echo "${HOSTNAME}" > "${ROOTFS_DIR}/etc/hostname"
echo "127.0.1.1 ${HOSTNAME}" >> "${ROOTFS_DIR}/etc/hosts"
echo "${TARGET_HOSTNAME}" > "${ROOTFS_DIR}/etc/hostname"
echo "127.0.1.1 ${TARGET_HOSTNAME}" >> "${ROOTFS_DIR}/etc/hosts"

ln -sf /dev/null "${ROOTFS_DIR}/etc/systemd/network/99-default.link"
1 change: 1 addition & 0 deletions stage2/01-sys-tweaks/00-packages
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ vl805fw
ntfs-3g
pciutils
rpi-eeprom
raspinfo
4 changes: 2 additions & 2 deletions stage2/02-net-tweaks/01-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ 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"
echo 1 > "${ROOTFS_DIR}/var/lib/systemd/rfkill/platform-3f300000.mmcnr:wlan"
echo 1 > "${ROOTFS_DIR}/var/lib/systemd/rfkill/platform-fe300000.mmcnr:wlan"
15 changes: 15 additions & 0 deletions stage4/03-bookshelf/00-run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh -e

BOOKSHELF_URL="https://magpi.raspberrypi.org/bookshelf.xml"
GUIDE_URL="$(curl -s "$BOOKSHELF_URL" | awk -F '[<>]' "/<TITLE>Raspberry Pi Beginner's Guide v3<\/TITLE>/ {f=1; next} f==1 && /PDF/ {print \$3; exit}")"
OUTPUT="$(basename "$GUIDE_URL" | cut -f1 -d'?')"

if [ ! -f "files/$OUTPUT" ]; then
rm files/*.pdf -f
curl -s "$GUIDE_URL" -o "files/$OUTPUT"
fi

file "files/$OUTPUT" | grep -q "PDF document"

install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/Bookshelf"
install -v -o 1000 -g 1000 -m 644 "files/$OUTPUT" "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/Bookshelf/"
File renamed without changes.
15 changes: 0 additions & 15 deletions stage4/03-magpi/00-run.sh

This file was deleted.

1 change: 1 addition & 0 deletions stage5/00-install-extras/00-packages
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ nodered
realvnc-vnc-viewer

python-games
code-the-classics

0 comments on commit 2bb86e3

Please # to comment.