I'm working on a method to load fcode images from disk for PCI cards. It's currently only for Open Firmware 2.4 but can be adapted to other Open Firmware versions. It won't work for PCI cards that read their own ROM which is probably what the fcode for this SATA card does to load the real NDRV but maybe a work around can be made such as
@dosdude1 's method of replacing the stub NDRV with the real NDRV.
Here's the Open Firmware Extender I've been working on (only for Open Firmware 2.4)
1) Search
product/install_of_extender2.4.txt for
load ide/disk and change the partition number (currently
15) to the partition number (in decimal) of a HFS Standard partition on the master IDE drive of the first IDE channel . Use a text editor like BBEdit.app that preserves null characters.
2) Copy
install_of_extender2.4.txt and
of_extender2.4.bin from the
product folder to the root directory of the HFS Standard partition.
3) Boot into Open Firmware. Maybe set
input-device and
output-device to
ttya:57600.
4) Execute
load ide/disk@0:15,\install_of_extender2.4.txt (but first change the partition number). This will set
nvramrc and
use-nvramrc?
5) Shutdown and reboot. You should see that the
of_extender2.4.bin got loaded. It contains a few scripts that I've created in the past.
- "512MB BAR patch.of"
- "Open Firmware Trace.of"
- "print nvramrc.of"
- "dumphex.of"
- "dump-instance-chain.of"
- "lspci for Open Firmware.of"
- "calc-checksums.4th"
- "dump available and translations.of"
- "probe-ids.of"
- "find mapped mem ranges3.of"
- "Open Firmware list-partitions.of"
- "memory tests.of"
- "Open Firmware Fields.of"
- "extender2.4.of"
The scripts are executed one at a time to make patches or add words to the Open Firmware dictionary or whatever.
of_extender2.4.bin can contain a set of fcode images after all the scripts.
The last script
extender2.4.of adds some of the fcode images to the
>fcfiles list. These are automatically loaded for PCI cards that are missing an Open Firmware fcode image in their PCI Option ROM as long as the vendor ID, device ID, and classcode match:
- 0x3D3D 0x000A 0x030000 "build/GA12-ROM 2.6.2.fc"
Other fcode images in
of_extender2.4.bin are not added to the
>fcfiles list.
extender2.4.of may execute them to modify packages or anything.
- 100 "build/disk-label.fc"
- 101 "build/mac-files.fc"
The worksheet contains all the commands to create
of_extender2.4.bin.
Running the
Startup Disk control panel will overwrite the
nvramrc, so you may want to update the
OFpt resource in the
Startup Disk control panel so that it contains the same nvramrc that is installed by
install_of_extender2.4.txt. There's a
Create Startup Disk with new nvramrc section in the
OpenFirmwareExtender.worksheet that creates a new Startup Disk control panel with the modification.
The same would have to be done for XPostFacto's
OFpt resource.
To Do:
- Convert worksheet to makefile.
- Add support for other versions of Open Firmware. Earlier versions may require reading directly from a partition (block read) instead of a file system.
- ...