Fix display settings recover for future lean build releases (#3558)

* modify dev notes

* display recover during lean-build
This commit is contained in:
/rootzoll 2022-12-21 14:50:52 +01:00 committed by GitHub
parent ff4d35b038
commit 4a2a33c081
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 49 additions and 6 deletions

View file

@ -12,8 +12,7 @@ Work notes for the process of producing a new SD card image release:
* From the browser `Show All Downloads` and from the context menu select `Open Containing Folder`
* On that file manager open context (right click) on the white-space and select `Open in Terminal`
* Compare the checksum with the one you just made note of, using `shasum -a 256 *.zip`
* Install curl if needed `sudo apt-get install -f curl net-tools`
* Check signature: `curl https://www.raspberrypi.org/raspberrypi_downloads.gpg.key | gpg --import && gpg --verify *.sig`
* Check signature: `wget https://www.raspberrypi.org/raspberrypi_downloads.gpg.key && gpg --import ./raspberrypi_downloads.gpg.key && gpg --verify *.sig`
* The result should say "correct signature" and the fingerprint should end with `8738 CD6B 956F 460C`
* Insert an NTFS formatted USB stick and use the file manager to move all files to the USB
* If image is an ZIP file use in file manager context on NTFS USB stick `extract here` to unzip
@ -197,3 +196,15 @@ See article: https://tech.sycamore.garden/add-commit-push-contributor-branch-git
Chery-picking patch PRs from dev to a release-branch like 'v1.8' (for example) is now a bit more complicated. Either an admin switches temorarly the branch protection "require a pull request before merging" setting off for the `git cherry-pick` OR we create a `p1.8` branch from `v1.8`, cherry-pick the squashed patch PR into that unprotected `p1.8` and then open a PR back to `v1.8`.
But what we gain is that better branch protection and we can add more contributers to the project that are allowed to manage issues - like adding lables or closing.
### How to run the automatic amd64 build on a VM on OSX?
just notes so far:
https://brew.sh
brew install qemu
https://github.com/rootzoll/raspiblitz/actions --> download amd64-lean image
double unzip until `qcow2` file
convert `qcow2` to `vdi:
qemu-img convert -f qcow2 raspiblitz-amd64-debian-lean.qcow2 -O vdi raspiblitz-amd64-debian-lean.vdi
https://www.virtualbox.org/wiki/Downloads

View file

@ -856,6 +856,8 @@ echo -e "\nIMPORTANT IF WANT TO MAKE A RELEASE IMAGE FROM THIS BUILD:"
echo "1. login fresh --> user:admin password:raspiblitz"
echo -e "2. run --> release\n"
# make sure that at least the code is available (also if no internet)
sudo /home/admin/config.scripts/blitz.display.sh prepare-install
# (do last - because might trigger reboot)
if [ "${display}" != "headless" ] || [ "${baseimage}" = "raspios_arm64" ]; then
echo "*** ADDITIONAL DISPLAY OPTIONS ***"

View file

@ -898,6 +898,14 @@ if [ ${configWifiExists} -eq 1 ]; then
cp /etc/wpa_supplicant/wpa_supplicant.conf /mnt/hdd/app-data/wpa_supplicant.conf
fi
# always copy the latest display setting (maybe just in raspiblitz.info) to raspiblitz.conf
if [ "${displayClass}" != "" ]; then
/home/admin/config.scripts/blitz.conf.sh set displayClass ${displayClass}
fi
if [ "${displayType}" != "" ]; then
/home/admin/config.scripts/blitz.conf.sh set displayType ${displayType}
fi
# make sure users have latest credentials (if lnd is on)
if [ "${lightning}" == "lnd" ] || [ "${lnd}" == "on" ]; then
echo "running LND users credentials update" >> $logFile

View file

@ -13,6 +13,7 @@ if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
echo "# sudo blitz.display.sh rotate [on|off]"
echo "# sudo blitz.display.sh test-lcd-connect"
echo "# sudo blitz.display.sh set-display [hdmi|lcd|headless]"
echo "# sudo blitz.display.sh prepare-install"
exit 1
fi
@ -196,6 +197,19 @@ if [ "${command}" == "test-lcd-connect" ]; then
exit 0
fi
function prepareinstall() {
repoCloned=$(sudo -u admin ls /home/admin/wavesharelcd-64bit-rpi/README.md 2>/dev/null| grep -c README.md)
if [ ${repoCloned} -lt 1 ]; then
echo "# clone/download https://github.com/tux1c/wavesharelcd-64bit-rpi.git"
cd /home/admin/
sudo -u admin git clone https://github.com/tux1c/wavesharelcd-64bit-rpi.git
sudo -u admin chmod -R 755 wavesharelcd-64bit-rpi
sudo -u admin chown -R admin:admin wavesharelcd-64bit-rpi
else
echo "# LCD repo already cloned/downloaded (${repoCloned})"
fi
}
#######################################
# DISPLAY TYPED INSTALLS & UN-INSTALLS
# HDMI is the default - every added
@ -231,10 +245,7 @@ function install_lcd() {
sudo apt-mark hold raspberrypi-bootloader
# Downloading LCD Driver from Github
cd /home/admin/
sudo -u admin git clone https://github.com/tux1c/wavesharelcd-64bit-rpi.git
sudo -u admin chmod -R 755 wavesharelcd-64bit-rpi
sudo -u admin chown -R admin:admin wavesharelcd-64bit-rpi
prepareinstall
cd /home/admin/wavesharelcd-64bit-rpi
sudo -u admin git reset --hard 5a206a7 || exit 1
sudo -u admin /home/admin/config.scripts/blitz.git-verify.sh \
@ -404,6 +415,17 @@ function uninstall_headless() {
fi
}
###################
# PREPARE INSTALL
# make sure github
# repo is installed
###################
if [ "${command}" == "prepare-install" ]; then
prepareinstall
exit 0
fi
###################
# SET DISPLAY TYPE
###################