[U-Boot] Force setting of ethact

Hi all-
I've been struggeling with the ethact setting in U-Boot: I want U-Boot to load from eTSEC0 on our board, but it always comes up with ethact = UEC0 or FSL UEC0 in older versions.
As ethact is not persistent, my only workaround so far was to change net/eth.c so that at all occasions, where ethact is set, it is set to eTSEC0 - during development, this was OK for me, but now I am cleaning up!
What's the intended/desired function of ethact, and how should it be initialized? Even using CONFIG_ETHPRIME has no effect.
From my understanding of something named "ethact", I would expect, that it finds the (first) active ethernet device - active in a sense of connected or usable or whatever.
Although eTSEC0 is the only connected port on our device, it comes up with UEC0 - so, even if this interface in "on" in some way, this does not help here.
How can I force ethact to be eTSEC0 (or whichever I want), without tampering U-Boot base files?
Thanks Matthias

Dear DUNDA Matthias,
In message 27800_1290086146_4CE52702_27800_13178_1_3CF34B583782C147807E09365F884DA42F058FDF03@THSNCOA06MXS02P.ONE-06.GRP you wrote:
I've been struggeling with the ethact setting in U-Boot: I want U-Boot to load from eTSEC0 on our board, but it always comes up with ethact = UEC0 or FSL UEC0 in older versions.
As ethact is not persistent, my only workaround so far was to change net/eth.c so that at all occasions, where ethact is set, it is set to eTSEC0 - during development, this was OK for me, but now I am cleaning up!
Why don't you use "ethprime" ?
What's the intended/desired function of ethact, and how should it be initialized? Even using CONFIG_ETHPRIME has no effect.
These variabes are documented in the README.
From my understanding of something named "ethact", I would expect, that it finds the (first) active ethernet device - active in a sense of connected or usable or whatever.
"active" as "currently active", i. e. what will be used when you issue a network command.
Although eTSEC0 is the only connected port on our device, it comes up with UEC0 - so, even if this interface in "on" in some way, this does not help here.
How can I force ethact to be eTSEC0 (or whichever I want), without tampering U-Boot base files?
"ethact" is the wrong variable for what you are trying to do. Use "ethprime" instead.
Best regards,
Wolfgang Denk

Why don't you use "ethprime" ?
What's the intended/desired function of ethact, and how should it be
initialized? Even using CONFIG_ETHPRIME has no effect.
These variabes are documented in the README.
Yes, I read that! That's why I used CONFIG_ETHPRIME in my board header file to do the trick - maybe my env was corrupted, or something - I don't know, why it didn't show up by default... I had to setenv it by hand.
Thanks. Matthias

Dear DUNDA Matthias,
In message 13246_1290092163_4CE53E83_13246_17888_1_3CF34B583782C147807E09365F884DA42F058FE233@THSNCOA06MXS02P.ONE-06.GRP you wrote:
What's the intended/desired function of ethact, and how should it be
initialized? Even using CONFIG_ETHPRIME has no effect.
These variabes are documented in the README.
Yes, I read that! That's why I used CONFIG_ETHPRIME in my board header file to do the trick - maybe my env was corrupted, or something - I don't know, why it didn't show up by default... I had to setenv it by hand.
CONFIG_ETHPRIME affects only your _default_ envrionment, i. e. what gets used when the normal environment is not available for some reason (like corrupted). As long as it remains valid, installing a new U-Boot image with additional settings in the _default_ environment will not change anything as the default environment never gets referenced.
Best regards,
Wolfgang Denk

On Thursday, November 18, 2010 08:15:43 DUNDA Matthias wrote:
Hi all-
please fix your e-mailer. it needs to wrap long lines.
I've been struggeling with the ethact setting in U-Boot: I want U-Boot to load from eTSEC0 on our board, but it always comes up with ethact = UEC0 or FSL UEC0 in older versions.
As ethact is not persistent, my only workaround so far was to change net/eth.c so that at all occasions, where ethact is set, it is set to eTSEC0 - during development, this was OK for me, but now I am cleaning up!
What's the intended/desired function of ethact, and how should it be initialized? Even using CONFIG_ETHPRIME has no effect.
ethprime should do this. you'll need to describe what version of u-boot you're actually using and why ethprime isnt working for you. -mike
participants (3)
-
DUNDA Matthias
-
Mike Frysinger
-
Wolfgang Denk