[U-Boot-Users] Device tree and u-boot passing MAC address questions

Hi all,
I'm noticing some different behavior in between 1.3.0RC3 and the latest 85xx git repo regarding MAC addresses. With 1.3.0RC3 and before, my mac address defined for CONFIG_ETH2ADDR et all got passed into the blob I sent to my 2.6.24RC2 kernel via u-boot. Now, the address doesn't get set and the kernel sees "00:00:00:00:00:00" for my eth2 and of course it doesn't work.
I noticed at least one other recent case of this issue, and the 'solution' was to code in the mac address into the dts file - I tried that and it does work. However, what's a proper solution for passing a MAC address to the kernel from the latest u-boot?
Thanks, Robert

robert lazarski wrote:
I noticed at least one other recent case of this issue, and the 'solution' was to code in the mac address into the dts file - I tried that and it does work. However, what's a proper solution for passing a MAC address to the kernel from the latest u-boot?
Which property in the DTS did you update? Also, you need to make sure that CONFIG_HAS_ETH2 is defined in your U-Boot board header file.

On Dec 17, 2007 1:37 PM, Timur Tabi timur@freescale.com wrote:
robert lazarski wrote:
I noticed at least one other recent case of this issue, and the 'solution' was to code in the mac address into the dts file - I tried that and it does work. However, what's a proper solution for passing a MAC address to the kernel from the latest u-boot?
Which property in the DTS did you update? Also, you need to make sure that CONFIG_HAS_ETH2 is defined in your U-Boot board header file.
I'm using the same header file in 1.3.0RC3 and the latest 85xx git repo, which has:
#define CONFIG_TSEC_ENET 1 /* tsec ethernet support */
/* The mac addresses for all ethernet interface */ #if defined(CONFIG_TSEC_ENET) #define CONFIG_HAS_ETH0 #define CONFIG_ETHADDR 00:E0:0C:00:00:FD #define CONFIG_HAS_ETH1 #define CONFIG_ETH1ADDR 00:E0:0C:00:01:FD #define CONFIG_HAS_ETH2 #define CONFIG_ETH2ADDR 00:E0:0C:00:02:FD #define CONFIG_HAS_ETH3 #define CONFIG_ETH3ADDR 00:E0:0C:00:03:FD #endif
To get eth2 to link, I put this MAC in my device tree:
local-mac-address = [ 00 E0 0C 00 02 FD ];
Otherwise the kernel just sees a series of zero's . Is this change on purpose and I missed what I need to do now?
Robert

Hi Robert,
[snip]
To get eth2 to link, I put this MAC in my device tree:
local-mac-address = [ 00 E0 0C 00 02 FD ];
Otherwise the kernel just sees a series of zero's . Is this change on purpose and I missed what I need to do now?
I recently encountered the same problem. By using the 'fdt b' command, I was able to see that the MAC addresses were not being filled in prior to calling the kernel.
Adding aliases to the dtb file fixed my problem. (Search the mailing lists...)
Best regards, Joe

Joe Hamman wrote:
Hi Robert,
[snip]
To get eth2 to link, I put this MAC in my device tree:
local-mac-address = [ 00 E0 0C 00 02 FD ];
Otherwise the kernel just sees a series of zero's . Is this change on purpose and I missed what I need to do now?
I recently encountered the same problem. By using the 'fdt b' command, I
^ "fdt p" I presume. |
was able to see that the MAC addresses were not being filled in prior to calling the kernel.
Adding aliases to the dtb file fixed my problem. (Search the mailing lists...)
Best regards, Joe

-----Original Message----- From: Jerry Van Baren [mailto:gerald.vanbaren@ge.com] Sent: Monday, December 17, 2007 2:30 PM To: joe.hamman@embeddedspecialties.com Cc: 'robert lazarski'; 'U-Boot-Users' Subject: Re: [U-Boot-Users] Device tree and u-boot passing MAC addressquestions
Joe Hamman wrote:
Hi Robert,
[snip]
To get eth2 to link, I put this MAC in my device tree:
local-mac-address = [ 00 E0 0C 00 02 FD ];
Otherwise the kernel just sees a series of zero's . Is this change on purpose and I missed what I need to do now?
I recently encountered the same problem. By using the 'fdt b' command,
I ^ "fdt p" I presume. |
Sorry, I should have listed all the steps: tftp 10000 filename.dtb # load the dtb fdt a 10000 # tell fdt where it loaded fdt b # do the board specific setup (fills in MAC) fdt p # verify the values are correct
was able to see that the MAC addresses were not being filled in prior to calling the kernel.
Adding aliases to the dtb file fixed my problem. (Search the mailing lists...)
Best regards, Joe

Joe Hamman wrote:
I recently encountered the same problem. By using the 'fdt b' command, I was able to see that the MAC addresses were not being filled in prior to calling the kernel.
Most device tree properties are not filled in until you execute the bootm command. The MAC address is one such property.
Adding aliases to the dtb file fixed my problem. (Search the mailing lists...)
It looks like U-Boot was updated before the device trees were updated. When the code for aliases was added to U-Boot, the code for older device trees should not have been removed.
participants (4)
-
Jerry Van Baren
-
Joe Hamman
-
robert lazarski
-
Timur Tabi