Skip to content
Permalink
Browse files

Fix Raspberry Pi detection in Raspbian Stretch.

The magic memory value we used to distinguish a newer Raspberry Pi
from the Raspberry Pi 1 mismatched, so we inaccurately detected a
newer Pi with Raspbian Stretch as a Pi 1.
  • Loading branch information
hzeller committed Aug 19, 2017
1 parent dada4c8 commit 9c1f6bbc1fa756459cf21ca32cc95db849d6dbe5
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/gpio.cc
@@ -163,7 +163,7 @@ static bool IsRaspberryPi2() {
uint64_t mem_size = 0;
if ((mem_size_key = strstr(buffer, "mem_size=")) != NULL
&& (sscanf(mem_size_key + strlen("mem_size="), "%" PRIx64, &mem_size) == 1)
&& (mem_size == 0x3F000000)) {
&& (mem_size >= 0x3F000000)) {
return true;
}
return false;

0 comments on commit 9c1f6bb

Please sign in to comment.
You can’t perform that action at this time.