Sign inSign up

andyg42/ubuntu-crosstool

By andyg42

•Updated over 7 years ago

Setup of crosstool-ng in an Ubuntu container

Image
0

1.9K

andyg42/ubuntu-crosstool repository overview

⁠About

Setup of the excellent http://crosstool-ng.github.io/⁠, a system for building GCC cross-compilers, in an Ubuntu container.

I've built this to keep on top of having a Raspberry Pi cross-compiler available with the aim of being able to automate cross-compiler builds in Kubernetes.

⁠Usage

To see usage, run:

docker run --rm andyg42/ubuntu-crosstool:latest

This will show a list of all of the available "samples" (pre-configured settings) that you can build from.

To build a toolchain, you need to specify two environment variables to the container:

  • SAMPLE_TO_BUILD - name of the crosstool-ng sample to build. Run without environment variables to see a list of samples to build.
  • S3_OUTPUT_URI - the container is built to output the final results as a tarball into S3. Specify an s3://{bucketname}/path URL to upload to, this should point to a "folder" and not have a trailing /. The tarball is automatically named by the docker-entrypoint script and appended to this for upload

You'll also need to set up AWS credentials for the upload to work. You can either set them in environment variables, or my preferred way is to bind-mount ${HOME}/.aws to /home/build/.aws in the container so it can access your credentials from there. In Kubernetes you'd use a secrets map to set up the credentials to this path.

Because the toolchain build can take a long time (30mins or so on a 24-core blade) the script checks that it can access the S3 URI using the provided credentials before starting the build. Your credentials will therefore need both READ and WRITE access to the path that you are specifying.

To see the source, go to https://github.com/fredex42/crosstool-docker⁠.

Tag summary

Content type

Image

Digest

Size

237.2 MB

Last updated

over 7 years ago

docker pull andyg42/ubuntu-crosstool