Skip to content
This repository has been archived by the owner on May 30, 2018. It is now read-only.

Commit

Permalink
Initial commit for Go 1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
DieterReuter committed Nov 19, 2015
0 parents commit 05a5d9a
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.tar.gz
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The MIT License (MIT)

Copyright (c) 2015 Hypriot

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# golang-armbuilds
Pre-compiled GOLANG tarballs for ARM devices.

## How to create a pre-compiled GOLANG 1.4.x tarball
Unfortunately there are no pre-compiled GOLANG tarballs for ARM officially available yet and the preferred way to build such a tarball from source isn't well documented at all.

This is a simple approach to compile Go from source and package it as a tarball. This tarball
should work like the official tarballs from the [GOLANG download page](https://golang.org/dl/).
For the sake of simplicity this build steps are meant to be used on a freshly installed Linux
distro on any ARM machine.

Please feel free to use this build recipe and report any issues AND when you could
successfully build Go on a new machine send us this information so we can include this machine
to the list of supported devices!

### 1. Prepare the build machine

Just install all necessary packages, for details see the official guide
[Installing Go from source](https://golang.org/doc/install/source).
At least you'll need `gcc` to compile Go 1.4.x from source.

For a [Scaleway](https://www.scaleway.com) C1 server (Ubuntu 15.04):
```
apt-get update
apt-get install -y curl git gcc
```

### 2. Clone this repo
```
git clone https://github.com/hypriot/golang-armbuilds.git
cd golang-armbuilds
```

### 3. Run the compile script
```
./make-tarball-1.4.x.sh
```

### 4. Use it directly or upload the created tarball to GitHub releases
```
go1.4.linux-armv7.tar.gz
```

# Acknowledgements
Many thanks to the GOLANG team at Google and all maintainers and contributers.
18 changes: 18 additions & 0 deletions make-tarball-1.4.x.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

# fetch Go 1.4.x source tarball
GO_VERSION=1.4
GOARM=7
rm -fr /usr/local/go
curl -sSL https://storage.googleapis.com/golang/go${GO_VERSION}.src.tar.gz | tar xz -C /usr/local

# now compile Go 1.4.x and package it as a tarball
pushd /usr/local/go/src
time ./make.bash --no-clean 2>&1
cd ../..
tar cfz go${GO_VERSION}.linux-armv${GOARM}.tar.gz ./go
popd
mv /usr/local/go${GO_VERSION}.linux-armv${GOARM}.tar.gz .

# cleanup
rm -fr /usr/local/go

0 comments on commit 05a5d9a

Please sign in to comment.