initial commit

Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
This commit is contained in:
Michał Kopeć
2024-02-16 13:47:09 +01:00
commit d3a0183470
4 changed files with 54 additions and 0 deletions

3
README.md Normal file
View File

@@ -0,0 +1,3 @@
# fwbuild
Build firmware binaries, easily.

28
example/FWBUILD Normal file
View File

@@ -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"
}

5
example/README.md Normal file
View File

@@ -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.

18
makefw Executable file
View File

@@ -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"