On 06.11.2009 15:40, Andreas Henriksson wrote:
Hello everybody!
I've been unsuccessful in updating by BIOS on my ASUS A8N-SLI Deluxe motherboard using flashrom. To my novice eyes it looks like the first 768kB has been erased and the rest left as is....
The first 384k were erased, but yes, you're suffering from partial erase.
Try this patch. It will work exactly once, and only for restoring (writing) the backed up BIOS. Any other operation will corrupt your flash chip even more. Do NOT use the patched flashrom for anything else. If we later ask you to perform some tests, make sure this patch has been undone.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Index: flashrom-fatal/sst_fwhub.c =================================================================== --- flashrom-fatal/sst_fwhub.c (Revision 756) +++ flashrom-fatal/sst_fwhub.c (Arbeitskopie) @@ -131,13 +131,13 @@ int write_sst_fwhub(struct flashchip *flash, uint8_t *buf) { int i; - int total_size = flash->total_size * 1024; + int total_size = flash->total_size * 1024 / 2; int page_size = flash->page_size; chipaddr bios = flash->virtual_memory; uint8_t blockstatus;
// FIXME: We want block wide erase instead of ironing the whole chip - if (erase_sst_fwhub(flash)) { + if (0 && erase_sst_fwhub(flash)) { fprintf(stderr, "ERASE FAILED!\n"); return -1; }