Skip to content

Instantly share code, notes, and snippets.

@nbuchwitz
Created December 23, 2022 13:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nbuchwitz/3b79074ab1e4938409010bedbe995cf0 to your computer and use it in GitHub Desktop.
Save nbuchwitz/3b79074ab1e4938409010bedbe995cf0 to your computer and use it in GitHub Desktop.
Fix graphical login on RevPi Buster
diff --git usr/sbin/revpi-factory-reset usr/sbin/revpi-factory-reset
index 92bfded..49a168c 100755
--- usr/sbin/revpi-factory-reset
+++ usr/sbin/revpi-factory-reset
@@ -11,7 +11,7 @@
. /usr/share/revpi/revpi-functions
full_devicetype_list="compact|connect|core|flat|connect-se" # all suported devices
-if has-hat-eeprom; then
+if has_hat_eeprom; then
# The device is equipped with HAT EEPROM
with_hat_eeprom=true
@@ -39,7 +39,7 @@ else
fi
if [ "$ovl" = "core" ]; then
- if cm1-detection; then
+ if cm1_detection; then
echo "Compute Module 1 has been detected, core-cm1-overlay will be used"
echo "automatically."
ovl="core-cm1"
diff --git etc/profile.d/revpi-factory-reset.sh etc/profile.d/revpi-factory-reset.sh
index 85ccd46..1f509b7 100644
--- etc/profile.d/revpi-factory-reset.sh
+++ etc/profile.d/revpi-factory-reset.sh
@@ -17,7 +17,7 @@ export NEWT_COLORS='root=,black entry=white,black'
while [ ! -r /home/pi/.revpi-factory-reset ] ; do
clear
- if has-hat-eeprom; then
+ if has_hat_eeprom; then
# The device is equipped with HAT EEPROM
whiptail --nocancel --title "INFO" --msgbox "The device configuration was detected automatically. Manual configuration is therefore not necessary." 0 0
diff --git usr/share/revpi/revpi-functions usr/share/revpi/revpi-functions
index 47d4eea..aaf2d6e 100644
--- usr/share/revpi/revpi-functions
+++ usr/share/revpi/revpi-functions
@@ -5,14 +5,14 @@
# Copyright: 2022 KUNBUS GmbH
#
-cm1-detection() {
+cm1_detection() {
grep -m 1 "model name" /proc/cpuinfo | grep -q v6l
return $?
}
# Check existance of HAT EEPROM according to document:
# https://github.com/RevolutionPi/revpi-hat-eeprom/blob/master/docs/RevPi-HAT-EEPROM-Format.md#custom-atoms
-has-hat-eeprom() {
+has_hat_eeprom() {
if [ -e /proc/device-tree/hat/custom_1 ]; then
return 0;
fi
@nbuchwitz
Copy link
Author

Usage:

curl https://gist.githubusercontent.com/nbuchwitz/3b79074ab1e4938409010bedbe995cf0/raw/2c83bdaa084ef0a905886cb90779be1488212eac/fix-graphical-login.patch -o /tmp/

cd /

sudo patch -p0 </tmp/fix-graphical-login.patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment