<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1491" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hello All,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I am working on u-boot-1.1.2 and working on
MPC8540 based board.I have one issue regarding reading MAC address from EEPROM
and passing the same to Linux. I added little bit of code in
common/main.c to read mac address from eeprom as follows.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> printf("\n Reading EEPROM for MAC
addresses");<BR> if(i2c_read(0x50, 0, 1, macbuf, 12) != 0)
<BR> puts ("Error reading EEPROM chip for MAC
address.\n");<BR> udelay(100);<BR> sprintf(macaddr1,"%02X:%02X:%02X:%02X:%02X:%02X\n",macbuf[0],macbuf[1],macbuf[2],macbuf[3],macbuf[4],macbuf[5]);<BR> sprintf(macaddr2,"%02X:%02X:%02X:%02X:%02X:%02X\n",macbuf[6],macbuf[7],macbuf[8],macbuf[9],macbuf[10],macbuf[11]);<BR> <BR> printf("\n%s",macaddr1);<BR> printf("%s",macaddr2);<BR> eth_set_enetaddr(0,macaddr1);<BR> eth_set_enetaddr(1,macaddr2);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>and added code in common/cmd_nvedit.c to update the
same board info structure to be passed to the linux.</FONT></DIV>
<DIV><FONT face=Arial size=2>else<BR> {<BR> int
i;<BR> extern unsigned char macbuf[]; <BR> for
(i=0; i<6; ++i) {<BR> bd->bi_enetaddr[i] =
macbuf[i];<BR> <BR> }<BR> for (i=6; i<12;
++i) {<BR> bd->bi_enet1addr[i-6] =
macbuf[i];<BR> }</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The problem being, the linux is getting the MAC
address that was read from eeprom if I download linux and ramdisk to RAM using
tftp and bootm by giving ram addresses. Linux is not getting the Mac addresses
if I bootm by giving flash addresses of linux and ramdisk that
are present in flash.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks in advance.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Regards.</FONT></DIV></BODY></HTML>