Go on the PhidgetSBC3 Part 1

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.

  1. Plug your PhidgetSBC3 into power and network

  2. Go to phidgetsbc.local and set a password
    Go to phidgetsbc.local and set a password

  3. Enable the SSH server
    Enable the SSH server

  4. Add your ssh key to the phidgetsbc (optional)

    ssh root@phidgetsbc.local "mkdir -p .ssh && echo '$(cat ~/.ssh/id_rsa.pub)' >> .ssh/authorized_keys"
  5. SSH in

    ssh root@phidgetsbc.local
  6. Add my apt key

    apt-key adv --keyserver keys.gnupg.net --recv-keys B4F808A2
  7. Add my apt repo

    echo "deb http://apt.samuelkadolph.com/ wheezy main" > /etc/apt/sources.list.d/samuelkadolph.list
  8. Update apt

    apt-get update
  9. 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.

Leave a comment

Your email address will not be published. Required fields are marked *