RE: [U-Boot-Users] NIOS port at Stratix DevKit: distinctions betw een bdi and env

Hi Stephan,
I'm glad to hear other Nios users are discovering u-boot :-) U-Boot and Nios is a great combination!
But now, I can't setup my network environment in expected way. The u-boot environment vars "ethaddr", "iptable", "netmask", and "serverip" are correct in flash, but bdinfo shows me the default values (compiled in) -- Why ?
Looks like I screwed up the call sequence in lib_nios/board.c ... the code is calling getenv("ethaddr") prior to env_init() -- must have been a late night ;-)
The fields that depend on an initialized environment should be initialized _after_ calling the routines in init_sequence ... which includes env_init(). Try moving bi_ip_addr and bi_enetaddr below the init_sequence loop.
I'm out-of-office so I can't work on a patch for a few days. If the changes work, please submit a patch to Wolfgang -- or we can work together off-line.
Regards, --Scott

Hi Scott,
Am Montag, 27. Oktober 2003 15:42 schrieb Scott McNutt:
I'm glad to hear other Nios users are discovering u-boot :-) U-Boot and Nios is a great combination!
Yes, of course.
But now, I can't setup my network environment in expected way. The u-boot environment vars "ethaddr", "iptable", "netmask", and "serverip" are correct in flash, but bdinfo shows me the default values (compiled in) -- Why ?
Looks like I screwed up the call sequence in lib_nios/board.c ... the code is calling getenv("ethaddr") prior to env_init() -- must have been a late night ;-)
The fields that depend on an initialized environment should be initialized _after_ calling the routines in init_sequence ... which includes env_init(). Try moving bi_ip_addr and bi_enetaddr below the init_sequence loop.
Yes, that's the solution to my problem. I've moved the setup stuff of bi_enetaddr and bi_ip_addr far behind the whole init_sequence loop and the relocation env_relocate(). I think and hope, that will be save enough for the future development.
I'm out-of-office so I can't work on a patch for a few days. If the changes work, please submit a patch to Wolfgang -- or we can work together off-line.
OK here is the patch (attechment). Wolfgang, could you put it into the CVS repository?
Regards, Stephan

Hi,
in message 03102810180700.02205@pcj86 you wrote:
OK here is the patch (attechment). Wolfgang, could you put it into the CVS repository?
Checked in. May take a while until it actually shows up on CVS.
Best regards,
Wolfgang Denk
participants (3)
-
Scott McNutt
-
Stephan Linz
-
Wolfgang Denk