From f00ccfecc118a991f03c1d4eece6063a0408d687 Mon Sep 17 00:00:00 2001 From: Marco Nelissen Date: Thu, 4 Nov 2021 18:39:38 -0700 Subject: [PATCH] Don't delete v7+, it's needed for RpiZero2W Don't delete v7+ modules, needed for Raspberry Pi Zero 2 W. Add sntp, and use it to set the time before setup, to avoid problems with certs being invalid. Update for default cmdline changes. --- pi-gen-sources/00-teslausb-tweaks/00-packages | 1 + .../00-teslausb-tweaks/00-patches/01-cmdline-update.diff | 4 ++-- pi-gen-sources/00-teslausb-tweaks/00-run.sh | 1 - pi-gen-sources/00-teslausb-tweaks/files/rc.local | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pi-gen-sources/00-teslausb-tweaks/00-packages b/pi-gen-sources/00-teslausb-tweaks/00-packages index 5ba009a48..42d5b9e64 100644 --- a/pi-gen-sources/00-teslausb-tweaks/00-packages +++ b/pi-gen-sources/00-teslausb-tweaks/00-packages @@ -9,3 +9,4 @@ fcgiwrap libnginx-mod-http-fancyindex libfuse-dev exfatprogs +sntp diff --git a/pi-gen-sources/00-teslausb-tweaks/00-patches/01-cmdline-update.diff b/pi-gen-sources/00-teslausb-tweaks/00-patches/01-cmdline-update.diff index 5dbdb29ce..243dc03d6 100644 --- a/pi-gen-sources/00-teslausb-tweaks/00-patches/01-cmdline-update.diff +++ b/pi-gen-sources/00-teslausb-tweaks/00-patches/01-cmdline-update.diff @@ -1,5 +1,5 @@ --- stage_teslausb/rootfs/boot/cmdline.txt +++ stage_teslausb/rootfs/boot/cmdline.txt @@ -1 +1 @@ --console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet init=/usr/lib/raspi-config/init_resize.sh -+dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait modules-load=dwc2,g_ether quiet +-console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 fsck.repair=yes rootwait quiet init=/usr/lib/raspi-config/init_resize.sh ++dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 fsck.repair=yes rootwait modules-load=dwc2,g_ether quiet diff --git a/pi-gen-sources/00-teslausb-tweaks/00-run.sh b/pi-gen-sources/00-teslausb-tweaks/00-run.sh index 077292408..e4020ffab 100755 --- a/pi-gen-sources/00-teslausb-tweaks/00-run.sh +++ b/pi-gen-sources/00-teslausb-tweaks/00-run.sh @@ -13,7 +13,6 @@ EOF on_chroot << EOF apt-get remove -y --force-yes --purge triggerhappy bluez alsa-utils -rm -rf /lib/modules/*-v7+ rm -rf /lib/modules/*-v8+ EOF diff --git a/pi-gen-sources/00-teslausb-tweaks/files/rc.local b/pi-gen-sources/00-teslausb-tweaks/files/rc.local index 629b63c5e..5c3b30c40 100755 --- a/pi-gen-sources/00-teslausb-tweaks/files/rc.local +++ b/pi-gen-sources/00-teslausb-tweaks/files/rc.local @@ -34,6 +34,7 @@ function get_script () { while ! curl -o "$local_path/$name" https://raw.githubusercontent.com/"$REPO"/teslausb/"$BRANCH"/"$remote_path"/"$name" do setup_progress "get_script failed, retrying" + sntp -S time.google.com || true sleep 3 done chmod +x "$local_path/$name"