kidoman / embd

Embedded Programming Framework in Go
http://embd.kidoman.io
MIT License
1.28k stars 156 forks source link

detect: Added cpuInfo method to use cpu info for host detection. #22

Closed benjamind closed 9 years ago

benjamind commented 9 years ago

Potential fix for #16 using cpuInfo contents instead of uname. Have tested this on a BBB, but I don't have a Raspberry Pi handy to confirm. Can someone please check on a Pi?

kidoman commented 9 years ago

Thanks for this :) Have pushed it as https://github.com/kidoman/embd/commit/bf6e647c1d100ac046004bf1777429f6f67f9dbd

benjamind commented 9 years ago

No problem at all, did it work on the Pi?

kidoman commented 9 years ago

See for yourself:

➜  samples git:(master) ✗ GOOS=linux GOARCH=arm go install github.com/kidoman/embd/embd
➜  samples git:(master) ✗ scp -C $GOPATH/bin/linux_arm/embd pi@rpi:~

pi@raspberrypi ~ $ ./embd detect
detected host Raspberry Pi (rev 0x10)
pi@raspberrypi ~ $
benjamind commented 9 years ago

Awesome. Thanks.