Skip to content

Commit

Permalink
is_pifive_8GB
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Storm <[email protected]>
  • Loading branch information
mstormi committed Nov 14, 2023
1 parent 757a2be commit 5e2bdc7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions functions/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,11 @@ is_pifive() {
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_pifive_8GB() {
if [[ "$hw" == "pi5_8gb" ]]; then return 0; fi
totalMemory="$(awk '/MemTotal/ {print $2}' /proc/meminfo)"
if is_pifive && [[ $totalMemory -gt 5000000 ]]; then return 0; else return 1; fi
}
is_pi() {
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
Expand Down

0 comments on commit 5e2bdc7

Please sign in to comment.