Skip to content

Commit

Permalink
Update readme to use git release
Browse files Browse the repository at this point in the history
  • Loading branch information
Pro committed Oct 27, 2019
1 parent a7a85e4 commit bb7bd86
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 22 deletions.
30 changes: 25 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,31 @@ https://gist.github.com/tttapa/534fb671c5f6cced0e1722d3e4aec987
A corresponding Blog post can be found here:
https://solarianprogrammer.com/2018/05/06/building-gcc-cross-compiler-raspberry-pi/

## How to build the toolchain
## How to get the toolchain

To build the toolchain, just clone this repository and then execute the build script `build.sh`.
You have two options:

Alternatively call:
- Use the prebuilt toolchain attached to every github release (recommended)
- Build the toolchain yourself

### Use pre-built toolchain

Every github release has a pre-build toolchain attached.
See

1. Download the toolchain:
```bash
wget https://github.com/Pro/raspi-toolchain/releases/latest/download/raspi-toolchain.tar.gz
```
2. Extract it. Note: The toolchain has to be in `/opt/cross-pi-gcc` since it's not location independent.
```bash
sudo tar xfz raspi-toolchain.tar.gz --strip-components=1 -C /opt
```
3. You are done!

### Build the toolchain from source

To build the toolchain, just clone this repository and then call:

```bash
docker build -f Dockerfile --network=host -t gcc9-rpi-zero .
Expand All @@ -32,11 +52,11 @@ To run the docker container, use
docker run -it gcc9-rpi-zero bash
```

## Install the toolchain on your host
### Install from source after building

To get the toolchain from the docker container into your host, just copy the files:

```
```bash
CONTAINER_ID=$(docker ps -aqf "name=gcc9-rpi-zero")
docker cp $CONTAINER_ID:/opt/cross-pi-gcc /opt/cross-pi-gcc
```
Expand Down
16 changes: 8 additions & 8 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,23 @@ jobs:
ArtifactName: libopen62541-debian
# publishing artifacts from PRs from a fork is currently blocked
condition: succeeded()
displayName: "Publish Artifact: open62541 Debian Packages"
displayName: "Publish Artifact: Toolchain package"

# See https://github.com/microsoft/azure-pipelines-tasks/issues/11260#issuecomment-527343172
#- bash: echo "##vso[task.setvariable variable=TAG]${BUILD_SOURCEBRANCH##refs/tags/}"
# displayName: Set TAG variable for $(Build.SourceBranch)
# condition: startswith(variables['Build.SourceBranch'], 'refs/tags/')
- bash: echo "##vso[task.setvariable variable=TAG]${BUILD_SOURCEBRANCH##refs/tags/}"
displayName: Set TAG variable for $(Build.SourceBranch)
condition: startswith(variables['Build.SourceBranch'], 'refs/tags/')
- task: GitHubRelease@0
# Only execute this task if a tags build
#condition: startswith(variables['Build.SourceBranch'], 'refs/tags/')
condition: startswith(variables['Build.SourceBranch'], 'refs/tags/')
inputs:
gitHubConnection: 'pro-raspi-toolchain'
repositoryName: '$(Build.Repository.Name)'
action: 'create' # Options: create, edit, delete
action: 'edit' # Options: create, edit, delete
target: '$(Build.SourceVersion)' # Required when action == Create || Action == Edit
tagSource: 'auto'
tagSource: 'Git tag'
#tagPattern: # Optional
#tag: $(TAG) # Required when action == Edit || Action == Delete || TagSource == Manual
tag: $(TAG) # Required when action == Edit || Action == Delete || TagSource == Manual
#title: # Optional
#releaseNotesSource: 'file' # Optional. Options: file, input
#releaseNotesFile: # Optional
Expand Down
3 changes: 0 additions & 3 deletions build_toolchain.sh

This file was deleted.

6 changes: 0 additions & 6 deletions copy_to_host.sh

This file was deleted.

0 comments on commit bb7bd86

Please sign in to comment.