This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

UBoot not passing MAC address to Linux

Other Parts Discussed in Thread: OMAP-L138

Hi,  in uboot I have a valid MAC address set - I can see the variable 'ethaddr' correctly set

when I run 'dhcp' from UBoot, the correct MAC address is used

however when I boot into Linux I get the following

davinci_emac_probe: using random MAC addr: 4e:5a:65:f6:7c:52
emac-mii: probed
omap_rtc omap_rtc: setting system clock to 2000-01-01 00:25:09 UTC (946686309)
eth0: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=1:00, id=7c0f1)
Sending DHCP requests .

how is the MAC address supposed to be transferred from UBoot to Linux?  my understanding is that the 'eth' bootarg is not supported by TI's driver?  

how can I diagnose this?

  • I think I have it figured out, although some of it doesnt add up

    Linux, assuming MTD is installed and working, will read the MAC address from the first 6 bytes located at in SPI flash.  The partition name must be "MAC Address",  in my system this is at offset 0x7f0000 in SPI flash 

    U-Boot seems to be storing it's copy of the MAC address from one of two places
        a) CONFIG_ETHADDR
        b) from the environment variables, stored at 0x40000 in SPI flash

    why the storage location isnt the same is odd to me, but I'm not blocked either anymore

     

  • Hi Chris,

    During booting, U-Boot tries to read the MAC address from SPI flash and if it is not present in SPI flash, then user needs to set it. Once environment variable is set, it does not read from SPI flash on subsequent boots. Also, once MAC address is set, user is not allowed to modify the MAC address unless the environment variables are erased. Please go through the below link which has steps for erasing the environment variables and flashing the MAC address.

    http://processors.wiki.ti.com/index.php/GSG:_OMAP-L138_DVEVM_Additional_Procedures#Restoring_factory_default_U-Boot_environment_variables

    http://processors.wiki.ti.com/index.php/GSG:_OMAP-L138_DVEVM_Additional_Procedures#Restoring_MAC_address_on_SPI_Flash

    Regards, Sudhakar

  • Chris Gray

    Ethernet MAC address is not passed from U-Boot to Kernel, in kernel it is read from any storage media, by default in PSP kernel it is read from internel EEPROM as defined in 3.3.2.43 in TI816X TRM. You change it as per you requirement in arch/arm/mach-omap2/devices.c where MAC address is read from EEPROM and filled into davinci EMAC driver platform data.

    Regards
    Mugunthan V N