The latest version of the PhidgetSBC line includes an ARMv5 processor which means it now has support for go. Unfortunately the current golang package in the debian repository does not work but I was able to compile golang from source on the PhidgetSBC3 and it worked (including cgo
). Thanks to the
"The Go Language Gophers" team I downloaded the golang-tip
package and built it on my PhidgetSBC3. I've made this deb
available in my apt repository so you can easily install go and get rocking.
-
Plug your PhidgetSBC3 into power and network
-
Go to phidgetsbc.local and set a password
-
Add your ssh key to the phidgetsbc (optional)
ssh root@phidgetsbc.local "mkdir -p .ssh && echo '$(cat ~/.ssh/id_rsa.pub)' >> .ssh/authorized_keys"
-
SSH in
ssh root@phidgetsbc.local
-
Add my apt key
apt-key adv --keyserver keys.gnupg.net --recv-keys B4F808A2
-
Add my apt repo
echo "deb http://apt.samuelkadolph.com/ wheezy main" > /etc/apt/sources.list.d/samuelkadolph.list
-
Update apt
apt-get update
-
Install go
apt-get install golang-tip -y
And that's it. You can check that go is properly installed with go version
. You should see something like this.
root@phidgetsbc:~# go version
go version devel +07ed29a4f9f5 Sat Mar 23 09:57:40 2013 +0900 linux/arm
And check that it's working with a hello world sample.
root@phidgetsbc:~# cat hello.go
package main
import (
"fmt"
)
func main() {
fmt.Printf("Hello world\n")
}
root@phidgetsbc:~# go run hello.go
Hello world
Now get hacking with go on the PhidgetSBC3. See Part 2 for using the phidgets library in go.