scripts: Always set EC build dir

Building EC was broken as the build output from the previous board was
not being cleaned. `BUILD` is now always set, defaulting to "build",
instead of only when `BOARD` is specified. For good measure, add it
to the clean command in case a custom path is used.

Fixes: 569321f9ac ("scripts: Set EC build dir")
Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
Tim Crawford
2023-10-12 12:52:30 -06:00
committed by Jeremy Soller
parent c4df2f4005
commit c1dafbbfad
2 changed files with 6 additions and 4 deletions

2
ec

Submodule ec updated: 946415f3a7...01be30f107

View File

@ -15,6 +15,8 @@ while read line; do
fi
done < "$1"
make -C ec clean
make -C ec VERSION="${VERSION}" "${EC_ARGS[@]}" BUILD=build -j "$(nproc)"
cp "ec/build/ec.rom" "$2"
BUILD_DIR="build"
make -C ec BUILD="$BUILD_DIR" clean
make -C ec VERSION="${VERSION}" "${EC_ARGS[@]}" BUILD="$BUILD_DIR" -j "$(nproc)"
cp "ec/$BUILD_DIR/ec.rom" "$2"