firmware-open
firmware-open copied to clipboard
Add Containerfile for development
Add a command to create a Debian-based container with the coreboot, SDCC, and Rust toolchains installed in order to minimize the workspace setup time and ensure build environments are the same.
make -C containers
podman run -it --rm \
-v $PWD:/workspace:Z \
-v ~/.ccache:/root/.cache/ccache:Z \
system76/firmware-open:latest \
./scripts/build.sh oryp8
A locally built image is 2.46 GiB.
Ref: https://github.com/system76/firmware-open/issues/463
TODO (later)
- Versioning for the container?
- Build from CI and publish somewhere? (publish to/pull from ghcr.io or Docker Hub)
- Simplify using it for local development? (don't require typing the full podman command)
- Default to using the container, and have an override to build on the host
- Get Jenkins to use it?
I get an error due to not having a ~/.ccache directory. What do I need to do to remedy that?
Host will still need ccache installed, and it seems to be ~/.cache/ccache on Debian (ccache -p | grep cache_dir).
So the example probably needs to be:
- -v ~/.ccache:/root/.ccache:Z \
+ -v ~/.cache/ccache:/root/.cache/ccache:Z \