From 5cc6c4565730598faab100fece2fd9cc9baf692d Mon Sep 17 00:00:00 2001 From: Wim Rijnders Date: Mon, 16 Jul 2018 10:53:18 +0200 Subject: [PATCH] Made prefix --- Tools/detectPlatform.cpp | 4 ++-- Tools/detectPlatform.sh | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Tools/detectPlatform.cpp b/Tools/detectPlatform.cpp index 0b69e02..25afbea 100644 --- a/Tools/detectPlatform.cpp +++ b/Tools/detectPlatform.cpp @@ -69,7 +69,7 @@ bool detect_from_sys() { * * * The following are valid model numbers: * - * - BCM2807 + * - BCM2708 * - BCM2835 - This appears to be returned for all higher BCM versions * * * The following are also valid, but appear to be represented by 'BCM2835' @@ -80,7 +80,7 @@ bool detect_from_sys() { * - BCM2837B0 */ bool detect_from_proc() { - const char *BCM_VERSION_PREFIX = "BCM28"; + const char *BCM_VERSION_PREFIX = "BCM2"; const char *filename = "/proc/cpuinfo"; std::ifstream t(filename); diff --git a/Tools/detectPlatform.sh b/Tools/detectPlatform.sh index 765431b..0e11c0b 100755 --- a/Tools/detectPlatform.sh +++ b/Tools/detectPlatform.sh @@ -36,12 +36,11 @@ fi # Detect if this is a VideoCore. This should be sufficient for detecting Pi, # since it's the only thing to date(!) using this particular chip version. # -# There are several model numbers possible, but they should all start -# with 'BCM28'. +# There are several model numbers possible, but they should all start with 'BCM2'. # # Prefix of allowed model numbers -modelPrefix=BCM28 +modelPrefix=BCM2 model=$(cat /proc/cpuinfo | grep Hardware | grep $modelPrefix) ret=$?