Build EC as a submodule, specifying version

For models that use System76 EC, we want to have the board version and
the EC version matich.

Ref: https://github.com/system76/firmware-open/issues/75
This commit is contained in:
Tim Crawford
2020-04-06 14:49:40 -06:00
committed by Jeremy Soller
parent e7c4683565
commit f4f4d5b61d
9 changed files with 34 additions and 1 deletions

14
scripts/_build/ec.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -e
if [ -z "$1" -o ! -e "$1" -o -z "$2" ]
then
echo "$0 <config> <output>" >&2
exit 1
fi
source "$1"
make -C ec clean
make -C ec BOARD=${BOARD} VERSION=${VERSION} -j $(nproc)
cp "ec/build/${BOARD}/${VERSION}/ec.rom" "$2"