Wednesday, October 14, 2009

Linux BIOS flash program

One of my many complaints about computers is BIOS upgrades. First, they usually require a floppy drive. Who uses those anymore??? Second, they usually require a bootable, DOS-formatted floppy disk. That's not too convenient if you never buy a Windows license.

If you're not using Windows, then you have a few choices:
- format your floppy disk using FreeDOS
- set up a bootloader entry with a FreeDOS image containing the BIOS update
- create a bootable CD with the FreeDOS image

Assuming the first option works, you'll still need a floppy drive. If you use the other methods and it fails, good luck explaining what FreeDOS is to your motherboard tech support agent!

There is another way that worked for me: flashrom. This is a program that can be used to program many kinds of ROMs, including BIOS chips. The list of supported motherboards at showed support for the ASUS A8V-E Deluxe and SE boards. I have a plain ol' A8V, so I figured it was likely to work.

I first backed up my current BIOS image
$ sudo flashrom -r A8V-GOOD.ROM
flashrom v0.9.1-r706
No coreboot table found.
Found chipset "VIA VT8237", enabling flash write... OK.
This chipset supports the following protocols: Non-SPI.
Calibrating delay loop... OK.
Found chip "PMC Pm49FL004" (512 KB, LPC,FWH) at physical address 0xfff80000.
Reading flash... done.



Then I unzipped the latest ASUS BIOS image and loaded it up.
$ sudo flashrom -w A8V-0229.ROM
flashrom v0.9.1-r706
No coreboot table found.
Found chipset "VIA VT8237", enabling flash write... OK.
This chipset supports the following protocols: Non-SPI.
Calibrating delay loop... OK.
Found chip "PMC Pm49FL004" (512 KB, LPC,FWH) at physical address 0xfff80000.
Flash image seems to be a legacy BIOS. Disabling checks.
Writing flash chip... Programming page: 0007 at address: 0x00070000
COMPLETE.
Verifying flash... VERIFIED.


When I rebooted, the BIOS complained that the checksum didn't match, so I loaded up the default settings. The upgrade was successful and it's running great!

Oddly enough, I trust the gurus on the flashrom mailing list more than I would most motherboard tech support agents. I've been lurking on the list for a few days and they're very quick to answer questions and help with issues. Long live open source.

No comments: