summaryrefslogtreecommitdiff
path: root/rootfs/etc/systemd/system
diff options
context:
space:
mode:
authorGunnar Wolf <gwolf@gwolf.org>2021-02-18 11:31:23 -0600
committerGunnar Wolf <gwolf@gwolf.org>2021-02-18 11:31:23 -0600
commita146c3a7f78a0bb7b9dd6291df3c27907c19073f (patch)
tree6242b491d5dedea0a540b76d75e59b82c1fb836d /rootfs/etc/systemd/system
parent791dfacde6120192a4889421d08fd75a31acd748 (diff)
Fixes to almost-ensure there is a working serial console
Why almost? Because Rpi0w uses ttyS1 instead of ttyAMA0 desipte being part of the RPi1 family... ...But it will work fine for the _second_ boot onwards, if things go according to plan. For all other RPi models, it should work from the first boot on.
Diffstat (limited to 'rootfs/etc/systemd/system')
-rw-r--r--rootfs/etc/systemd/system/rpi-reconfigure-raspi-firmware.service14
1 files changed, 14 insertions, 0 deletions
diff --git a/rootfs/etc/systemd/system/rpi-reconfigure-raspi-firmware.service b/rootfs/etc/systemd/system/rpi-reconfigure-raspi-firmware.service
new file mode 100644
index 0000000..529f01b
--- /dev/null
+++ b/rootfs/etc/systemd/system/rpi-reconfigure-raspi-firmware.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Reconfigure raspi-firmware to regenerate config.txt matching actual hardware
+Before=local-fs-pre.target
+DefaultDependencies=no
+RequiresMountsFor=/boot/firmware
+
+[Service]
+Type=oneshot
+TimeoutSec=infinity
+ExecStart=/usr/sbin/dpkg-reconfigure raspi-firmware
+ExecStart=/bin/systemctl --no-reload disable %n
+
+[Install]
+RequiredBy=local-fs-pre.target