From 6af1796f35a0957d4b783917da1c3bb446b981c1 Mon Sep 17 00:00:00 2001 From: Karan Misra Date: Tue, 17 Feb 2015 17:04:09 +0530 Subject: [PATCH] support detection of rpi 2 --- detect.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/detect.go b/detect.go index 6658d5d..a92ff4e 100644 --- a/detect.go +++ b/detect.go @@ -86,7 +86,7 @@ func cpuInfo() (model, hardware string, revision int, err error) { switch { case strings.HasPrefix(fields[0], "Revision"): revs := strings.TrimSpace(fields[1]) - rev, err := strconv.ParseInt(revs, 16, 8) + rev, err := strconv.ParseInt(revs, 16, 32) if err != nil { continue } @@ -119,9 +119,9 @@ func DetectHost() (host Host, rev int, err error) { switch { case strings.Contains(model, "ARMv7") && (strings.Contains(hardware, "AM33XX") || strings.Contains(hardware, "AM335X")): return HostBBB, rev, nil - case strings.Contains(hardware, "BCM2708"): + case strings.Contains(hardware, "BCM2708") || strings.Contains(hardware, "BCM2709"): return HostRPi, rev, nil default: - return HostNull, 0, fmt.Errorf("embd: your host \"%v:%v\" is not supported at this moment. request support at https://github.com/kidoman/embd/issues", host, model) + return HostNull, 0, fmt.Errorf(`embd: your host "%v:%v" is not supported at this moment. request support at https://github.com/kidoman/embd/issues`, host, model) } }