Today i've got the following error message while trying to write to a winbond W39V040A chip:
root@security:~/flashrom# ./flashrom -w 49LF040B.bin flashrom v0.9.0-r665 No coreboot table found. Found chipset "NVIDIA MCP51", enabling flash write... OK. This chipset supports the following protocols: Non-SPI. Calibrating delay loop... OK. Found chip "Winbond W39V040A" (512 KB, LPC) at physical address 0xfff80000. Flash image seems to be a legacy BIOS. Disabling checks. Writing flash chip... ERASE FAILED at 0x00000000! Expected=0xff, Read=0x49, failed byte count from 0x00000000-0x0007ffff: 0x45d42 ERASE FAILED! ERASE FAILED! Verifying flash... VERIFY FAILED at 0x00000000! Expected=0x21, Read=0x49, failed byte count from 0x00000000-0x0007ffff: 0x6bf33
Oliver
If writing failed, verifying is pointless. Abort instead.
On 23.07.2009 22:46, Oliver Niesner wrote:
Writing flash chip... ERASE FAILED at 0x00000000! Expected=0xff, Read=0x49, failed byte count from 0x00000000-0x0007ffff: 0x45d42 ERASE FAILED! ERASE FAILED! Verifying flash... VERIFY FAILED at 0x00000000! Expected=0x21, Read=0x49, failed byte count from 0x00000000-0x0007ffff: 0x6bf33
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Index: flashrom-no_verify_after_failed_write/flashrom.c =================================================================== --- flashrom-no_verify_after_failed_write/flashrom.c (Revision 665) +++ flashrom-no_verify_after_failed_write/flashrom.c (Arbeitskopie) @@ -851,12 +851,17 @@ fprintf(stderr, "Error: flashrom has no write function for this flash chip.\n"); return 1; } - ret |= flash->write(flash, buf); - if (!ret) printf("COMPLETE.\n"); + ret = flash->write(flash, buf); + if (ret) { + fprintf(stderr, "FAILED!\n"); + return 1; + } else { + printf("COMPLETE.\n"); + } }
if (verify_it) - ret |= verify_flash(flash, buf); + ret = verify_flash(flash, buf);
programmer_shutdown();
Carl-Daniel Hailfinger schrieb:
If writing failed, verifying is pointless. Abort instead.
On 23.07.2009 22:46, Oliver Niesner wrote:
Writing flash chip... ERASE FAILED at 0x00000000! Expected=0xff, Read=0x49, failed byte count from 0x00000000-0x0007ffff: 0x45d42 ERASE FAILED! ERASE FAILED! Verifying flash... VERIFY FAILED at 0x00000000! Expected=0x21, Read=0x49, failed byte count from 0x00000000-0x0007ffff: 0x6bf33
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Index: flashrom-no_verify_after_failed_write/flashrom.c
--- flashrom-no_verify_after_failed_write/flashrom.c (Revision 665) +++ flashrom-no_verify_after_failed_write/flashrom.c (Arbeitskopie) @@ -851,12 +851,17 @@ fprintf(stderr, "Error: flashrom has no write function for this flash chip.\n"); return 1; }
ret |= flash->write(flash, buf);
if (!ret) printf("COMPLETE.\n");
ret = flash->write(flash, buf);
if (ret) {
fprintf(stderr, "FAILED!\n");
return 1;
} else {
printf("COMPLETE.\n");
}
}
if (verify_it)
ret |= verify_flash(flash, buf);
ret = verify_flash(flash, buf);
programmer_shutdown();
Acked-by: Oliver Niesner oli@rhce.servebbs.net
On 24.07.2009 12:09, Oliver Niesner wrote:
Carl-Daniel Hailfinger schrieb:
If writing failed, verifying is pointless. Abort instead.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Acked-by: Oliver Niesner oli@rhce.servebbs.net
Thanks, r666.
Regards, Carl-Daniel