<!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>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I am working on u-boot-1.1.2&nbsp; and working on 
MPC8540 based board.I have one issue regarding reading MAC address from EEPROM 
and passing&nbsp;the same to&nbsp;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>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;printf("\n Reading EEPROM for MAC 
addresses");<BR>&nbsp;if(i2c_read(0x50, 0, 1, macbuf, 12) != 0) 
<BR>&nbsp;&nbsp;&nbsp;puts ("Error reading EEPROM chip for MAC 
address.\n");<BR>&nbsp;udelay(100);<BR>&nbsp;sprintf(macaddr1,"%02X:%02X:%02X:%02X:%02X:%02X\n",macbuf[0],macbuf[1],macbuf[2],macbuf[3],macbuf[4],macbuf[5]);<BR>&nbsp;sprintf(macaddr2,"%02X:%02X:%02X:%02X:%02X:%02X\n",macbuf[6],macbuf[7],macbuf[8],macbuf[9],macbuf[10],macbuf[11]);<BR>&nbsp;<BR>&nbsp;printf("\n%s",macaddr1);<BR>&nbsp;printf("%s",macaddr2);<BR>&nbsp;eth_set_enetaddr(0,macaddr1);<BR>&nbsp;eth_set_enetaddr(1,macaddr2);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</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>&nbsp;{<BR>&nbsp;&nbsp; int 
i;<BR>&nbsp;&nbsp; extern unsigned char macbuf[]; <BR>&nbsp;&nbsp; &nbsp;for 
(i=0; i&lt;6; ++i) {<BR>&nbsp;&nbsp;&nbsp;bd-&gt;bi_enetaddr[i] = 
macbuf[i];<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;}<BR>&nbsp;&nbsp;for (i=6; i&lt;12; 
++i) {<BR>&nbsp;&nbsp;&nbsp; &nbsp;bd-&gt;bi_enet1addr[i-6] = 
macbuf[i];<BR>&nbsp;&nbsp;}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</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&nbsp; flash addresses of &nbsp;linux and ramdisk&nbsp;that 
are present in flash.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Thanks in advance.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Regards.</FONT></DIV></BODY></HTML>