On 19/02/2022 16:12, Mark Cave-Ayland wrote:
This is something I've been keen to do for some time which is to generate an OpenBIOS builder image with the required cross-compilers pre-installed, and then implement workflows so that a push to a branch or a versioned release tag will automatically create OpenBIOS binaries.
One of the barriers to OpenBIOS development is getting the correct cross compilers installed: not just for the architecture being developed on, but also for all current supported architectures to ensure there are no regressions.
Up until now I was unable to find a set of compilers that built working binaries across all architectures, but since Glenn pointed out the existence of the crosstool releases on kernel.org I've done some tests and confirmed that the cross compilers produce working binaries for all of SPARC32, SPARC64 and PPC.
This series adds a manual action to create an openbios-builder image that is then integrated into automated workflows for building debug and release OpenBIOS binaries for all supported architectures (amd64, sparc32, sparc64, ppc and x86). The behaviour is currently very simple:
A push to a branch will build OpenBIOS binaries, and if it is the upstream openbios repository, generate a "latest" release
A push to a versioned release tag matching "v*" will build the OpenBIOS binaries and generate a versioned release
For an example of how this will look when merged take a look at the release page of my OpenBIOS fork on GitHub at https://github.com/mcayland/openbios/releases.
As a bonus once this has been merged and the openbios-builder image is pushed to ghcr.io it is possible to perform a local development build with simply:
git clone https://github.com/openbios/openbios.git docker run --rm -it -v "$(pwd)/openbios:/root" ghcr.io/openbios/openbios-builder:master cd /root ./config/scripts/switch-arch sparc32 && make V=1 ... ... exit
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Mark Cave-Ayland (4): docker: introduce Dockerfile.builder for openbios-builder container .github/workflows: add build-openbios-builder.yml action .github/workflows: add main.yml for building OpenBIOS upon push .github/workflows: add release.yml for generating an OpenBIOS release
.github/workflows/build-openbios-builder.yml | 42 ++++++++ .github/workflows/main.yml | 103 +++++++++++++++++++ .github/workflows/release.yml | 101 ++++++++++++++++++ docker/Dockerfile.builder | 19 ++++ 4 files changed, 265 insertions(+) create mode 100644 .github/workflows/build-openbios-builder.yml create mode 100644 .github/workflows/main.yml create mode 100644 .github/workflows/release.yml create mode 100644 docker/Dockerfile.builder
I'm planning on doing some more testing on this tomorrow, and will push this to master if everything looks good.
Some background for this work: a future aim of QEMU is to be able to build its own binary firmware images using a docker build image rather than the submitter having to include the binaries within the submodule update PR. Adding the builder image into a workflow also has the advantages that developers who have forked OpenBIOS on github now get build coverage when pushing branches, the docker build image means developers don't have to install their own cross-compilers locally, and pre-built binaries from the latest master are always available for download.
ATB,
Mark.