Skip to content

Commit

Permalink
pi5
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Storm <markus.storm@gmx.net>
  • Loading branch information
mstormi committed Nov 13, 2023
1 parent 737aa94 commit 4672e5f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions build-image/openhabian.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ locales="en_US.UTF-8 de_DE.UTF-8"
system_default_locale="en_US.UTF-8"

# WiFi settings. An ethernet connection is recommended.
# If you have a RPi4, RPi3, RPi0W or a supported external WiFi dongle, the WiFi
# If you have a RPi3 or higher, RPi0W or a supported external WiFi dongle, the WiFi
# interface can be setup and used for the initial installation.
# Fill in your SSID and password below, leave empty or put comment in front to
# have your WiFi remain unchanged/uninitialized. Make sure your Ethernet works.
Expand Down Expand Up @@ -62,7 +62,7 @@ apttimeout=60

# fake hardware
# force treating your box as if it was a ...
# pi4, pi4_8gb, cm4, pi400, pi3, cm3, pi3+, cm3+, pi2, pi1, cm1, pi0, pi0w, pi0w2, x86
# pi5, pi4, pi4_8gb, cm4, pi400, pi3, cm3, pi3+, cm3+, pi2, pi1, cm1, pi0, pi0w, pi0w2, x86
# hw=

# Hardware architecture
Expand Down
11 changes: 8 additions & 3 deletions functions/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -239,16 +239,21 @@ is_pi400() {
grep -q "^Revision\\s*:\\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]13[0-9a-fA-F]$" /proc/cpuinfo
return $?
}
is_pifive() {
if [[ "$hw" == "pi5" ]]; then return 0; fi
grep -q "^Revision\\s*:\\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]17[0-9a-fA-F]$" /proc/cpuinfo
return $?
}
is_pi() {
if is_pifour || is_cmfour || is_pi400 || is_cmthreeplus || is_cmthree || is_pithreeplus || is_pithree || is_pitwo || is_pione || is_cmone || is_pizerow || is_pizerow2 || is_pizero; then return 0; fi
if is_pifive || is_pifour || is_cmfour || is_pi400 || is_cmthreeplus || is_cmthree || is_pithreeplus || is_pithree || is_pitwo || is_pione || is_cmone || is_pizerow || is_pizerow2 || is_pizero; then return 0; fi
return 1
}
is_pi_wlan() {
if is_pifour || is_pi400 || is_pithreeplus || is_pithree || is_pizerow || is_pizerow2; then return 0; fi
if is_pifive || is_pifour || is_pi400 || is_pithreeplus || is_pithree || is_pizerow || is_pizerow2; then return 0; fi
return 1
}
is_pi_bt() {
if is_pifour || is_pi400 || is_pithreeplus || is_pithree || is_pizerow || is_pizerow2; then return 0; fi
if is_pifive || is_pifour || is_pi400 || is_pithreeplus || is_pithree || is_pizerow || is_pizerow2; then return 0; fi
return 1
}
is_cm() {
Expand Down

0 comments on commit 4672e5f

Please sign in to comment.