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

Split docker makefile in toolchain build and firmware build #330

Merged
merged 12 commits into from
Oct 27, 2019

Conversation

ccinelli
Copy link

@ccinelli ccinelli commented Oct 25, 2019

This PR include:

  • Fix for docker built. The current docker build process is broken (see Fix docker build #329).
  • Add tests for the docker build (so breaking changes will not go unnoticed again).
  • Separate building the toolchain and building the firmware. Currently the flow with docker is a little messy. Dockerfile installs everything except the solo-python. At the same time checkout again the code inside the container. So in order to build the firmware we have to push the code to origin. This PR uses Docker to build a toolchain container that can build the firmware but use the code on the local machine. This is done mapping the main repo inside /solo in the container. make docker-build-toolchain builds the toolchain and make docker-build-all builds all the different type of the firmware.
  • Put the definition of VERSION_FULL in one place and remove the dependency on GIT in the docker. In multiple makefiles git describe is used to decide the version of the firmware. It is better to do this only once in the main Makefile and pass the version (VERSION_FULL) to the other makefiles.
  • The current docker file is unoptimized and end up creating unused files in layers. This PR bring the final docker image down from about 1.2GB to 890Mb. It creates only 4 layers following docker best practices:
    • The apt packages (cleaning the cache after installing)
    • The ARM compiler
    • Python 3.7 (miconda)
    • solo-python python package
  • Update the ARM toolchain to the latest one: 8-2019-q3
  • Add the .sha2 files to .gitignore
  • It adds makefile update to download the latest firmware from master

You can test it by running make docker-build-toolchain and make docker-build-all

@conorpp
Copy link
Member

conorpp commented Oct 27, 2019

Thank you!

@conorpp conorpp merged commit b7d74cc into solokeys:master Oct 27, 2019
@conorpp
Copy link
Member

conorpp commented Oct 28, 2019

@all-contributors please add @ccinelli for infrastructure, tests

@allcontributors
Copy link
Contributor

@conorpp

I've put up a pull request to add @ccinelli! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants