Support building images from outside of coreboot tree

This commit is contained in:
Jeremy Soller
2019-05-02 14:42:31 -06:00
parent de9fef3d89
commit 37f650fc67
5 changed files with 918 additions and 0 deletions

19
scripts/_build/coreboot.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/env bash
set -e
if [ -z "$1" -o ! -e "$1" -o -z "$2" ]
then
echo "$0 [coreboot.config] [coreboot.rom]" >&2
exit 1
fi
CONFIG="$(realpath "$1")"
COREBOOT="$(realpath "$2")"
pushd coreboot >/dev/null
make CPUS="$(nproc)" crossgcc-i386
make distclean
cp -v "${CONFIG}" .config
make --jobs="$(nproc)"
cp -v "build/coreboot.rom" "${COREBOOT}"
popd >/dev/null