Compare commits
151 Commits
master
...
05a772481a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
05a772481a | ||
|
|
9f8fc6ff6e | ||
|
|
5dabc7dc94 | ||
|
|
49e1078c1b | ||
|
|
b9e30f2e0e | ||
|
|
47958f5efe | ||
|
|
1e780d18c2 | ||
|
|
744c7151fb | ||
|
|
8946f77e4a | ||
|
|
18acfd7f87 | ||
|
|
891df1e21e | ||
|
|
919f1e86b9 | ||
|
|
e335a4e8b6 | ||
|
|
da8f0063ea | ||
|
|
ccc23c6738 | ||
|
|
150246acda | ||
|
|
19fd60cef7 | ||
|
|
6453828cce | ||
|
|
9aa52c467b | ||
|
|
b040e0a64e | ||
|
|
17c8e48534 | ||
|
|
7c7d74f210 | ||
|
|
ecda2579eb | ||
|
|
94f7acf599 | ||
|
|
4cfc6758ff | ||
|
|
fd5a1e93cd | ||
|
|
c94d23e165 | ||
|
|
cdc1467e13 | ||
|
|
def6e65ffb | ||
|
|
36048218e0 | ||
|
|
98f522e64d | ||
|
|
0668700902 | ||
|
|
291f869713 | ||
|
|
48efb5fc54 | ||
|
|
a63eb86d7b | ||
|
|
0755b07f06 | ||
|
|
97aa847ea8 | ||
|
|
72b2dfd634 | ||
|
|
2327c5e28d | ||
|
|
64e205739c | ||
|
|
2c29fc27c5 | ||
|
|
7dd5b7dd59 | ||
|
|
8056aa3bec | ||
|
|
56916d4d84 | ||
|
|
f19ee211dd | ||
|
|
8273e8553b | ||
|
|
dd93d6280f | ||
|
|
3358eb36e1 | ||
|
|
9a13a81115 | ||
|
|
ff2fd5007f | ||
|
|
6fb311e7fb | ||
|
|
b4f2aeabde | ||
|
|
57149546cf | ||
|
|
a34bf65c4c | ||
|
|
62eeab3a86 | ||
|
|
94bb86632d | ||
|
|
70cd6f2a1e | ||
|
|
0fda3224f6 | ||
|
|
caf3d8681b | ||
|
|
1460069163 | ||
|
|
78444eaf07 | ||
|
|
962bf483c8 | ||
|
|
5f2fe0f854 | ||
|
|
5ef8b0d45c | ||
|
|
325123ff22 | ||
|
|
c318daf364 | ||
|
|
77706bd2f6 | ||
|
|
e484aa8581 | ||
|
|
a86d732f58 | ||
|
|
7c750947a9 | ||
|
|
c16e6b7dee | ||
|
|
0defafedd4 | ||
|
|
84746b2bcd | ||
|
|
3e8046da4c | ||
|
|
a2afdf78cb | ||
|
|
60c9ba3199 | ||
|
|
25e2319eff | ||
|
|
04d0dcb46c | ||
|
|
b48040b3f0 | ||
|
|
366bc2c8f3 | ||
|
|
bd2cf0e0e4 | ||
|
|
da6dde2aea | ||
|
|
2bc1f64a57 | ||
|
|
3dff0ce787 | ||
|
|
005a8c73b0 | ||
|
|
b37b47e559 | ||
|
|
3f78c2b444 | ||
|
|
bd85d61c05 | ||
|
|
827affcc11 | ||
|
|
4e9aaac41e | ||
|
|
fb582e2e67 | ||
|
|
ca06d62f2e | ||
|
|
18aee5cfb8 | ||
|
|
27a8050c3c | ||
|
|
151f3ff80f | ||
|
|
e5bd8d5433 | ||
|
|
10a538ff92 | ||
|
|
7073d28f22 | ||
|
|
d1b8a2005b | ||
|
|
a0ba64e5c8 | ||
|
|
733513aa25 | ||
|
|
255288909b | ||
|
|
4721bfe590 | ||
|
|
2b3ba5b2a6 | ||
|
|
fbe448ccdc | ||
|
|
61c6294e23 | ||
|
|
dec2743355 | ||
|
|
43c42bf9e4 | ||
|
|
69cc4146c8 | ||
|
|
ef933ae156 | ||
|
|
0f7ab62ac9 | ||
|
|
f81afa8282 | ||
|
|
45b4cc19d0 | ||
|
|
14a28a729e | ||
|
|
720f4aea86 | ||
|
|
c12b1df4ed | ||
|
|
c61f8b72fa | ||
|
|
edbc8b604d | ||
|
|
5ea223355a | ||
|
|
cd8a82d4fd | ||
|
|
cf938b0549 | ||
|
|
268d4c4f44 | ||
|
|
2e3603d228 | ||
|
|
5971767590 | ||
|
|
535ea6c7f0 | ||
|
|
600f7c1fa4 | ||
|
|
4b59b5a70d | ||
|
|
95ea0ba696 | ||
|
|
071d395635 | ||
|
|
7cfcace573 | ||
|
|
04f9b9bb5f | ||
|
|
2b9e8e9b22 | ||
|
|
4929d829f2 | ||
|
|
cfe65b2e64 | ||
|
|
88e48a8aca | ||
|
|
31aa04e99c | ||
|
|
571fe1e26b | ||
|
|
041b97464c | ||
|
|
fbdcaaf4f8 | ||
|
|
ec4562c7f2 | ||
|
|
8808124cc3 | ||
|
|
bc3970f9e3 | ||
|
|
d3553f5ec4 | ||
|
|
0cab554f7d | ||
|
|
75123fd64e | ||
|
|
0f41e41c8c | ||
|
|
a58e722bee | ||
|
|
c640efa6e1 | ||
|
|
d4049eeffb | ||
|
|
906c587fcd | ||
|
|
99399d30fc |
@@ -6,7 +6,7 @@ ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get -y update && \
|
||||
apt-get -y install --no-install-recommends \
|
||||
git vim parted \
|
||||
quilt coreutils qemu-user-static debootstrap zerofree zip dosfstools e2fsprogs\
|
||||
quilt coreutils qemu-user-static debootstrap zerofree zip dosfstools \
|
||||
libarchive-tools libcap2-bin rsync grep udev xz-utils curl xxd file kmod bc \
|
||||
binfmt-support ca-certificates fdisk gpg pigz arch-test \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
18
README.md
18
README.md
@@ -20,9 +20,9 @@ below.
|
||||
To install the required dependencies for `pi-gen` you should run:
|
||||
|
||||
```bash
|
||||
apt install coreutils quilt parted qemu-user-static debootstrap zerofree zip \
|
||||
dosfstools e2fsprogs libarchive-tools libcap2-bin grep rsync xz-utils file git curl bc \
|
||||
gpg pigz xxd arch-test bmap-tools kmod
|
||||
apt-get install coreutils quilt parted qemu-user-static debootstrap zerofree zip \
|
||||
dosfstools libarchive-tools libcap2-bin grep rsync xz-utils file git curl bc \
|
||||
gpg pigz xxd arch-test bmap-tools
|
||||
```
|
||||
|
||||
The file `depends` contains a list of tools needed. The format of this
|
||||
@@ -55,7 +55,7 @@ environment variables.
|
||||
|
||||
The following environment variables are supported:
|
||||
|
||||
* `IMG_NAME` (Default: `raspios-$RELEASE-$ARCH`, for example: `raspios-trixie-armhf`)
|
||||
* `IMG_NAME` (Default: `raspios-$RELEASE-$ARCH`, for example: `raspios-bookworm-armhf`)
|
||||
|
||||
The name of the image to build with the current stage directories. Use this
|
||||
variable to set the root name of your OS, eg `IMG_NAME=Frobulator`.
|
||||
@@ -66,7 +66,7 @@ The following environment variables are supported:
|
||||
The release name to use in `/etc/issue.txt`. The default should only be used
|
||||
for official Raspberry Pi builds.
|
||||
|
||||
* `RELEASE` (Default: `trixie`)
|
||||
* `RELEASE` (Default: `bookworm`)
|
||||
|
||||
The release version to build images against. Valid values are any supported
|
||||
Debian release. However, since different releases will have different sets of
|
||||
@@ -174,8 +174,6 @@ The following environment variables are supported:
|
||||
a name chosen by the final user. This security feature is designed to prevent shipping images
|
||||
with a default username and help prevent malicious actors from taking over your devices.
|
||||
|
||||
If the FIRST_USER_NAME is set to `pi` and no `FIRST_USER_PASS` is set, the setup wizard will be launched on first boot to allow the user to set the password.
|
||||
|
||||
* `FIRST_USER_PASS` (Default: unset)
|
||||
|
||||
Password for the first user. If unset, the account is locked.
|
||||
@@ -221,10 +219,6 @@ The following environment variables are supported:
|
||||
|
||||
If set, use this directory path as the location of scripts to run when generating images. An absolute or relative path can be given for a location outside the pi-gen directory.
|
||||
|
||||
* `ENABLE_CLOUD_INIT` (Default: `1`)
|
||||
|
||||
If set to `1`, cloud-init and netplan will be installed and configured. This will allow you to configure your Raspberry Pi using cloud-init configuration files. The cloud-init configuration files should be placed in the bootfs or by editing the files in `stage2/04-cloud-init/files`. Cloud-init will be configured to read them on first boot.
|
||||
|
||||
A simple example for building Raspberry Pi OS:
|
||||
|
||||
```bash
|
||||
@@ -456,7 +450,7 @@ To resolve this, ensure that the following files are available (install them if
|
||||
|
||||
```
|
||||
/lib/modules/$(uname -r)/kernel/fs/binfmt_misc.ko
|
||||
/usr/bin/qemu-arm-static
|
||||
/usr/bin/qemu-aarch64-static
|
||||
```
|
||||
|
||||
You may also need to load the module by hand - run `modprobe binfmt_misc`.
|
||||
|
||||
@@ -82,16 +82,7 @@ fi
|
||||
# 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@')"
|
||||
|
||||
# Check the arch of the machine we're running on. If it's 64-bit, use a 32-bit base image instead
|
||||
case "$(uname -m)" in
|
||||
x86_64|aarch64)
|
||||
BASE_IMAGE=i386/debian:trixie
|
||||
;;
|
||||
*)
|
||||
BASE_IMAGE=debian:trixie
|
||||
;;
|
||||
esac
|
||||
${DOCKER} build --build-arg BASE_IMAGE=${BASE_IMAGE} -t pi-gen "${DIR}"
|
||||
${DOCKER} build --build-arg BASE_IMAGE=debian:bookworm -t pi-gen "${DIR}"
|
||||
|
||||
if [ "${CONTAINER_EXISTS}" != "" ]; then
|
||||
DOCKER_CMDLINE_NAME="${CONTAINER_NAME}_cont"
|
||||
@@ -114,10 +105,10 @@ case $(uname -m) in
|
||||
;;
|
||||
esac
|
||||
|
||||
# Check if qemu-arm-static and /proc/sys/fs/binfmt_misc are present
|
||||
# Check if qemu-aarch64-static and /proc/sys/fs/binfmt_misc are present
|
||||
if [[ "${binfmt_misc_required}" == "1" ]]; then
|
||||
if ! qemu_arm=$(which qemu-arm-static) ; then
|
||||
echo "qemu-arm-static not found (please install qemu-user-static)"
|
||||
if ! qemu_arm=$(which qemu-aarch64-static) ; then
|
||||
echo "qemu-aarch64-static not found (please install qemu-user-static)"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -f /proc/sys/fs/binfmt_misc/register ]; then
|
||||
@@ -128,13 +119,13 @@ if [[ "${binfmt_misc_required}" == "1" ]]; then
|
||||
fi
|
||||
echo "binfmt_misc mounted"
|
||||
fi
|
||||
if ! grep -q "^interpreter ${qemu_arm}" /proc/sys/fs/binfmt_misc/qemu-arm* ; then
|
||||
# Register qemu-arm for binfmt_misc
|
||||
reg="echo ':qemu-arm-rpi:M::"\
|
||||
"\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:"\
|
||||
if ! grep -q "^interpreter ${qemu_arm}" /proc/sys/fs/binfmt_misc/qemu-aarch64* ; then
|
||||
# Register qemu-aarch64 for binfmt_misc
|
||||
reg="echo ':qemu-aarch64-rpi:M::"\
|
||||
"\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00:"\
|
||||
"\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:"\
|
||||
"${qemu_arm}:F' > /proc/sys/fs/binfmt_misc/register"
|
||||
echo "Registering qemu-arm for binfmt_misc..."
|
||||
echo "Registering qemu-aarch64 for binfmt_misc..."
|
||||
sudo bash -c "${reg}" 2>/dev/null || true
|
||||
fi
|
||||
fi
|
||||
@@ -151,7 +142,7 @@ time ${DOCKER} run \
|
||||
pi-gen \
|
||||
bash -e -o pipefail -c "
|
||||
dpkg-reconfigure qemu-user-static &&
|
||||
# binfmt_misc is sometimes not mounted with debian trixie image
|
||||
# binfmt_misc is sometimes not mounted with debian bookworm image
|
||||
(mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc || true) &&
|
||||
cd /pi-gen; ./build.sh ${BUILD_OPTS} &&
|
||||
rsync -av work/*/build.log deploy/
|
||||
|
||||
8
build.sh
8
build.sh
@@ -68,8 +68,6 @@ EOF
|
||||
log "Begin ${SUB_STAGE_DIR}/${i}-run.sh"
|
||||
./${i}-run.sh
|
||||
log "End ${SUB_STAGE_DIR}/${i}-run.sh"
|
||||
elif [ -f ${i}-run.sh ]; then
|
||||
log "Skip ${SUB_STAGE_DIR}/${i}-run.sh (not executable)"
|
||||
fi
|
||||
if [ -f ${i}-run-chroot.sh ]; then
|
||||
log "Begin ${SUB_STAGE_DIR}/${i}-run-chroot.sh"
|
||||
@@ -177,8 +175,8 @@ export PI_GEN=${PI_GEN:-pi-gen}
|
||||
export PI_GEN_REPO=${PI_GEN_REPO:-https://github.com/RPi-Distro/pi-gen}
|
||||
export PI_GEN_RELEASE=${PI_GEN_RELEASE:-Raspberry Pi reference}
|
||||
|
||||
export ARCH=armhf
|
||||
export RELEASE=${RELEASE:-trixie} # Don't forget to update stage0/prerun.sh
|
||||
export ARCH=arm64
|
||||
export RELEASE=${RELEASE:-bookworm} # Don't forget to update stage0/prerun.sh
|
||||
export IMG_NAME="${IMG_NAME:-raspios-$RELEASE-$ARCH}"
|
||||
|
||||
export USE_QEMU="${USE_QEMU:-0}"
|
||||
@@ -244,8 +242,6 @@ export QUILT_NO_DIFF_INDEX=1
|
||||
export QUILT_NO_DIFF_TIMESTAMPS=1
|
||||
export QUILT_REFRESH_ARGS="-p ab"
|
||||
|
||||
export ENABLE_CLOUD_INIT=${ENABLE_CLOUD_INIT:-1}
|
||||
|
||||
# shellcheck source=scripts/common
|
||||
source "${SCRIPT_DIR}/common"
|
||||
# shellcheck source=scripts/dependencies_check
|
||||
|
||||
1
depends
1
depends
@@ -6,7 +6,6 @@ debootstrap
|
||||
zerofree
|
||||
zip
|
||||
mkdosfs:dosfstools
|
||||
mke2fs:e2fsprogs
|
||||
capsh:libcap2-bin
|
||||
bsdtar:libarchive-tools
|
||||
grep
|
||||
|
||||
@@ -5,17 +5,14 @@ INFO_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.info"
|
||||
SBOM_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.sbom"
|
||||
BMAP_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.bmap"
|
||||
|
||||
on_chroot <<- EOF
|
||||
update-initramfs -k all -c
|
||||
if hash hardlink 2>/dev/null; then
|
||||
hardlink -t /usr/share/doc
|
||||
fi
|
||||
if [ -f /usr/lib/systemd/system/apt-listchanges.service ]; then
|
||||
python3 -m apt_listchanges.populate_database --profile apt
|
||||
systemctl disable apt-listchanges.timer
|
||||
fi
|
||||
install -m 755 -o systemd-timesync -g systemd-timesync -d /var/lib/systemd/timesync
|
||||
install -m 644 -o systemd-timesync -g systemd-timesync /dev/null /var/lib/systemd/timesync/clock
|
||||
on_chroot << EOF
|
||||
update-initramfs -k all -c
|
||||
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 [ -f "${ROOTFS_DIR}/etc/initramfs-tools/update-initramfs.conf" ]; then
|
||||
@@ -54,7 +51,7 @@ rm -f "${ROOTFS_DIR}"/usr/share/icons/*/icon-theme.cache
|
||||
|
||||
rm -f "${ROOTFS_DIR}/var/lib/dbus/machine-id"
|
||||
|
||||
echo "uninitialized" > "${ROOTFS_DIR}/etc/machine-id"
|
||||
true > "${ROOTFS_DIR}/etc/machine-id"
|
||||
|
||||
ln -nsf /proc/mounts "${ROOTFS_DIR}/etc/mtab"
|
||||
|
||||
|
||||
@@ -1,18 +1,15 @@
|
||||
{
|
||||
"description": "NOOBS_DESCRIPTION",
|
||||
"feature_level": 35120124,
|
||||
"kernel": "KERNEL",
|
||||
"name": "NOOBS_NAME",
|
||||
"password": "raspberry",
|
||||
"release_date": "UNRELEASED",
|
||||
"supported_hex_revisions": "2,3,4,5,6,7,8,9,d,e,f,10,11,12,14,19,1040,1041,0092,0093,2082",
|
||||
"supported_models": [
|
||||
"Pi Model",
|
||||
"Pi 2",
|
||||
"Pi Zero",
|
||||
"Pi Zero 2",
|
||||
"Pi 3",
|
||||
"Pi 4",
|
||||
"Pi Compute Module 3",
|
||||
"Pi 4"
|
||||
"Pi Compute Module 4"
|
||||
],
|
||||
"url": "http://www.raspbian.org/",
|
||||
"username": "pi",
|
||||
|
||||
@@ -1,39 +1,5 @@
|
||||
UNRELEASED:
|
||||
* Based on Debian Trixie release
|
||||
* New plugin-based Control Centre application
|
||||
* Plugins for same built from existing Raspberry Pi Configuration, Appearance
|
||||
Settings, Mouse and Keyboard Settings, Screen Configuration and Printer
|
||||
Settings applications; code and functionality identical
|
||||
* New icon theme, PiXtrix
|
||||
* New GTK themes, PiXtrix (standard) and PiXonyx (dark)
|
||||
* New desktop wallpapers
|
||||
* New system font, Nunito Sans Light
|
||||
* lxpanel replaced with forked lxpanel-pi; unsupported plugins removed
|
||||
* lxpanelctl replaced with lxpanelctl-pi command-line application
|
||||
* New System Monitor plugin added to taskbar for power and other warnings
|
||||
* New shared Clock plugin added for wf-panel-pi and lxpanel-pi taskbars
|
||||
* Main menu shortcuts to Raspberry Pi website removed and replaced with
|
||||
pre-loaded bookmarks in Chromium and Firefox
|
||||
* Main menu shortcut to Raspberry Pi Beginner's Guide added
|
||||
* Bookshelf application now displays contributor-only titles and includes
|
||||
option to contribute to unlock them
|
||||
* SenseHAT Emulator reinstated in Recommended Software
|
||||
* labwc updated to version 0.8.4
|
||||
* General keyboard control improvements in GTK applications
|
||||
* International translations of user guides installed by startup wizard as
|
||||
appropriate
|
||||
* raspberrypi-ui-mods package removed - replaced with structured metapackage,
|
||||
rpd-metas
|
||||
* Shutdown helper does not offer lock screen option when invoked by a user
|
||||
who has no password set
|
||||
* Chromium updated to version 140.0.7339.185
|
||||
* Firefox updated to version 142.0.1
|
||||
* Debian Reference no longer included
|
||||
* Alacarte menu editor no longer included
|
||||
* Remote GPIO option removed from Control Centre
|
||||
* Added rpi-keyboard-config and rpi-keyboard-fw-update
|
||||
* Raspberry Pi firmware 676efed1194de38975889a34276091da1f5aadd3
|
||||
* Linux kernel 6.12.47 - 359f37f0faefb712add32a39f98751aea67d5c1f
|
||||
*
|
||||
2025-05-13:
|
||||
* Setting touchscreen in Screen Configuration does not delete default associations for greeter
|
||||
* Bug fix - wizard keyboard setting correctly transferred into desktop
|
||||
|
||||
@@ -9,18 +9,16 @@ bootstrap(){
|
||||
|
||||
export http_proxy=${APT_PROXY}
|
||||
|
||||
BOOTSTRAP_ARGS+=(--arch armhf)
|
||||
BOOTSTRAP_ARGS+=(--arch arm64)
|
||||
BOOTSTRAP_ARGS+=(--include gnupg)
|
||||
BOOTSTRAP_ARGS+=(--components "main,contrib,non-free")
|
||||
BOOTSTRAP_ARGS+=(--keyring "${STAGE_DIR}/files/raspberrypi.gpg")
|
||||
#BOOTSTRAP_ARGS+=(--keyring "${STAGE_DIR}/files/raspberrypi.gpg")
|
||||
BOOTSTRAP_ARGS+=(--exclude=info,ifupdown)
|
||||
BOOTSTRAP_ARGS+=(--include=ca-certificates)
|
||||
BOOTSTRAP_ARGS+=("$@")
|
||||
printf -v BOOTSTRAP_STR '%q ' "${BOOTSTRAP_ARGS[@]}"
|
||||
|
||||
setarch linux32 capsh $CAPSH_ARG -- -c "'${BOOTSTRAP_CMD}' $BOOTSTRAP_STR" || true
|
||||
|
||||
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050719
|
||||
rm -f wget-log*
|
||||
capsh $CAPSH_ARG -- -c "'${BOOTSTRAP_CMD}' $BOOTSTRAP_STR" || true
|
||||
|
||||
if [ -d "$2/debootstrap" ] && ! rmdir "$2/debootstrap"; then
|
||||
cp "$2/debootstrap/debootstrap.log" "${STAGE_WORK_DIR}"
|
||||
@@ -103,7 +101,7 @@ on_chroot() {
|
||||
mount -t tmpfs tmpfs "${ROOTFS_DIR}/tmp"
|
||||
fi
|
||||
|
||||
setarch linux32 capsh $CAPSH_ARG "--chroot=${ROOTFS_DIR}/" -- -e "$@"
|
||||
capsh $CAPSH_ARG "--chroot=${ROOTFS_DIR}/" -- -e "$@"
|
||||
}
|
||||
export -f on_chroot
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
true > "${ROOTFS_DIR}/etc/apt/sources.list"
|
||||
install -m 644 files/raspbian.sources "${ROOTFS_DIR}/etc/apt/sources.list.d/"
|
||||
install -m 644 files/raspi.sources "${ROOTFS_DIR}/etc/apt/sources.list.d/"
|
||||
sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list.d/raspbian.sources"
|
||||
sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/sources.list.d/raspi.sources"
|
||||
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"
|
||||
@@ -20,7 +19,8 @@ else
|
||||
rm -f "${ROOTFS_DIR}/etc/apt/sources.list.d/00-temp.list"
|
||||
fi
|
||||
|
||||
install -m 644 files/raspberrypi-archive-keyring.pgp "${ROOTFS_DIR}/usr/share/keyrings/"
|
||||
cat files/raspberrypi.gpg.key | gpg --dearmor > "${STAGE_WORK_DIR}/raspberrypi-archive-stable.gpg"
|
||||
install -m 644 "${STAGE_WORK_DIR}/raspberrypi-archive-stable.gpg" "${ROOTFS_DIR}/etc/apt/trusted.gpg.d/"
|
||||
on_chroot <<- \EOF
|
||||
ARCH="$(dpkg --print-architecture)"
|
||||
if [ "$ARCH" = "armhf" ]; then
|
||||
|
||||
Binary file not shown.
30
stage0/00-configure-apt/files/raspberrypi.gpg.key
Normal file
30
stage0/00-configure-apt/files/raspberrypi.gpg.key
Normal file
@@ -0,0 +1,30 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: GnuPG v1.4.12 (GNU/Linux)
|
||||
|
||||
mQENBE/d7o8BCACrwqQacGJfn3tnMzGui6mv2lLxYbsOuy/+U4rqMmGEuo3h9m92
|
||||
30E2EtypsoWczkBretzLUCFv+VUOxaA6sV9+puTqYGhhQZFuKUWcG7orf7QbZRuu
|
||||
TxsEUepW5lg7MExmAu1JJzqM0kMQX8fVyWVDkjchZ/is4q3BPOUCJbUJOsE+kK/6
|
||||
8kW6nWdhwSAjfDh06bA5wvoXNjYoDdnSZyVdcYCPEJXEg5jfF/+nmiFKMZBraHwn
|
||||
eQsepr7rBXxNcEvDlSOPal11fg90KXpy7Umre1UcAZYJdQeWcHu7X5uoJx/MG5J8
|
||||
ic6CwYmDaShIFa92f8qmFcna05+lppk76fsnABEBAAG0IFJhc3BiZXJyeSBQaSBB
|
||||
cmNoaXZlIFNpZ25pbmcgS2V5iQE4BBMBAgAiBQJP3e6PAhsDBgsJCAcDAgYVCAIJ
|
||||
CgsEFgIDAQIeAQIXgAAKCRCCsSmSf6MwPk6vB/9pePB3IukU9WC9Bammh3mpQTvL
|
||||
OifbkzHkmAYxzjfK6D2I8pT0xMxy949+ThzJ7uL60p6T/32ED9DR3LHIMXZvKtuc
|
||||
mQnSiNDX03E2p7lIP/htoxW2hDP2n8cdlNdt0M9IjaWBppsbO7IrDppG2B1aRLni
|
||||
uD7v8bHRL2mKTtIDLX42Enl8aLAkJYgNWpZyPkDyOqamjijarIWjGEPCkaURF7g4
|
||||
d44HvYhpbLMOrz1m6N5Bzoa5+nq3lmifeiWKxioFXU+Hy5bhtAM6ljVb59hbD2ra
|
||||
X4+3LXC9oox2flmQnyqwoyfZqVgSQa0B41qEQo8t1bz6Q1Ti7fbMLThmbRHiuQEN
|
||||
BE/d7o8BCADNlVtBZU63fm79SjHh5AEKFs0C3kwa0mOhp9oas/haDggmhiXdzeD3
|
||||
49JWz9ZTx+vlTq0s+I+nIR1a+q+GL+hxYt4HhxoA6vlDMegVfvZKzqTX9Nr2VqQa
|
||||
S4Kz3W5ULv81tw3WowK6i0L7pqDmvDqgm73mMbbxfHD0SyTt8+fk7qX6Ag2pZ4a9
|
||||
ZdJGxvASkh0McGpbYJhk1WYD+eh4fqH3IaeJi6xtNoRdc5YXuzILnp+KaJyPE5CR
|
||||
qUY5JibOD3qR7zDjP0ueP93jLqmoKltCdN5+yYEExtSwz5lXniiYOJp8LWFCgv5h
|
||||
m8aYXkcJS1xVV9Ltno23YvX5edw9QY4hABEBAAGJAR8EGAECAAkFAk/d7o8CGwwA
|
||||
CgkQgrEpkn+jMD5Figf/dIC1qtDMTbu5IsI5uZPX63xydaExQNYf98cq5H2fWF6O
|
||||
yVR7ERzA2w33hI0yZQrqO6pU9SRnHRxCFvGv6y+mXXXMRcmjZG7GiD6tQWeN/3wb
|
||||
EbAn5cg6CJ/Lk/BI4iRRfBX07LbYULCohlGkwBOkRo10T+Ld4vCCnBftCh5x2OtZ
|
||||
TOWRULxP36y2PLGVNF+q9pho98qx+RIxvpofQM/842ZycjPJvzgVQsW4LT91KYAE
|
||||
4TVf6JjwUM6HZDoiNcX6d7zOhNfQihXTsniZZ6rky287htsWVDNkqOi5T3oTxWUo
|
||||
m++/7s3K3L0zWopdhMVcgg6Nt9gcjzqN1c0gy55L/g==
|
||||
=mNSj
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
@@ -1,6 +0,0 @@
|
||||
Types: deb
|
||||
URIs: http://raspbian.raspberrypi.com/raspbian/
|
||||
Architectures: armhf
|
||||
Suites: RELEASE
|
||||
Components: main contrib non-free rpi
|
||||
Signed-By: /usr/share/keyrings/raspbian-archive-keyring.gpg
|
||||
3
stage0/00-configure-apt/files/raspi.list
Normal file
3
stage0/00-configure-apt/files/raspi.list
Normal file
@@ -0,0 +1,3 @@
|
||||
deb http://archive.raspberrypi.com/debian/ RELEASE main
|
||||
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
|
||||
#deb-src http://archive.raspberrypi.com/debian/ RELEASE main
|
||||
@@ -1,5 +0,0 @@
|
||||
Types: deb
|
||||
URIs: http://archive.raspberrypi.com/debian/
|
||||
Suites: RELEASE
|
||||
Components: main
|
||||
Signed-By: /usr/share/keyrings/raspberrypi-archive-keyring.pgp
|
||||
7
stage0/00-configure-apt/files/sources.list
Normal file
7
stage0/00-configure-apt/files/sources.list
Normal file
@@ -0,0 +1,7 @@
|
||||
deb http://deb.debian.org/debian RELEASE main contrib non-free non-free-firmware
|
||||
deb http://deb.debian.org/debian-security/ RELEASE-security main contrib non-free non-free-firmware
|
||||
deb http://deb.debian.org/debian RELEASE-updates main contrib non-free non-free-firmware
|
||||
# Uncomment deb-src lines below then 'apt-get update' to enable 'apt-get source'
|
||||
#deb-src http://deb.debian.org/debian RELEASE main contrib non-free non-free-firmware
|
||||
#deb-src http://deb.debian.org/debian-security/ RELEASE-security main contrib non-free non-free-firmware
|
||||
#deb-src http://deb.debian.org/debian RELEASE-updates main contrib non-free non-free-firmware
|
||||
@@ -1,7 +1,6 @@
|
||||
initramfs-tools
|
||||
raspi-firmware
|
||||
linux-image-rpi-v6
|
||||
linux-image-rpi-v7
|
||||
linux-image-rpi-v8
|
||||
linux-headers-rpi-v6
|
||||
linux-headers-rpi-v7
|
||||
linux-image-rpi-2712
|
||||
linux-headers-rpi-v8
|
||||
linux-headers-rpi-2712
|
||||
|
||||
Binary file not shown.
@@ -1,10 +1,10 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
if [ "$RELEASE" != "trixie" ]; then
|
||||
if [ "$RELEASE" != "bookworm" ]; then
|
||||
echo "WARNING: RELEASE does not match the intended option for this branch."
|
||||
echo " Please check the relevant README.md section."
|
||||
fi
|
||||
|
||||
if [ ! -d "${ROOTFS_DIR}" ]; then
|
||||
bootstrap ${RELEASE} "${ROOTFS_DIR}" http://raspbian.raspberrypi.com/raspbian/
|
||||
bootstrap ${RELEASE} "${ROOTFS_DIR}" http://deb.debian.org/debian/
|
||||
fi
|
||||
|
||||
@@ -1 +1 @@
|
||||
console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 fsck.repair=yes rootwait resize
|
||||
console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 fsck.repair=yes rootwait
|
||||
|
||||
@@ -30,6 +30,9 @@ max_framebuffers=2
|
||||
# Use the kernel's default instead.
|
||||
disable_fw_kms_setup=1
|
||||
|
||||
# Run in 64-bit mode
|
||||
arm_64bit=1
|
||||
|
||||
# Disable compensation for displays with overscan
|
||||
disable_overscan=1
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- stage1.orig/rootfs/etc/skel/.bashrc
|
||||
+++ stage1/rootfs/etc/skel/.bashrc
|
||||
@@ -43,7 +43,7 @@ esac
|
||||
--- a/rootfs/etc/skel/.bashrc
|
||||
+++ b/rootfs/etc/skel/.bashrc
|
||||
@@ -43,7 +43,7 @@
|
||||
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||
# off by default to not distract the user: the focus in a terminal window
|
||||
# should be on the output of commands, not on the prompt
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
if [ -n "$force_color_prompt" ]; then
|
||||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||
@@ -57,7 +57,7 @@ if [ -n "$force_color_prompt" ]; then
|
||||
@@ -57,7 +57,7 @@
|
||||
fi
|
||||
|
||||
if [ "$color_prompt" = yes ]; then
|
||||
@@ -18,7 +18,7 @@
|
||||
else
|
||||
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||
fi
|
||||
@@ -79,9 +79,9 @@ if [ -x /usr/bin/dircolors ]; then
|
||||
@@ -79,9 +79,9 @@
|
||||
#alias dir='dir --color=auto'
|
||||
#alias vdir='vdir --color=auto'
|
||||
|
||||
|
||||
@@ -12,3 +12,5 @@ if [ -n "${FIRST_USER_PASS}" ]; then
|
||||
fi
|
||||
echo "root:root" | chpasswd
|
||||
EOF
|
||||
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
raspi-copies-and-fills
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/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
|
||||
|
||||
@@ -4,6 +4,9 @@ console-setup console-setup/charmap47 select UTF-8
|
||||
# Character set to support:
|
||||
# Choices: . Arabic, # Armenian, # Cyrillic - KOI8-R and KOI8-U, # Cyrillic - non-Slavic languages, # Cyrillic - Slavic languages (also Bosnian and Serbian Latin), . Ethiopic, # Georgian, # Greek, # Hebrew, # Lao, # Latin1 and Latin5 - western Europe and Turkic languages, # Latin2 - central Europe and Romanian, # Latin3 and Latin8 - Chichewa; Esperanto; Irish; Maltese and Welsh, # Latin7 - Lithuanian; Latvian; Maori and Marshallese, . Latin - Vietnamese, # Thai, . Combined - Latin; Slavic Cyrillic; Hebrew; basic Arabic, . Combined - Latin; Slavic Cyrillic; Greek, . Combined - Latin; Slavic and non-Slavic Cyrillic, Guess optimal character set
|
||||
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
|
||||
# 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
|
||||
|
||||
@@ -5,17 +5,18 @@ python-is-python3
|
||||
v4l-utils
|
||||
gpiod python3-libgpiod
|
||||
python3-gpiozero
|
||||
python3-rpi-lgpio
|
||||
pigpio python3-pigpio raspi-gpio python3-rpi-lgpio
|
||||
python3-spidev
|
||||
python3-smbus2
|
||||
avahi-daemon
|
||||
lua5.1
|
||||
luajit
|
||||
ca-certificates curl
|
||||
usbutils
|
||||
fake-hwclock nfs-common usbutils
|
||||
dosfstools
|
||||
rpi-swap rpi-loop-utils
|
||||
dphys-swapfile
|
||||
raspberrypi-sys-mods
|
||||
pi-bluetooth
|
||||
apt-listchanges
|
||||
usb-modeswitch
|
||||
libpam-chksshpwd
|
||||
@@ -24,6 +25,7 @@ libmtp-runtime
|
||||
rsync
|
||||
htop
|
||||
man-db
|
||||
policykit-1
|
||||
ssh-import-id
|
||||
ethtool
|
||||
ntfs-3g
|
||||
@@ -35,8 +37,3 @@ unzip zip p7zip-full
|
||||
file
|
||||
kms++-utils
|
||||
python3-venv
|
||||
bluez bluez-firmware
|
||||
rpi-keyboard-config
|
||||
rpi-keyboard-fw-update
|
||||
rpi-usb-gadget
|
||||
rpi-connect-lite
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
--- stage2.orig/rootfs/etc/default/useradd
|
||||
+++ stage2/rootfs/etc/default/useradd
|
||||
Index: jessie-stage2/rootfs/etc/default/useradd
|
||||
===================================================================
|
||||
--- jessie-stage2.orig/rootfs/etc/default/useradd
|
||||
+++ jessie-stage2/rootfs/etc/default/useradd
|
||||
@@ -5,7 +5,7 @@
|
||||
# Similar to DSHELL in adduser. However, we use "sh" here because
|
||||
# Similar to DHSELL in adduser. However, we use "sh" here because
|
||||
# useradd is a low level utility and should be as general
|
||||
# as possible
|
||||
-SHELL=/bin/sh
|
||||
|
||||
13
stage2/01-sys-tweaks/00-patches/02-swap.diff
Normal file
13
stage2/01-sys-tweaks/00-patches/02-swap.diff
Normal file
@@ -0,0 +1,13 @@
|
||||
Index: jessie-stage2/rootfs/etc/dphys-swapfile
|
||||
===================================================================
|
||||
--- jessie-stage2.orig/rootfs/etc/dphys-swapfile
|
||||
+++ jessie-stage2/rootfs/etc/dphys-swapfile
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
# set size to absolute value, leaving empty (default) then uses computed value
|
||||
# you most likely don't want this, unless you have an special disk situation
|
||||
-#CONF_SWAPSIZE=
|
||||
+CONF_SWAPSIZE=512
|
||||
|
||||
# set size to computed value, this times RAM size, dynamically adapts,
|
||||
# guarantees that there is enough swap without wasting disk space on excess
|
||||
@@ -1,6 +1,8 @@
|
||||
--- stage2.orig/rootfs/etc/inputrc
|
||||
+++ stage2/rootfs/etc/inputrc
|
||||
@@ -69,3 +69,7 @@ $endif
|
||||
Index: jessie-stage2/rootfs/etc/inputrc
|
||||
===================================================================
|
||||
--- jessie-stage2.orig/rootfs/etc/inputrc
|
||||
+++ jessie-stage2/rootfs/etc/inputrc
|
||||
@@ -65,3 +65,7 @@ $endif
|
||||
# "\e[F": end-of-line
|
||||
|
||||
$endif
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
--- stage2.orig/rootfs/etc/login.defs
|
||||
+++ stage2/rootfs/etc/login.defs
|
||||
@@ -60,7 +60,7 @@ HUSHLOGIN_FILE .hushlogin
|
||||
Index: jessie-stage2/rootfs/etc/login.defs
|
||||
===================================================================
|
||||
--- jessie-stage2.orig/rootfs/etc/login.defs
|
||||
+++ jessie-stage2/rootfs/etc/login.defs
|
||||
@@ -100,7 +100,7 @@ HUSHLOGIN_FILE .hushlogin
|
||||
#
|
||||
# (they are minimal, add the rest in the shell startup files)
|
||||
ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
@@ -8,11 +10,13 @@
|
||||
+ENV_PATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
|
||||
|
||||
#
|
||||
# Terminal permissions for terminals after login(1).
|
||||
--- stage2.orig/rootfs/etc/profile
|
||||
+++ stage2/rootfs/etc/profile
|
||||
# Terminal permissions
|
||||
Index: jessie-stage2/rootfs/etc/profile
|
||||
===================================================================
|
||||
--- jessie-stage2.orig/rootfs/etc/profile
|
||||
+++ jessie-stage2/rootfs/etc/profile
|
||||
@@ -4,7 +4,7 @@
|
||||
if [ "$(id -u)" -eq 0 ]; then
|
||||
if [ "`id -u`" -eq 0 ]; then
|
||||
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||
else
|
||||
- PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
|
||||
|
||||
5
stage2/01-sys-tweaks/00-patches/07-resize-init.diff
Normal file
5
stage2/01-sys-tweaks/00-patches/07-resize-init.diff
Normal file
@@ -0,0 +1,5 @@
|
||||
--- stage2.orig/rootfs/boot/firmware/cmdline.txt
|
||||
+++ stage2/rootfs/boot/firmware/cmdline.txt
|
||||
@@ -1 +1 @@
|
||||
-console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 fsck.repair=yes rootwait
|
||||
+console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 fsck.repair=yes rootwait quiet init=/usr/lib/raspberrypi-sys-mods/firstboot
|
||||
@@ -1,3 +1,5 @@
|
||||
01-useradd.diff
|
||||
02-swap.diff
|
||||
04-inputrc.diff
|
||||
05-path.diff
|
||||
07-resize-init.diff
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
install -m 755 files/resize2fs_once "${ROOTFS_DIR}/etc/init.d/"
|
||||
|
||||
install -m 644 files/50raspi "${ROOTFS_DIR}/etc/apt/apt.conf.d/"
|
||||
|
||||
install -m 644 files/console-setup "${ROOTFS_DIR}/etc/default/"
|
||||
|
||||
if [ -n "${PUBKEY_SSH_FIRST_USER}" ]; then
|
||||
install -v -m 0700 -o 1000 -g 1000 -d "${ROOTFS_DIR}"/home/"${FIRST_USER_NAME}"/.ssh
|
||||
echo "${PUBKEY_SSH_FIRST_USER}" >"${ROOTFS_DIR}"/home/"${FIRST_USER_NAME}"/.ssh/authorized_keys
|
||||
@@ -13,29 +19,37 @@ s/^#?[[:blank:]]*PasswordAuthentication[[:blank:]]*yes[[:blank:]]*$/PasswordAuth
|
||||
fi
|
||||
|
||||
on_chroot << EOF
|
||||
systemctl disable hwclock.sh
|
||||
systemctl disable nfs-common
|
||||
systemctl disable rpcbind
|
||||
if [ "${ENABLE_SSH}" == "1" ]; then
|
||||
systemctl enable ssh
|
||||
else
|
||||
systemctl disable ssh
|
||||
fi
|
||||
systemctl enable regenerate_ssh_host_keys
|
||||
EOF
|
||||
|
||||
if [ "${USE_QEMU}" = "1" ]; then
|
||||
echo "enter QEMU mode"
|
||||
install -m 644 files/90-qemu.rules "${ROOTFS_DIR}/etc/udev/rules.d/"
|
||||
on_chroot << EOF
|
||||
systemctl disable resize2fs_once
|
||||
EOF
|
||||
echo "leaving QEMU mode"
|
||||
else
|
||||
on_chroot << EOF
|
||||
systemctl enable resize2fs_once
|
||||
EOF
|
||||
fi
|
||||
|
||||
|
||||
on_chroot <<- EOF
|
||||
systemctl enable rpi-resize
|
||||
|
||||
for GRP in input spi i2c gpio; do
|
||||
groupadd -f -r "\$GRP"
|
||||
done
|
||||
for GRP in adm dialout cdrom audio users sudo video games plugdev input gpio spi i2c netdev render; do
|
||||
adduser $FIRST_USER_NAME \$GRP
|
||||
done
|
||||
on_chroot <<EOF
|
||||
for GRP in input spi i2c gpio; do
|
||||
groupadd -f -r "\$GRP"
|
||||
done
|
||||
for GRP in adm dialout cdrom audio users sudo video games plugdev input gpio spi i2c netdev render; do
|
||||
adduser $FIRST_USER_NAME \$GRP
|
||||
done
|
||||
EOF
|
||||
|
||||
if [ -f "${ROOTFS_DIR}/etc/sudoers.d/010_pi-nopasswd" ]; then
|
||||
@@ -52,12 +66,13 @@ EOF
|
||||
|
||||
rm -f "${ROOTFS_DIR}/etc/ssh/"ssh_host_*_key*
|
||||
|
||||
sed -i 's/^FONTFACE=.*/FONTFACE=""/;s/^FONTSIZE=.*/FONTSIZE=""/' "${ROOTFS_DIR}/etc/default/console-setup"
|
||||
sed -i "s/PLACEHOLDER//" "${ROOTFS_DIR}/etc/default/keyboard"
|
||||
on_chroot << EOF
|
||||
DEBIAN_FRONTEND=noninteractive dpkg-reconfigure keyboard-configuration console-setup
|
||||
DEBIAN_FRONTEND=noninteractive dpkg-reconfigure keyboard-configuration
|
||||
EOF
|
||||
|
||||
sed -i 's/^#\?Storage=.*/Storage=volatile/' "${ROOTFS_DIR}/etc/systemd/journald.conf"
|
||||
|
||||
if [ -e "${ROOTFS_DIR}/etc/avahi/avahi-daemon.conf" ]; then
|
||||
sed -i 's/^#\?publish-workstation=.*/publish-workstation=yes/' "${ROOTFS_DIR}/etc/avahi/avahi-daemon.conf"
|
||||
fi
|
||||
|
||||
5
stage2/01-sys-tweaks/files/50raspi
Normal file
5
stage2/01-sys-tweaks/files/50raspi
Normal file
@@ -0,0 +1,5 @@
|
||||
# never use pdiffs. Current implementation is very slow on low-powered devices
|
||||
Acquire::PDiffs "0";
|
||||
|
||||
# download up to 5 pdiffs:
|
||||
#Acquire::PDiffs::FileLimit "5";
|
||||
16
stage2/01-sys-tweaks/files/console-setup
Normal file
16
stage2/01-sys-tweaks/files/console-setup
Normal file
@@ -0,0 +1,16 @@
|
||||
# CONFIGURATION FILE FOR SETUPCON
|
||||
|
||||
# Consult the console-setup(5) manual page.
|
||||
|
||||
ACTIVE_CONSOLES="/dev/tty[1-6]"
|
||||
|
||||
CHARMAP="UTF-8"
|
||||
|
||||
CODESET="guess"
|
||||
FONTFACE=""
|
||||
FONTSIZE=""
|
||||
|
||||
VIDEOMODE=
|
||||
|
||||
# The following is an example how to use a braille font
|
||||
# FONT='lat9w-08.psf.gz brl-8x8.psf'
|
||||
25
stage2/01-sys-tweaks/files/resize2fs_once
Normal file
25
stage2/01-sys-tweaks/files/resize2fs_once
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: resize2fs_once
|
||||
# Required-Start:
|
||||
# Required-Stop:
|
||||
# Default-Start: 3
|
||||
# Default-Stop:
|
||||
# Short-Description: Resize the root filesystem to fill partition
|
||||
# Description:
|
||||
### END INIT INFO
|
||||
. /lib/lsb/init-functions
|
||||
case "$1" in
|
||||
start)
|
||||
log_daemon_msg "Starting resize2fs_once"
|
||||
ROOT_DEV=$(findmnt / -o source -n) &&
|
||||
resize2fs $ROOT_DEV &&
|
||||
update-rc.d resize2fs_once remove &&
|
||||
rm /etc/init.d/resize2fs_once &&
|
||||
log_end_msg $?
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 start" >&2
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
@@ -1,2 +0,0 @@
|
||||
cloud-init
|
||||
rpi-cloud-init-mods
|
||||
@@ -1,12 +0,0 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
if [ "${ENABLE_CLOUD_INIT}" != "1" ]; then
|
||||
log "Skipping cloud-init stage"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# some preseeding without any runtime effect if not modified
|
||||
# install meta-data file for NoCloud data-source to work
|
||||
install -v -m 755 files/meta-data "${ROOTFS_DIR}/boot/firmware/meta-data"
|
||||
install -v -m 755 files/user-data "${ROOTFS_DIR}/boot/firmware/user-data"
|
||||
install -v -m 755 files/network-config "${ROOTFS_DIR}/boot/firmware/network-config"
|
||||
@@ -1,10 +0,0 @@
|
||||
Cloud-Init support for Raspberry Pi OS
|
||||
|
||||
Reference for Raspberry Pi custom cloud-init config module: https://cloudinit.readthedocs.io/en/latest/reference/modules.html#raspberry-pi-configuration
|
||||
|
||||
- files/network-config is required because otherwise imager would fail to create the correct filesystem entry
|
||||
|
||||
- files/user-data same reason and to include some example configurations
|
||||
|
||||
- files/meta-data Cloud-init instance configuration
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
# This is the meta-data configuration file for cloud-init. Please refer to the
|
||||
# cloud-init documentation for more information:
|
||||
#
|
||||
# https://cloudinit.readthedocs.io/
|
||||
|
||||
# Set the datasource mode to "local". This ensures that user-data is acted upon
|
||||
# prior to bringing up the network (because everything about the datasource is
|
||||
# assumed to be local). If you wish to use an HTTP datasource instead, you can
|
||||
# change this to "net" or override it on the kernel cmdline (see README).
|
||||
dsmode: local
|
||||
|
||||
# Specifies the "unique" identifier of the instance. Typically in cloud-init
|
||||
# this is generated by the owning cloud and is actually unique (to some
|
||||
# degree). Here our data-source is local, so this is just a fixed string.
|
||||
# Warning: changing this will cause cloud-init to assume it is running on a
|
||||
# "new" instance, and to go through first time setup again (the value is
|
||||
# compared to a cached copy).
|
||||
instance_id: rpios-image
|
||||
@@ -1,50 +0,0 @@
|
||||
# This file contains a netplan-compatible configuration which cloud-init will
|
||||
# apply on first-boot (note: it will *not* update the config after the first
|
||||
# boot). Please refer to the cloud-init documentation and the netplan reference
|
||||
# for full details:
|
||||
#
|
||||
# https://netplan.io/reference
|
||||
# https://cloudinit.readthedocs.io/en/latest/topics/network-config.html
|
||||
# https://cloudinit.readthedocs.io/en/latest/topics/network-config-format-v2.html
|
||||
#
|
||||
# Please note that the YAML format employed by this file is sensitive to
|
||||
# differences in whitespace; if you are editing this file in an editor (like
|
||||
# Notepad) which uses literal tabs, take care to only use spaces for
|
||||
# indentation. See the following link for more details:
|
||||
#
|
||||
# https://en.wikipedia.org/wiki/YAML
|
||||
#
|
||||
# Additionally, please be aware that if your boot sequence depends on active
|
||||
# networking (e.g. if your cloud-init configuration pulls packages or SSH
|
||||
# keys from the network), you *must* mark at least one interface as required
|
||||
# ("optional: false") below. Otherwise, particularly on faster boards,
|
||||
# cloud-init will start attempting to use the network before it is ready
|
||||
|
||||
# Some additional examples are commented out below
|
||||
|
||||
#network:
|
||||
# version: 2
|
||||
#
|
||||
# ethernets:
|
||||
# eth0:
|
||||
# dhcp4: true
|
||||
# optional: true
|
||||
|
||||
# wifis:
|
||||
# wlan0:
|
||||
# dhcp4: true
|
||||
# optional: true
|
||||
# access-points:
|
||||
# myhomewifi:
|
||||
# password: "S3kr1t"
|
||||
# myworkwifi:
|
||||
# password: "correct battery horse staple"
|
||||
# workssid:
|
||||
# auth:
|
||||
# key-management: eap
|
||||
# method: peap
|
||||
# identity: "me@example.com"
|
||||
# password: "passw0rd"
|
||||
# ca-certificate: /etc/my_ca.pem
|
||||
|
||||
# regulatory-domain: GB
|
||||
@@ -1,102 +0,0 @@
|
||||
#cloud-config
|
||||
|
||||
# This is the user-data configuration file for cloud-init. By default this sets
|
||||
# up an initial user called "ubuntu" with password "ubuntu", which must be
|
||||
# changed at first login. However, many additional actions can be initiated on
|
||||
# first boot from this file. The cloud-init documentation has more details:
|
||||
#
|
||||
# https://cloudinit.readthedocs.io/
|
||||
#
|
||||
# Please note that the YAML format employed by this file is sensitive to
|
||||
# differences in whitespace; if you are editing this file in an editor (like
|
||||
# Notepad) which uses literal tabs, take care to only use spaces for
|
||||
# indentation. See the following link for more details:
|
||||
#
|
||||
# https://en.wikipedia.org/wiki/YAML
|
||||
#
|
||||
# Some additional examples are provided in comments below the default
|
||||
# configuration.
|
||||
|
||||
## Set the system's hostname. Please note that, unless you have a local DNS
|
||||
## setup where the hostname is derived from DHCP requests (as with dnsmasq),
|
||||
## setting the hostname here will not make the machine reachable by this name.
|
||||
## You may also wish to install avahi-daemon (see the "packages:" key below)
|
||||
## to make your machine reachable by the .local domain
|
||||
#hostname: raspberrypi
|
||||
|
||||
## Set up the keyboard layout. See localectl(1), in particular the various
|
||||
## list-x11-* sub-commands, to determine the available models, layouts,
|
||||
## variants, and options
|
||||
#keyboard:
|
||||
# model: pc105
|
||||
# layout: gb
|
||||
# variant:
|
||||
# options: ctrl:nocaps
|
||||
|
||||
# Controls password authentication with the SSH daemon; the default here can
|
||||
# prevent logging into SSH with a password. Changing this is a security risk
|
||||
# and you should at the very least ensure a different default password is
|
||||
# specified above
|
||||
#ssh_pwauth: false
|
||||
|
||||
## On first boot, use ssh-import-id to give the specific users SSH access to
|
||||
## the default user
|
||||
#ssh_import_id:
|
||||
#- lp:my_launchpad_username
|
||||
#- gh:my_github_username
|
||||
|
||||
## Add users and groups to the system, and import keys with the ssh-import-id
|
||||
## utility
|
||||
#groups:
|
||||
#- robot: [robot]
|
||||
#- robotics: [robot]
|
||||
#- pi
|
||||
#
|
||||
#users:
|
||||
#- default
|
||||
#- name: robot
|
||||
# gecos: Mr. Robot
|
||||
# primary_group: robot
|
||||
# groups: users
|
||||
# ssh_import_id: foobar
|
||||
# lock_passwd: false
|
||||
# passwd: $5$hkui88$nvZgIle31cNpryjRfO9uArF7DYiBcWEnjqq7L1AQNN3
|
||||
|
||||
## Update apt database and upgrade packages on first boot
|
||||
#package_update: true
|
||||
#package_upgrade: true
|
||||
|
||||
## Install additional packages on first boot
|
||||
#packages:
|
||||
#- avahi-daemon
|
||||
#- rng-tools
|
||||
#- python3-gpiozero
|
||||
#- [python3-serial, 3.5-1]
|
||||
|
||||
## Write arbitrary files to the file-system (including binaries!)
|
||||
#write_files:
|
||||
#- path: /etc/default/console-setup
|
||||
# content: |
|
||||
# # Consult the console-setup(5) manual page.
|
||||
# ACTIVE_CONSOLES="/dev/tty[1-6]"
|
||||
# CHARMAP="UTF-8"
|
||||
# VIDEOMODE=
|
||||
# FONT="Lat15-Terminus18x10.psf.gz"
|
||||
# FONTFACE=
|
||||
# FONTSIZE=
|
||||
# CODESET="Lat15"
|
||||
# permissions: '0644'
|
||||
# owner: root:root
|
||||
#- encoding: gzip
|
||||
# path: /root/Makefile
|
||||
# content: !!binary |
|
||||
# H4sICF2DTWIAA01ha2VmaWxlAFNWCM8syVBILMjPyU/PTC1WKMlXiPB2dlFQNjSx5MpNteLi
|
||||
# dLDiSoRQxYl5KeWZyRkgXrSCkoqKRmaKgm6pppKCbmqhgoFCrIKamkK1QmpyRr6Ckn92YqWS
|
||||
# NdC80uQMBZhOa4VahZoaqIrwjMQSewXfxOxUhcwShcr80qLi1Jw0RSUuAIYfEJmVAAAA
|
||||
# owner: root:root
|
||||
# permissions: '0644'
|
||||
|
||||
## Run arbitrary commands at rc.local like time
|
||||
#runcmd:
|
||||
#- [ ls, -l, / ]
|
||||
#- [ sh, -xc, "echo $(date) ': hello world!'" ]
|
||||
@@ -1,2 +1,20 @@
|
||||
rpd-preferences
|
||||
rpd-theme
|
||||
gstreamer1.0-x gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-alsa gstreamer1.0-libav
|
||||
evince gtk2-engines alsa-utils
|
||||
desktop-base
|
||||
git
|
||||
policykit-1
|
||||
gvfs
|
||||
rfkill
|
||||
chromium rpi-chromium-mods libwidevinecdm0
|
||||
firefox rpi-firefox-mods
|
||||
gldriver-test
|
||||
fonts-droid-fallback
|
||||
fonts-liberation2
|
||||
obconf
|
||||
raindrop
|
||||
libcamera-tools
|
||||
rpicam-apps
|
||||
python3-picamera2
|
||||
python3-pyqt5
|
||||
python3-opengl
|
||||
vulkan-tools mesa-vulkan-drivers
|
||||
|
||||
@@ -1,2 +1,8 @@
|
||||
rpd-wayland-core
|
||||
rpd-x-core
|
||||
xserver-xorg xinit
|
||||
mousepad
|
||||
eom
|
||||
lxde lxtask menu-xdg
|
||||
zenity xdg-utils
|
||||
gvfs-backends gvfs-fuse
|
||||
lightdm gnome-themes-extra-data gnome-icon-theme
|
||||
gnome-keyring
|
||||
|
||||
5
stage3/00-install-packages/01-run.sh
Executable file
5
stage3/00-install-packages/01-run.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
on_chroot <<- EOF
|
||||
apt-mark auto python3-pyqt5 python3-opengl
|
||||
EOF
|
||||
2
stage4/00-install-packages/00-debconf
Normal file
2
stage4/00-install-packages/00-debconf
Normal file
@@ -0,0 +1,2 @@
|
||||
# Enable realtime process priority?
|
||||
jackd2 jackd/tweak_rt_limits boolean true
|
||||
@@ -1,6 +1,27 @@
|
||||
rpd-applications
|
||||
rpd-developer
|
||||
rpd-graphics
|
||||
rpd-utilities
|
||||
rpd-wayland-extras
|
||||
rpd-x-extras
|
||||
python3-pygame
|
||||
python3-tk thonny
|
||||
python3-pgzero
|
||||
python3-serial
|
||||
debian-reference-en dillo
|
||||
raspberrypi-net-mods raspberrypi-ui-mods
|
||||
python3-pip
|
||||
python3-numpy
|
||||
rc-gui sense-hat
|
||||
tree
|
||||
libgl1-mesa-dri libgles1 libgles2-mesa xcompmgr
|
||||
geany
|
||||
piclone
|
||||
python3-twython
|
||||
python3-flask
|
||||
pprompt
|
||||
piwiz
|
||||
rp-prefapps
|
||||
ffmpeg
|
||||
vlc
|
||||
rpi-connect
|
||||
rpi-imager
|
||||
labwc
|
||||
squeekboard
|
||||
|
||||
# ninja-build and openocd needed for vscode pico extension
|
||||
meson openocd
|
||||
|
||||
2
stage4/00-install-packages/00-packages-nr
Normal file
2
stage4/00-install-packages/00-packages-nr
Normal file
@@ -0,0 +1,2 @@
|
||||
pi-package
|
||||
realvnc-vnc-server
|
||||
4
stage4/00-install-packages/02-packages
Normal file
4
stage4/00-install-packages/02-packages
Normal file
@@ -0,0 +1,4 @@
|
||||
hunspell-en-gb
|
||||
hyphen-en-gb
|
||||
wamerican
|
||||
wbritish
|
||||
5
stage4/01-console-autologin/00-run.sh
Executable file
5
stage4/01-console-autologin/00-run.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
on_chroot << EOF
|
||||
SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_boot_behaviour B4
|
||||
EOF
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
on_chroot <<- EOF
|
||||
SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_vnc 1
|
||||
EOF
|
||||
5
stage4/04-enable-xcompmgr/00-run.sh
Executable file
5
stage4/04-enable-xcompmgr/00-run.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
on_chroot << EOF
|
||||
raspi-config nonint do_xcompmgr 0
|
||||
EOF
|
||||
1
stage4/05-print-support/00-packages
Normal file
1
stage4/05-print-support/00-packages
Normal file
@@ -0,0 +1 @@
|
||||
cups
|
||||
5
stage4/06-enable-wayland/00-run.sh
Executable file
5
stage4/06-enable-wayland/00-run.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
on_chroot << EOF
|
||||
SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_wayland W3
|
||||
EOF
|
||||
@@ -1,5 +1,7 @@
|
||||
mu-editor
|
||||
scratch3
|
||||
scratch nuscratch scratch3
|
||||
wolfram-engine
|
||||
claws-mail
|
||||
realvnc-vnc-viewer
|
||||
code-the-classics code-the-classics-2
|
||||
kicad
|
||||
|
||||
Reference in New Issue
Block a user