Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
|
|
1 year ago | |
|---|---|---|
| .. | ||
| Dockerfile.arm64.18.04 | 1 year ago | |
| Dockerfile.arm64.20.04 | 1 year ago | |
| Dockerfile.arm64.22.04 | 1 year ago | |
| README.md | 2 years ago | |
This is a short tutorial about how to create a cross-compiling environment via the docker image and admake on Linux.
The simple way to build all the docker images:
tools/build_docker.sh.
If you want to append a new
Dockerfileforadmake, you should know the name conventions,Dockerfile.<arch>.<tag>->admake-cross-linux-<arch>:<tag>. Recently, we only supportLinuximage for cross-compiling.
I will construct an ARM64 cross-compiling environment based on ubuntu 18.04 as an example here.
admake-cross-linux-arm64:18.04.
docker build -t admake-cross-linux-arm64:18.04 -f Dockerfile.arm64.18.04 .
# Build your project for ARM64 platforms in a x64 host
admake build -p arm64
# or append -c/--docker option, this option will ensure
# the admake command use docker forcedly.
admake build -p arm64 -c
docker run -it --name deps admake-cross-linux-arm64:18.04 /bin/bash
# Now, assume that you are in the container
# Install other dependencies
apt update && apt install -y libxxx-dev:arm64 && rm -rf /var/lib/apt/lists/* && apt-get clean
exit
# In your host system
# Commit this layer
docker commit deps admake-cross-linux-arm64:18.04
# Cleanup the exited container
docker container prune -f
Here I also provide a script (
arm64-env) as a demo to show how to wrapper the docker as a script tool. You can also use the docker command template that output byadmake config -ddirectly.
#!/usr/bin/env bash
#
# Start a ARM64 Cross Compiling Environment in Docker
#
# Author: anjingyu <anjingyu@navinfo.com>
readonly IMAGE_NAME=${IMAGE_NAME:-"admake-cross-linux-arm64:18.04"}
bash -c "$(admake config -d ${IMAGE_NAME})"
Toys
C++ JavaScript Unity3D Asset C Python other
Apache-2.0