Hi to all,
I used flashrom to flash the BIOS on a AxiomTek SBC84500, which mounts a Winbond W29C020C. All is recognized fine, but the flashing fails.
# flashrom -v -w axiom.bin No LinuxBIOS table found. Enabling flash write on CS5530...OK W29C020C found at physical address: 0xfffc0000 Flash part is S29C51002T (256 KB) Flash image seems to be a legacy BIOS. Disabling checks. Programming Page: 2047 at address: 0x0003ff80 Verifying flash - FAILED.
Trying fo find out the cause of the failure I eventually found a grave error in jedec.c, at write_page_write_jedec(). The code:
if (*src == 0xFF) continue; *dst++ = *src++;
is, of course, wrong. It should be
if (*src != 0xFF ) *dst = *src; dst++; src++;
I include a patch which fixes this error. But this is not enough. Sector writes sometimes fail, so included a check/rewrite code similar to write_byte_program_jedec(). Maybe this is not the best way to do the task, but at least for me works :)
Furthermore, the patch adds support for the SyncMos S29C51002T 256K flash. Tested successfully on a Boser HS-2603. It is high probable that the same configuration would work with all the chips of the same family.
# flashrom -v -w boser.bin No LinuxBIOS table found. Enabling flash write on CS5530...OK S29C51002T found at physical address: 0xfffc0000 Flash part is S29C51002T (256 KB) Flash image seems to be a legacy BIOS. Disabling checks. Programming Page: 2047 at address: 0x0003ff80 Verifying flash - VERIFIED
That's all. Ciao.