mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-20 04:32:41 +02:00
build/release/roms: simplify strip_rom_image()
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
+17
-27
@@ -185,36 +185,26 @@ strip_ucode()
|
|||||||
|
|
||||||
strip_rom_image()
|
strip_rom_image()
|
||||||
{
|
{
|
||||||
romfile=${1}
|
[ -f "${1}" ] || return 0
|
||||||
|
[ "${CONFIG_HAVE_ME_BIN}" != "y" ] || \
|
||||||
[ -f "${romfile}" ] || return 0
|
"${ifdtool}" --nuke me "${1}" -O "${1}" || \
|
||||||
|
err "strip_rom_images: ${1}: cannot nuke Intel ME"
|
||||||
if [ "${CONFIG_HAVE_ME_BIN}" = "y" ]; then
|
[ "${CONFIG_HAVE_MRC}" != "y" ] || \
|
||||||
"${ifdtool}" --nuke me "${romfile}" -O "${romfile}" || \
|
"${cbfstool}" "${1}" remove -n mrc.bin || \
|
||||||
err "strip_rom_images: ${romfile}: cannot nuke Intel ME"
|
err "strip_rom_images: ${1}: cannot nuke mrc.bin"
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${CONFIG_HAVE_MRC}" = "y" ]; then
|
|
||||||
"${cbfstool}" "${romfile}" remove -n mrc.bin || \
|
|
||||||
err "strip_rom_images: ${romfile}: cannot nuke mrc.bin"
|
|
||||||
"${cbfstool}" "${romfile}" print || :
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${CONFIG_KBC1126_FIRMWARE}" = "y" ]; then
|
|
||||||
"${cbfstool}" "${romfile}" remove -n ecfw1.bin || \
|
|
||||||
err "strip_rom_images: ${romfile}: can't nuke ecfw1.bin"
|
|
||||||
"${cbfstool}" "${romfile}" remove -n ecfw2.bin || \
|
|
||||||
err "strip_rom_images: ${romfile}: can't nuke ecfw2.bin"
|
|
||||||
fi
|
|
||||||
|
|
||||||
[ "${CONFIG_INCLUDE_SMSC_SCH5545_EC_FW}" != "y" ] || \
|
[ "${CONFIG_INCLUDE_SMSC_SCH5545_EC_FW}" != "y" ] || \
|
||||||
"${cbfstool}" "${romfile}" remove -n sch5545_ecfw.bin || \
|
"${cbfstool}" "${1}" remove -n sch5545_ecfw.bin || \
|
||||||
err "strip_rom_images: ${romfile}: can't nuke sch5545ec fw"
|
err "strip_rom_images: ${1}: can't nuke sch5545ec fw"
|
||||||
|
if [ "${CONFIG_KBC1126_FIRMWARE}" = "y" ]; then
|
||||||
|
"${cbfstool}" "${1}" remove -n ecfw1.bin || \
|
||||||
|
err "strip_rom_images: ${1}: can't nuke ecfw1.bin"
|
||||||
|
"${cbfstool}" "${1}" remove -n ecfw2.bin || \
|
||||||
|
err "strip_rom_images: ${1}: can't nuke ecfw2.bin"
|
||||||
|
fi
|
||||||
# TODO: replace this board-specific hack
|
# TODO: replace this board-specific hack
|
||||||
if [ "${target}" = "e6400_4mb" ]; then
|
if [ "${target}" = "e6400_4mb" ]; then
|
||||||
"${cbfstool}" "${romfile}" remove -n "pci10de,06eb.rom" || \
|
"${cbfstool}" "${1}" remove -n "pci10de,06eb.rom" || \
|
||||||
err "strip_rom_images: ${romfile}: can't nuke e6400 vga rom"
|
err "strip_rom_images: ${1}: can't nuke e6400 vga rom"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user