[realtek] Flashing EPROMs on a DFE-530TX+?

Arcadio A. Sincero Jr. asincero@arcadio.net
Wed, 15 Aug 2001 12:02:24 -0400 (EDT)


On Wed, 15 Aug 2001, Donald Becker wrote:
> On Tue, 14 Aug 2001 asincero@arcadio.net wrote:
> > Anybody have any ideas?  What would happen if I hacked libflash.c to bypass
> > trying to identify the flash chip and tell it directly that its an Atmel
> > AT29C256 by hardcoding it in?
> It's worth a try.  If the part is empty, you have no risk.
> If the part is already programmed, try reading the contents to see if
> any non-zero data can be read.


Ok ... I went ahead and changed get_part_id() in libflash.c to simply
return a 3 which would always cause the function to identify the chip as
being an Atmel AT29C256.  I recompiled rtl8139-diag with the modified
libflash.c and then tried to flash the chip using the Etherboot ROM
'eb-5.0.2-mc1-rtl8139.lzrom' which I obtained from
http://www.rom-o-matic.net (which at the time of this writing is still
down unfortunately :-/).  Here's what I got:


libflash.c:v2.03 4/19/2000 Copyright Donald Becker, becker@scyld.comrtl8139-diag.c:v2.03 5/15/2001 Donald Becker (becker@scyld.com)
 http://www.scyld.com/diag/index.html
Index #1: Found a D-Link DFE-538TX (RealTek RTL8139) adapter at 0xc800.
EEPROM size test returned 6, 0x204a4 / 0x2.
 Would write new Default Media entry 0x0000 to offset 6, the current value is 0xe112.

Writing a block of 64 bytes at offset 0..
 Flash ROM write failed at offset 0, 0x00 vs. 0x55.
Failed to load the new Flash BootROM image from file 'eb-5.0.2-mc1-rtl8139.lzrom'.
 Use '-a' or '-aa' to show device registers,
     '-e' to show EEPROM contents, -ee for parsed contents,
  or '-m' or '-mm' to show MII management registers.


Obviously, it didn't work.  Then I tried something else.  I first tried to
save what ever was currently in the Flash EPROM to a file by doing:

	rtl8139-diag -S current

and this worked.  I ended up with a 32k file filled with nothing but
non-zero data.  I then tried to load that file into the Flash EPROM by
doing:

	rtl8139-diag -L current

and it worked!  Perhaps I need to convert that Etherboot ROM image to some
other format first before I try to load it into the Flash EPROM?

- Arcadio