Skip to content

Commit

Permalink
Merge pull request #10 from snapcore/fix-cross-building
Browse files Browse the repository at this point in the history
use on/to in build-packages, fix --target-arch use
  • Loading branch information
ogra1 committed May 24, 2018
2 parents 6976c96 + 6975f49 commit 3159969
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ projects better than what is available with Github issues.

To build the gadget snap locally on an armhf system please use `snapcraft`.

To cross build this gadget snap on a PC please install the gcc-arm-linux-gnueabihf package
before running `snapcraft`
To cross build this gadget snap on a PC please run `snapcraft --target-arch=armhf`

## Launchpad Mirror and Automatic Builds.

Expand Down
10 changes: 4 additions & 6 deletions snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: pi2
version: 16.04-0.18
version: 16.04-0.19
summary: Raspberry Pi 2 support package
description: |
Support files for booting Raspberry Pi
Expand All @@ -10,18 +10,14 @@ confinement: strict
grade: stable
parts:
uboot:
plugin: make
plugin: nil
source: git://git.denx.de/u-boot.git
source-branch: v2017.05
prepare: |
git apply ../../../uboot.patch
make rpi_2_defconfig
build: |
if [ "$(arch)" = "x86_64" ]; then
if [ ! -x /usr/bin/arm-linux-gnueabihf-gcc ]; then
echo "ERROR: You are cross building this snap, please install gcc-arm-linux-gnueabihf"
exit 1
fi
CROSS_COMPILE=arm-linux-gnueabihf- make
else
make
Expand All @@ -37,6 +33,8 @@ parts:
- device-tree-compiler
- libpython2.7-dev
- python-minimal
- on amd64 to armhf:
- gcc-arm-linux-gnueabihf:amd64
boot-firmware:
plugin: nil
source: .
Expand Down

0 comments on commit 3159969

Please sign in to comment.