Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/whatever4711/docker-cc4arm
Dockerfile and tools to build a cross compiler for aarch64, arm and armhf
https://github.com/whatever4711/docker-cc4arm
Last synced: about 5 hours ago
JSON representation
Dockerfile and tools to build a cross compiler for aarch64, arm and armhf
- Host: GitHub
- URL: https://github.com/whatever4711/docker-cc4arm
- Owner: whatever4711
- Created: 2016-05-03T10:04:12.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-01-06T18:15:42.000Z (almost 9 years ago)
- Last Synced: 2023-06-01T13:50:24.228Z (over 1 year ago)
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Introduction
While working on neural networks and especially trying to run them on small / embedded hardware, it appeared that I would need to compile a lot of things for multiple hardware targets. As Docker Hub doesn't do cross compilation, and I could not find any build farm with a proper cross compilation story (if you know one please let me know, I hate to reinvent the wheel), I decided to make a small cross compilation container.
This is very much WIP for now as I am discovering cross compilation and have limited experience in that field. Goal is to automate this a lot in the future, potentially to hook it to a CIaaS (best) or a Jenkins (only if I have to) environment.
# Content
The dockerfile installs 3 toolchains in /opt: aarch64, arm and armhf.
When run with a target architecture, it will symlink the binaries to their targets on the file system, making it very easy to run a compilation process inside a volume shared with the container.
# Next steps
I very much like [this work](https://github.com/sdt/docker-raspberry-pi-cross-compiler) and will tend towards being as easy as it is, but I am not yet familiar enough with cross compilation to adopt it.
# How to use this?
## Downloading the containerThe easy way, if you don't want to make that yourself and have access to Docker Hub
docker pull samnco/cc4arm:latest
## Building the image
git clone https://github.com/SaMnCo/docker-cc4arm.git
cd docker-cc4arm
docker build -t /:latest .## Running the container
docker run -it -e ARCH= -e HOST= -v :/build --name cc4arm samnco/cc4arm:latest bash
ARCH can be aarch64, arm and armhf
HOST must be picked accordingly and can be aarch64-linux-gnu, arm-linux-gnueabi or arm-linux-gnueabihfThis will give you a command line, from which you can browse to the build folder, where you'll find your sources
root@1f253de9bdf6:/# cd build/
root@1f253de9bdf6:/# make ARCH=${ARCH} CROSS_COMPILE=${HOST}-