system76 / firmware-open

System76 Open Firmware
Other
946 stars 84 forks source link

Add Containerfile for development #493

Open crawfxrd opened 9 months ago

crawfxrd commented 9 months ago

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)

XV-02 commented 3 days ago

I get an error due to not having a ~/.ccache directory. What do I need to do to remedy that?

crawfxrd commented 3 days ago

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 \