diff options
author | Leah Rowe <leah@libreboot.org> | 2023-08-28 11:41:38 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2023-08-28 11:41:38 +0100 |
commit | 6dbddf852ca291892d9e77456939c65653243ac4 (patch) | |
tree | 7d70f5bc4aa6b1db8d73e63d898444ed181b87b4 /script/build/boot/roms_helper | |
parent | f5787c9e50cafac43160651d4496c856931bc650 (diff) |
build/boot/roms: simplify ich9m ifd handling
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script/build/boot/roms_helper')
-rwxr-xr-x | script/build/boot/roms_helper | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/script/build/boot/roms_helper b/script/build/boot/roms_helper index 561af644..71e170a4 100755 --- a/script/build/boot/roms_helper +++ b/script/build/boot/roms_helper @@ -596,25 +596,21 @@ moverom() { fi for romsize in 4 8 16; do - ifdgbe="descriptors/ich9m/ich9fdgbe_${romsize}m.bin" - if [ "${cuttype}" = "${romsize}MiB ICH9 IFD NOR flash" ]; then - [ -f "${ifdgbe}" ] || \ - ./build descriptors ich9m || \ - err "moverom: cannot create ich9m ifd" - dd if="${ifdgbe}" of="${newrompath}" bs=12k count=1 \ - conv=notrunc || \ - err "moverom: cant insert ich9m ifd" - fi - cmpstr="${romsize}MiB ICH9 IFD NOGBE NOR flash" - ifdgbe="descriptors/ich9m/ich9fdnogbe_${romsize}m.bin" - if [ "${cuttype}" = "${cmpstr}" ]; then - [ -f "${ifdgbe}" ] || \ - ./build descriptors ich9m || \ - err "moverom: cannot create ich9m ifd" - dd if="${ifdgbe}" of="${newrompath}" bs=4k count=1 \ - conv=notrunc || \ - err "moverom: cant insert ich9m ifd" - fi + ifddir="descriptors/ich9m" + for bs in "4" "12"; do + ifdgbe="${ifddir}/ich9fdnogbe_${romsize}m.bin" + cmpstr="${romsize}MiB ICH9 IFD NOGBE NOR flash" + if [ "${bs}" = "12" ]; then + cmpstr="${romsize}MiB ICH9 IFD NOR flash" + ifdgbe="${ifddir}/ich9fdgbe_${romsize}m.bin" + fi + [ "${cuttype}" = "${cmpstr}" ] || continue + [ -f "${ifdgbe}" ] || ./build descriptors ich9m || \ + err "moverom: cannot create ich9m ifd" + dd if="${ifdgbe}" of="${newrompath}" bs=${bs}k count=1 \ + conv=notrunc || err "moverom: cant insert ich9m ifd" + done + done if [ "${cuttype}" = "i945 laptop" ]; then |