Merge pull request #1674 from arm64b/disable-cross-build-on-arm64

Disable the 'cross' build on AArch64
This commit is contained in:
Bassam Tabbara authored and GitHub committed 2018-05-14 20:56:19 -07:00
commit f6abaece0b
3 files changed
+20 -13

No files matched your search

+13 -13
View File
@@ -35,7 +35,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.
@@ -100,18 +112,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
+3
View File
@@ -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
+4
View File
@@ -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) || {