Hotswap BIOS flashing and network boot ROMs
None of the information on this web page comes with any warranty of any kind. Read the full Disclaimer for more information.
What is Hotswap BIOS flashing
Just about all motherboards come with the ability to flash their own BIOS rom. The purpose behind this is so that motherboard manufacturers can provide BIOS updates to rectify any issues once the board is released. So effectively, a motherboard has a builtin flash ROM programmer. The idea behind Hotswap BIOS flashing is that you use the motherboard to program another Flash chip other than the proper BIOS chip on the motherboard. In my case, I wanted to program a FLASH chip with code for a Etherboot Network boot rom.
Scrounging for parts
I recently bought some Realtek 8139 based LAN cards. Each of these has a 32 pin DIP socket for a BOOT rom. An Etherboot boot rom for one of these cards only needs to be 16k. Usually you would program a 16k EPROM for the job. Thankfully, most old Socket 7 and Slot 1 motherboards also use a 32 pin DIP FLASH rom. In my experience, Socket 7 boards tend to have 128K FLASH roms, and Slot 1 boards tend to have 256k roms. You can probably find some old broken motherboards at a Computer Market for a few dollars each (and the FLASH rom is probably not the reason the board is broken). The fact that these FLASH roms are much bigger than we need doesn't really matter. The main reason we are using them is the simplicity in finding them (in junk piles) and the low cost.
Here's a picture of a 128k FLASH rom on my test motherboard:
The part number is AE29F1008-15. The important thing to me is the '1' in the middle. Based on it, its a fair bet its a 128k part (I also have a 29EE010 which is 128k). Different manufacturers have different part numbers. If there is a '2' in there, then its probably a 256k chip, if there is a 4 then its probably a 512k chip (but you're unlikely to find one of these). The majority of modern motherboards (from the Socket 370 era forward) have a PLCC type socketed Flash ROM chip which can't be used on a network card anyway, so avoid them.
Of course, as well as finding an old 128k or 256k flash rom chip, you will also need a working motherboard with a 32 pin DIP socketed FLASH rom in order to program it. Again, you should aim for an old Socket 7 (Pentium 1 era) or Slot 1 motherboard. Here's the motherboard I used for this article:
Its actually a PCChips M571 sorta kinda Super Socket 7 board with a Cyrix 333 on it.
In a nutshell this is what we'll do:
- make up a DOS boot floppy containing Uniflash and the code you want to flash to your FLASH rom.
- Setup your working motherboard on a bench so you have easy access to the BIOS rom. Lever the BIOS rom out of its socket and then push it in enough so that the motherboard will power on properly.
- Boot the working motherboard from your DOS floppy
- Remove the working BIOS rom while everything is powered on.
- Put in the FLASH rom you want to write to.
- Run Uniflash to write your code to the Flash rom.
- Power off and put back your working motherboards BIOS rom.
Of course the true test is to take your new FLASH rom and put it into the BOOT rom socket of your LAN card (again making sure pin1 is lined up correctly). Mine worked first go pretty much (well I had to go into the motherboards setup menus and choose to boot from 'NETWORK', but most other motherboards don't need any changes).
Setting up the DOS floppy
Obviously you will need DOS, win95, win98 or win ME in order to make a bootable DOS disk. You might also be able to find some sites with dowloadable images of bootable DOS floppies. You just need to copy uniflash.exe to the floppy as well as a file containing the binary data you want copied to the FLASH rom.
It is quite simple to obtain the etherboot binary code. Just go to ROM-O-MATIC and go through the menus to select the chipset and the type of boot rom you want. In my case I just chose the RTL8139 chipset and pretty much used the defaults for everything else. You'll then download a 16k file.
Due to the fact that the Network card's BOOT rom socket may or may not have been set up with 128k FLASH roms in mind, I thought I'd increase my chances of it working first go by replicating the 16k image throughout the 128k. In linux I just did this:
cat $R $R $R $R $R $R $R $R >128k.rom
make sure this 128k.rom file is on the floppy.
Lever the working BIOS chip out and reseat it
Some folk may have a 'chip puller' which simplifies extracting chips from circuit boards. If you're cheap you'll do it with a screwdriver like me. With your working motherboard on your workbench, orient it so you can get a screwdriver under the BIOS rom. Make sure the motherboard is powered off and use a flathead screwdriver to lever it out bit by bit. Lever it from one side:
and then the other:
and then repeat from the other side. If you've never done this before you'll probably want to force the bloody thing, but just lever it little by little from each side. The pins on the side of the chip are fragile and you do not want to break them. Remember this is your WORKING BIOS rom. If you can't get a screwdriver under one end, try using the flat blade of a knife to lever it enough so you can get a screwdriver in.
Eventually you should have the chip mostly out:
I recommend removing it entirely first and then pushing it lightly back into its socket. The point is that in a few short moments we'll remove the chip entirely while the system is running and we want to make it as easy as possible. Its also smart at this point to note that there is a small cutout on the top of most DIP chips which identifies which end has pin 1 on it. You do not want to put a FLASH rom in the wrong way around with pin 1 down the wrong end.
make sure you have a power supply, video card and floppy drive plugged into your motherboard and power it on. Make sure it does power on. if it doesn't, then try pushing the BIOS rom into its socket a bit more and power on again.
Now let it boot from your boot floppy containing UNIFLASH.
Remove the BIOS rom
At this stage the system is live, the BIOS rom would have been copied to RAM shortly after you turned it on, so it is safe (you be the judge) to remove the BIOS rom. The key point to remember is to make sure you DON'T LET YOUR SCREWDRIVER TOUCH ANY OF THE BIOS ROM PINS (or anything metal for that matter). You should hopefully be able to quickly remove the BIOS rom and put it to one side. You can press ENTER a few times to confirm that the system is indeed still working minus your BIOS rom.
Insert the other FLASH rom
Make sure you have pin 1 of the FLASH rom at the right end and lightly insert it into the motherboards BIOS socket. you don't have to fully insert it.
Now run UNIFLASH from your A: prompt. Its menu oriented and should come up and tell you what kind of FLASH rom you have (and what size it is).
One of UNIFLASH's options is to write to the FLASH rom. Choose it and enter the name of the file you want to write (eg. 128k.rom). You might get quized about overwriting the bootblock. Just say Yes. It should now chug away and verify the writing process as well.
Since writing this, I've noticed a strange anomaly in how uniflash works (well at least the version I have). Sometimes I would find that the flashing would fail (generally in the verify phase), but if I ran uniflash non-interactively by something like:
uniflash -e 128k.rom
then the flashing would work perfectly. I was able to flash a 512k flash rom this way.
Power Down and reinsert the BIOS FLASH rom
Turn it off. Now you can take your time removing your newly flashed FLASH rom, and put back the original BIOS rom, making sure you have pin1 in the right place.
pablo , 2004-08-30 02:06:49