Reflashing BIOSes from Linux
From: Pádraig Brady
Date: Mon Aug 9 22:58:26 IST 2004
Subject: [TOTD] flash bios in linux
Today, I wanted to flash my BIOS from Linux. This was definitely not obvious to me so...
I've an Intel 82802AC chip, and, to write a new BIOS, I tried in this order:
- devbios at the OpenBIOS Project (took ages to compile and could only read not write)
- http://linux.dell.com/biosdisk/ (seemed like too much hassle)
- linux-mtd (needed cvs which took more than my 10m limit to compile)
- dosemu (after zapping emm, xmms, dpmi, I still got protection errors)
Then I noticed FreeBIOS. It supersedes OpenBIOS, and is in active development. (Note: I asked some questions on the OpenBIOS IRC channel, and was not directed towards FreeBIOS?). Anyway, you need to download the cvs tree, so:
cvs -d:pserver:anonymous at cvs.sourceforge.net:/cvsroot/freebios login cvs -z3 -d:pserver:anonymous at cvs.sourceforge.net:/cvsroot/freebios co freebios/util/flash_and_burn cd freebios/util/flash_and_burn/ && make && strip flash_rom
Now you can use the flash_rom binary to flash various BIOSes. For me, I did:
flash_rom -c 82802ac bios.bin -- Pádraig Brady - http://www.pixelbeat.org --- Following generated by rotagator --- To scroll the console (linux or xterm) use Shift+PgUp & Shift+PgDn
[RM adds: Pádraig also mentions elsewhere that the flash_utils (flash_lock and flashcp) from the mtd user space package will take snapshots of ROM contents. He also points out that one advantage of his general approach of using Linux instead of DOS/Windows is that you can upgrade BIOSes remotely. He also mentions the related /dev/nvram device:
# mknod /dev/nvram c 10 144 # insmod nvram Now one can read/write the 114 bytes of nvram. (14 of the 128 are for the RTC.) It also parses some of the info to /proc/driver/nvram.