diff --git a/scripts/_build/coreboot.sh b/scripts/_build/coreboot.sh index 8b0c9e6..611a09c 100755 --- a/scripts/_build/coreboot.sh +++ b/scripts/_build/coreboot.sh @@ -17,6 +17,19 @@ pushd coreboot >/dev/null fi make distclean make defconfig KBUILD_DEFCONFIG="${CONFIG}" + + # Ensure config is correct + while read line; do + if [[ "${line}" =~ "^#" ]] || [[ -z "${line}" ]]; then + continue + fi + + if ! grep -q "${line}" ".config"; then + echo "expected config not found: ${line}" >&2 + exit 1 + fi + done < "${CONFIG}" + make --jobs="$(nproc)" cp -v "build/coreboot.rom" "${COREBOOT}" popd >/dev/null