commit d3a01834708b407c00a06e5f701631698be59617 Author: Michał Kopeć Date: Fri Feb 16 13:47:09 2024 +0100 initial commit Signed-off-by: Michał Kopeć diff --git a/README.md b/README.md new file mode 100644 index 0000000..1091ad7 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# fwbuild + +Build firmware binaries, easily. diff --git a/example/FWBUILD b/example/FWBUILD new file mode 100644 index 0000000..47725d9 --- /dev/null +++ b/example/FWBUILD @@ -0,0 +1,28 @@ +romname=novacustom-nv4x-heads +_tag=0.9.0 +romver=${_tag//-/} +romrel=2 +pkgdesc='Heads firmware for NovaCustom NV4x' +arch=(x86_64) +license=(GPL2) +container=3mdeb/heads-docker:3.0.1 +srcname=heads +_tag=novacustom_nv4x_adl_v0.9.0-rc2 +source=https://github.com/Dasharo/$srcname.git + +# preparation, checkout, applying patches, etc +prepare() { + echo "=> PREPARE" + git checkout $_tag +} + +# do the build, this is executed inside of the docker container +build() { + echo "=> BUILD" + make BOARD=nitropad-nv41 +} + +# copy and rename the binary, create zip, checksums, uefi capsule +package() { + echo "=> PACKAGE" +} diff --git a/example/README.md b/example/README.md new file mode 100644 index 0000000..b79b2c9 --- /dev/null +++ b/example/README.md @@ -0,0 +1,5 @@ +# Example + +Example FWBUILD file for NovaCustom NV4x ADL Heads v0.9.0. + +In this directory, run `makefw`. The result should be a complete firmware binary. diff --git a/makefw b/makefw new file mode 100755 index 0000000..52f8327 --- /dev/null +++ b/makefw @@ -0,0 +1,18 @@ +#!/bin/bash + +source FWBUILD + +mkdir -p src +cd src + +if [ -d $srcname ]; then + echo "Source already present, skipping" +else + git clone $source +fi + +cd $srcname + +declare -f build > .fwbuild + +docker run --rm -it -v $PWD:$PWD -w $PWD $container bash -c "source .fwbuild && build"