Dear flashrom folks,
first thanks to stefanct and patrickg in #flashrom.
I tried to upgrade the BIOS of the ASRock A780FullHD [1] from version 1.00 to 1.70 [2].
To keep the MAC address of the board I compared the the 1.00 image read with flashrom from my board and 1.00 vendor image from [2]. After converting them with `od -tx1 -Ax` I compared both with `diff -u`.
$ diff -u /tmp/vendor /tmp/myimage --- /tmp/3 2012-07-25 17:00:51.000000000 +0200 +++ /tmp/4 2012-07-25 17:22:56.000000000 +0200 @@ -50239,6 +50239,47 @@ 0dfff0 53 43 30 38 30 30 00 c0 8d d6 44 2b 14 00 fe 3f 0e0000 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff * +0ec000 05 00 00 00 00 08 00 00 10 00 01 ff ff ff ff ff +0ec010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +* +0ec800 00 80 01 00 40 00 00 08 10 00 01 ff ff ff ff ff +0ec810 00 19 66 8b 09 1a 2e ff ff ff ff ff ff ff ff ff +0ec820 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +* +0ec840 81 00 02 00 00 03 40 08 10 00 01 ff ff ff ff ff +0ec850 10 04 01 00 01 00 00 00 01 00 40 00 01 00 80 00 +0ec860 01 00 a0 00 00 00 00 00 00 00 00 00 01 00 c0 00 +0ec870 01 00 e0 00 e0 3f 38 00 e0 3f 18 00 00 00 00 00 +0ec880 e0 3f 18 00 46 00 00 00 00 00 00 00 25 20 00 00 +0ec890 13 91 16 0c 20 12 a2 20 69 80 10 37 ff 02 00 ae +0ec8a0 03 00 00 00 00 00 2f 01 00 00 00 00 00 00 00 00 +0ec8b0 01 ff ff ff 22 13 11 10 15 15 15 15 15 14 14 15 +0ec8c0 15 00 00 00 00 2f 34 10 16 15 15 15 15 15 16 15 +0ec8d0 16 00 00 00 39 00 00 00 16 00 00 00 39 00 00 00 +0ec8e0 39 00 00 00 39 00 00 00 22 12 11 20 16 16 16 16 +0ec8f0 16 16 16 16 16 00 00 00 00 2f 2b 00 15 15 15 15 +0ec900 14 14 14 15 15 00 00 00 3b 00 00 00 3b 00 00 00 +0ec910 3b 00 00 00 3b 00 00 00 ef be ad de 01 ff ff ff +0ec920 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +* +0ecb40 08 00 03 00 eb 00 40 0b 10 00 01 ff ff ff ff ff +0ecb50 ff 04 20 08 8b 31 00 00 00 00 00 00 00 00 00 00 +0ecb60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +0ecb80 00 00 04 48 48 52 52 43 43 55 55 00 00 00 00 00 +0ecb90 00 00 00 01 00 02 03 04 05 06 07 00 00 00 00 02 +0ecba0 3d f7 75 18 00 00 00 00 00 00 00 00 00 00 00 00 +0ecbb0 00 00 00 00 00 00 00 00 01 00 02 03 04 05 06 07 +0ecbc0 08 09 0a 0b 00 00 00 00 01 52 5c 00 00 00 00 00 +0ecbd0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0ecbe0 00 00 00 00 00 00 01 02 03 00 01 02 03 00 01 02 +0ecbf0 03 04 05 00 00 00 00 02 58 cc 42 ca 00 00 00 00 +0ecc00 00 01 02 03 00 00 00 00 01 d1 6a 00 00 00 00 00 +0ecc10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 02 +0ecc20 03 04 05 06 07 08 09 00 00 00 00 0d 00 04 00 10 +0ecc30 03 2b 0c 10 00 01 ff ff ff ff ff ff ff ff ff ff +0ecc40 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff +* 0f0000 5e 9f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0f0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 *
The MAC address is stored in the line
+0ec810 00 19 66 8b 09 1a 2e ff ff ff ff ff ff ff ff ff
although it is not clear what the `2e` means.
So the vendor image leaves the area from 0e0000 to 0effff filled with ff. I would guess that on my board that area is filled with the chosen configurations in the BIOS setup menu.
To keep that configuration I thought to not overwrite that area (0e0000– 0effff). The layout stuff in flashrom makes that possible.
$ more asrock-a780fullhd-BIOS-flashrom.layout 000000:0dffff vendor1 0e0000:0effff custom 0f0000:0fffff vendor2 $ sudo ./flashrom -p internal --layout asrock-a780fullhd-BIOS-flashrom.layout --image vendor1 --image vendor2 -w A780FHD1.70 -o flashrom-w-A780FHD1.70.txt
That worked without problem and reboot worked. The BIOS options were still reset to default due to some checksum error or other check stored in CMOS(?) or NVRAM(?). Starting Debian then worked.
But after being happy suddenly the system just shut down after around twelve minutes. I heard some click sound from the case (like when rebooting or so) and the monitor just went black. The fans – I do not know which, probably from the power supply – were still running. I turned off the system by holding the power button for ten seconds.
I did not find anything in the system logs. So it might be due to the new BIOS version 1.70, some random Debian error, I did not experience before and just happened by coincident, or something else. Although the timing after the BIOS upgrade and the running fans point to the BIOS in my opinion.
Starting the system worked luckily and to not take any chances, I wrote the 1.00 BIOS image, which I had read with flashrom from the board in the very beginning, to the chip.
Shutting down the system and starting it again did not work. Nothing on the monitor. Luckily turning the system off again and plugging out the power cord worked. Though note that the BIOS setting were again lost and set back to the defaults. This is probably again due to some checksum stored in CMOS/NVRAM(?).
So all in all this is very strange. Especially since it looks like the BIOS settings were reset after each upgrade and downgrade process.
If you have any ideas what happened here, I will be happy to hear them. Maybe in the future I will try upgrading again but maybe first write the pure vendor image overwriting all of the flash chip and later on trying to get the MAC address back.
Thanks,
Paul
[1] http://www.asrock.com/mb/overview.asp?Model=A780FullHD [2] http://www.asrock.com/mb/download.asp?Model=A780FullHD&o=BIOS
Thanks for the write-up of your experience hopefully it might help others in the future. Most of your story sounds like persistent (config) data in CMOS + a stupid vendor firmware is the culprit, but that is not a big help, i know, sorry :)
I have added your board to our list because technically speaking flashrom worked correctly. I have added a note with a link to this thread though for obvious reasons, thanks for your report!