scripts/generate.sh: Do not require firmware.rom
This commit is contained in:
committed by
Jeremy Soller
parent
ad2d818403
commit
bb877392e2
@@ -6,19 +6,23 @@ set -e
|
|||||||
|
|
||||||
SCRIPT_DIR=$(dirname "$0")
|
SCRIPT_DIR=$(dirname "$0")
|
||||||
|
|
||||||
if [ -z "$1" ] || [ -z "$2" ]
|
if [ -z "$1" ]
|
||||||
then
|
then
|
||||||
echo "$0 <model> <firmware.rom> [ec.rom]" >&2
|
echo "$0 <model> [firmware.rom] [ec.rom]" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
MODEL="$1"
|
MODEL="$1"
|
||||||
|
|
||||||
|
BIOS_IMAGE=
|
||||||
|
if [ -n "$2" ]
|
||||||
|
then
|
||||||
if [ ! -f "$2" ]
|
if [ ! -f "$2" ]
|
||||||
then
|
then
|
||||||
echo "Could not find BIOS image '$2'" >&2
|
echo "Could not find BIOS image '$2'" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
BIOS_IMAGE=$(realpath "$2")
|
BIOS_IMAGE=$(realpath "$2")
|
||||||
|
fi
|
||||||
|
|
||||||
EC_ROM=
|
EC_ROM=
|
||||||
if [ -n "$3" ]
|
if [ -n "$3" ]
|
||||||
@@ -51,6 +55,8 @@ sudo ./tools/coreboot-collector/target/release/coreboot-collector > "${MODEL_DIR
|
|||||||
${SCRIPT_DIR}/coreboot-gpio.sh "${MODEL_DIR}/coreboot-collector.txt" > "${MODEL_DIR}/gpio.h"
|
${SCRIPT_DIR}/coreboot-gpio.sh "${MODEL_DIR}/coreboot-collector.txt" > "${MODEL_DIR}/gpio.h"
|
||||||
${SCRIPT_DIR}/coreboot-hda.sh "${MODEL_DIR}/coreboot-collector.txt" > "${MODEL_DIR}/hda_verb.c"
|
${SCRIPT_DIR}/coreboot-hda.sh "${MODEL_DIR}/coreboot-collector.txt" > "${MODEL_DIR}/hda_verb.c"
|
||||||
|
|
||||||
|
if [ -n "${BIOS_IMAGE}" ]
|
||||||
|
then
|
||||||
# Get the flash descriptor and Intel ME blobs
|
# Get the flash descriptor and Intel ME blobs
|
||||||
make -C coreboot/util/ifdtool
|
make -C coreboot/util/ifdtool
|
||||||
coreboot/util/ifdtool/ifdtool -x "${BIOS_IMAGE}"
|
coreboot/util/ifdtool/ifdtool -x "${BIOS_IMAGE}"
|
||||||
@@ -58,6 +64,7 @@ coreboot/util/ifdtool/ifdtool -x "${BIOS_IMAGE}"
|
|||||||
mv flashregion_0_flashdescriptor.bin "${MODEL_DIR}/fd.rom"
|
mv flashregion_0_flashdescriptor.bin "${MODEL_DIR}/fd.rom"
|
||||||
mv flashregion_2_intel_me.bin "${MODEL_DIR}/me.rom"
|
mv flashregion_2_intel_me.bin "${MODEL_DIR}/me.rom"
|
||||||
rm -f flashregion_*.bin
|
rm -f flashregion_*.bin
|
||||||
|
fi
|
||||||
|
|
||||||
# Get the Video BIOS Table for Intel systems
|
# Get the Video BIOS Table for Intel systems
|
||||||
if sudo [ -e /sys/kernel/debug/dri/0/i915_vbt ]
|
if sudo [ -e /sys/kernel/debug/dri/0/i915_vbt ]
|
||||||
|
Reference in New Issue
Block a user