Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable the 'cross' build on AArch64 #1674

Merged
merged 1 commit into from
May 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Disable the 'cross' build on AArch64
AArch64 platform doesn't support the `build.all` command due to the
`hypriot/qemu-register` issue, so we disable this kind of 'cross' build
on AArch64 platform.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
  • Loading branch information
arm64b committed Apr 26, 2018
commit 4679fe56949d345f8b13f7e22f541b3f01aa20b6
26 changes: 13 additions & 13 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,19 @@ You can also run the build for all supported platforms:
make -j4 build.all
```

See instructions below for setting up the build environment to support `arm` and `arm64` platforms.
Currently, only `amd64` platform supports this kind of 'cross' build. In order to make `build.all` succeed, we need to follow the steps specified by the below section
`Building for other platforms` first.

We suggest to use native `build` to create the binaries and container images on `arm{32,64}` platform, but if you do want to build those `arm{32,64}` binaries and images
on `amd64` platform with `build.all` command, please make sure the multi-arch feature is supported. To test run the following:

```
> docker run --rm -ti arm32v7/ubuntu uname -a
Linux bad621a75757 4.8.0-58-generic #63~16.04.1-Ubuntu SMP Mon Jun 26 18:08:51 UTC 2017 armv7l armv7l armv7l GNU/Linux

> docker run --rm -ti arm64v8/ubuntu uname -a
Linux f51ea93e76a2 4.8.0-58-generic #63~16.04.1-Ubuntu SMP Mon Jun 26 18:08:51 UTC 2017 aarch64 aarch64 aarch64 GNU/Linux
```

Run `make help` for more options.

Expand Down Expand Up @@ -99,18 +111,6 @@ EOF
systemctl enable update-binfmt.service
```

### Checking if multi-arch is supported

To test run the following:

```
> docker run --rm -ti arm32v7/ubuntu uname -a
Linux bad621a75757 4.8.0-58-generic #63~16.04.1-Ubuntu SMP Mon Jun 26 18:08:51 UTC 2017 armv7l armv7l armv7l GNU/Linux

> docker run --rm -ti arm64v8/ubuntu uname -a
Linux f51ea93e76a2 4.8.0-58-generic #63~16.04.1-Ubuntu SMP Mon Jun 26 18:08:51 UTC 2017 aarch64 aarch64 aarch64 GNU/Linux
```

# Improving Build Speed

## Apt Package Caching
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ endif
@$(MAKE) -C images PLATFORM=linux_$(GOHOSTARCH)

build.all: build.common
ifneq ($(GOHOSTARCH),amd64)
$(error cross platform image build only supported on amd64 host currently)
endif
@$(MAKE) do.build.parallel
@$(MAKE) -C images build.all

Expand Down
4 changes: 4 additions & 0 deletions build/run
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ if [ ! -z $DOCKER_HOST ]; then
fi

# build the the container if we've not done so already
if [ "`uname -m`" != "x86_64" ]; then
echo ERROR: we only support the cross container build on amd64 host.
exit 1
fi
echo ==== building the cross container \(this could take minutes the first time\)
make_cmd="make --no-print-directory -C ${scriptdir}/../images cross PULL=0"
make_output=$($make_cmd 2>&1) || {
Expand Down