diff options
author | uvok cheetah | 2024-09-09 20:56:37 +0200 |
---|---|---|
committer | uvok cheetah | 2024-09-09 20:56:37 +0200 |
commit | 61efe5bfa3a1fa7fc85d82f5c6d5b7d5bb192012 (patch) | |
tree | 3af2f03619369d65944f8c04e2f8ff5388bc9717 /custom-scripts | |
parent | 3684f7d07d327d506a32f093a2d073fd8416b34c (diff) |
Add script for custom image costumizations
Diffstat (limited to 'custom-scripts')
-rwxr-xr-x | custom-scripts/modify-raspi.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/custom-scripts/modify-raspi.sh b/custom-scripts/modify-raspi.sh new file mode 100755 index 0000000..69870bf --- /dev/null +++ b/custom-scripts/modify-raspi.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +# post-build, pre-image script +# fail-fast +set -eu + +# make /etc/dropbear a directory instead of a symlink to /var... +# (need to persist keys somehow) +TARGET_DIR="$1" +(rm "$TARGET_DIR/etc/dropbear" && mkdir "$TARGET_DIR/etc/dropbear") || true + +# add a data partition mount +if ! grep -q LABEL "$TARGET_DIR/etc/fstab"; then + printf "LABEL=data\t/data/\text4\trw,noatime,noauto\t0\t0\n" >> "$TARGET_DIR/etc/fstab" +fi + +# Enable bootcode UART +sed -i -e "s/BOOT_UART=0/BOOT_UART=1/" "${BINARIES_DIR}/rpi-firmware/bootcode.bin" + +# Use "faster" start +#$ grep start rpi-firmware/config.txt +#start_file=start.elf +sed -i -e "/start_file/ s/^.*$/start_file=start_cd.elf/" "${BINARIES_DIR}/rpi-firmware/config.txt" + +exit 0 |