Code:
./DumpPCIRom.sh: line 229: $((0x${PointerPCIDataStructure} - 28))*2: substring expression < 0
I also found the backup of the ROM my HBA came with and fed it to the script too:
Code:
./DumpPCIRom.sh: line 229: $((0x${PointerPCIDataStructure} - 28))*2: substring expression < 0
The difference between the two is that the factory ROM is an older version and will no longer allow booting on Mac for some reason (even with the matching firmware) after the HBA has been erased before (could be due to some specific NVRAM settings).
I'm attaching all the files in an archive for comparison:
bios_factory.rom — the ROM my adapter came with
bios_latest_official.rom — the latest ROM from the Broadcom website
bios_patched.rom — modified ROM with only Fcode in boot services
bios_current.rom — the ROM I currently use, which is bootable on PC and Mac alike
Only one question remains — with the janky way the current ROM is produced (flashing official->patched->official), is it put together correctly? If not, is it possible to do the same thing without mangling the ROM?
There's also the error in the script on line 229.