Skip to content
This repository has been archived by the owner on Oct 5, 2019. It is now read-only.

theAkito/go1.11.2_arm_bootstrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Refer to this automated installation method instead of using this repository directly!





Bootstrapping go1.11.2 on Raspberry Pi

Follow the instructions exactly step by step to make sure the directories are created as intended. Failing to do so will make everything fail.

All this must be applied on the target Raspberry Pi system.

  1. Install dependencies

    sudo apt install wget git build-essential
  2. Clone the repository and set GOROOT_BOOTSTRAP environment variable

    mkdir ~/src ; cd ~/src ; git clone https://github.com/Akito13/go1.11.2_arm_bootstrap.git
    export GOROOT_BOOTSTRAP=/home/pi/src/go1.11.2_arm_bootstrap/go-linux-arm-bootstrap
  3. You are in the ~/src folder now and retrieve the Go source code:

    i.

    mkdir go1.11.2 ; cd go1.11.2
    git clone https://go.googlesource.com/go . && cd src

    ii. Switch to desired version:

    git checkout go1.11.2
  4. You compile the actual Go that Raspberry Pi will use now:

    i.

    ./make.bash

    ii. This will take some time, so be patient.

  5. Test your Go installation:

    i.

    cd .. ; cd bin ; nano hello.go

    ii. You paste in the following:

    package main
    
    import "fmt"
    
    func main() {
    
            fmt.Printf("GO-reetings!\n")
    
    }

    iii. Now do

    ./go run hello.go

    and output should be

    GO-reetings!
  6. Set your environment ready to GO:

    export PATH="$PATH:/home/pi/src/go1.11.2/bin" && export GOPATH=$HOME/go
  7. Check if PATH is set correctly:

    go version

    and output should be

    go version go1.11.2 linux/arm

    which means everything is set up correctly!

About

go1.11.2 bootstrapper for Raspberry Pi.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published