-
Notifications
You must be signed in to change notification settings - Fork 3
Stratux from source with Go 1.5.1
This is an adaptation from Steven Sokol's great wiki guidance combined with Dave Cheney's instructions for installing Go 1.5 onto RPi2 - please read those pages first, as this page is just my experience getting the two to work together. The goal is to start with a Stratux image file on the RPi2 SD card and get the Github Stratux source onto the RPi2 with the latest version of the Go language, so we can play around with up-to-the-moment builds of Stratux.
Note: The main differences from Steve Sokol's page are: 1) this installs Golang version 1.5.1 instead of version 1.4.2, and 2) Golang ends up being installed into the user's home directory instead of into /usr/local, and 3) I include instructions for installing a few of the currently required dependencies.
Stratux image v0.4r2 has been installed on RPi2
You're logged into the RPi2 via an ethernet cable from laptop
You've run sudo apt-get update
and sudo apt-get upgrade
Follow Dave Cheney's instructions for installing Go 1.5 onto RPi2 with the following small modification: in Step 2, use:
curl https://storage.googleapis.com/golang/go1.5.1.src.tar.gz | tar xz
to install version 1.5.1 instead of 1.5.
In Step 4, feel free to use env GO_TEST_TIMEOUT_SCALE=10 GOROOT_BOOTSTRAP=$HOME/go-linux-arm-bootstrap ./make.bash
as he suggests. make.bash
doesn't run all the diagnostic tests that all.bash
does, and finishes up sooner.
So your RPI2 can find the Go language, you will add it to your path. In Steve's directions, he says to add export PATH=$PATH:/usr/local/go/bin
to the bottom of your ~/.profile file. Since we've installed Go in a different spot, add this line to the bottom of your .profile file instead:
export PATH=$PATH:$HOME/go/bin
Next, install Mercurial and clone Stratux as covered in Steven's page.
In your home directory, add the line export GOPATH=~/stratux
to the bottom of the file .bashrc and save that file. (GOPATH is where Golang looks for code to compile.) "Source" this file, too with source ~/.bashrc
. This is an alternative way to set GOPATH from what you see in Steve's page.
Install some other dependencies:
sudo apt-get install -y bzr
cd ~/stratux
go get github.com/BurntSushi/xgbutil github.com/codegangsta/cli
go get github.com/llgcode/ps golang.org/x/text
go get golang.org/x/crypto/ssh/terminal github.com/boombuler/barcode
mkdir -p $GOPATH/src/code.google.com/p
cd $GOPATH/src/code.google.com/p
hg clone https://code.google.com/p/freetype-go
Try building stratux:
cd ~/stratux`
make
Install it:
sudo make install
To remove the Golang bootstrap code which you won't need anymore, you can:
rm -r $HOME/go-linux-arm-bootstrap
To start up Stratux, you can reboot with sudo shutdown -r 0
or start up a screen with:
sudo screen /usr/bin/start_uat
Ctrl-a followed by d
will exit the screen while keeping Stratux running.