Skip to content

Commit

Permalink
Made prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
wimrijnders committed Jul 16, 2018
1 parent b13025b commit 5cc6c45
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Tools/detectPlatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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);
Expand Down
5 changes: 2 additions & 3 deletions Tools/detectPlatform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=$?
Expand Down

0 comments on commit 5cc6c45

Please sign in to comment.