Files
system76-firmware-open/scripts/_build/ec.sh
Tim Crawford 569321f9ac scripts: Set EC build dir
Specify the EC build directory so that it does not require the model or
version to be determined in the script.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-10-11 19:05:16 -06:00

21 lines
354 B
Bash
Executable File

#!/usr/bin/env bash
set -e
if [ -z "$1" -o ! -e "$1" -o -z "$2" ]
then
echo "$0 <config> <output>" >&2
exit 1
fi
EC_ARGS=()
while read line; do
if [[ "$line" != "#"* ]]; then
EC_ARGS+=("$line")
fi
done < "$1"
make -C ec clean
make -C ec VERSION="${VERSION}" "${EC_ARGS[@]}" BUILD=build -j "$(nproc)"
cp "ec/build/ec.rom" "$2"