* [U-Boot-Users] NIOS port at Stratix DevKit: distinctions betw een bdi and env
@ 2003-10-27 14:42 Scott McNutt
2003-10-28 9:18 ` [U-Boot-Users] NIOS port at Stratix DevKit: distinctions between " Stephan Linz
0 siblings, 1 reply; 4+ messages in thread
From: Scott McNutt @ 2003-10-27 14:42 UTC (permalink / raw)
To: u-boot
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot-Users] NIOS port at Stratix DevKit: distinctions between bdi and env
@ 2003-10-27 14:49 Stephan Linz
0 siblings, 0 replies; 4+ messages in thread
From: Stephan Linz @ 2003-10-27 14:49 UTC (permalink / raw)
To: u-boot
Hi Scott and all other NIOS people,
today I've successfully brought up and running the U-Boot NIOS port on a
Stratix Development Kit (DK-1S10). Thanks to Scott -- was (is) a great work.
The preconfigured Cyclone Edition was running and startup without critical
problems, because as far as I know the Stratix edition is 100% equal to
Cyclone except the FPGA.
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 ?
(logfile see attachment)
Has anybody similar problems on Cyclone, or is it a Stratix problem (may be
an useless question) ?
Where can I found the setup flow from saved environment to bdi structure
inside the u-boot source code? I want to check up the settings step by step.
Ah: I'm using u-boot cvs snaphot date 20031024.
Thanks, and best regards
--
Mit freundlichen Gruessen
Stephan Linz
======================================================================
Stephan Linz
Softwareentwicklung
MAZeT GmbH Email: mailto:linz at mazet.de
G?schwitzer Str. 32 Tel. : (3641) 2809-55
D-07745 Jena Fax : (3641) 2809-12
Besuchen Sie bitte unsere Web-Seiten: http://www.MAZeT.de
======================================================================
-------------- next part --------------
U-Boot 1.0.0-pre (Oct 26 2003 - 23:09:27)
CPU: Nios-32 Rev. 3.08 (0x3008)
Reg file size: 256 LO_LIMIT/HI_LIMIT: 2/14
Board: Altera Nios 1C20 Development Kit
In: serial
Out: serial
Err: serial
==> md 0
00000000: 4b1138a9 64756162 65746172 3531313d .8.Kbaudrate=115
00000010: 00303032 61687465 3d726464 303a3030 200.ethaddr=00:0
00000020: 64653a37 3a61303a 373a3461 656e0062 7:ed:0a:a4:7b.ne
00000030: 73616d74 35323d6b 35322e35 35322e35 tmask=255.255.25
00000040: 32322e35 65730034 72657672 313d7069 5.224.serverip=1
00000050: 312e3239 322e3836 362e3930 74730035 92.168.209.65.st
00000060: 3d6e6964 69726573 73006c61 756f6474 din=serial.stdou
00000070: 65733d74 6c616972 64747300 3d727265 t=serial.stderr=
00000080: 69726573 69006c61 64646170 39313d72 serial.ipaddr=19
00000090: 36312e32 30322e38 36372e39 00000000 2.168.209.76....
000000a0: 00000000 00000000 00000000 00000000 ................
000000b0: 00000000 00000000 00000000 00000000 ................
000000c0: 00000000 00000000 00000000 00000000 ................
000000d0: 00000000 00000000 00000000 00000000 ................
000000e0: 00000000 00000000 00000000 00000000 ................
000000f0: 00000000 00000000 00000000 00000000 ................
==> printenv
baudrate=115200
ethaddr=00:07:ed:0a:a4:7b
netmask=255.255.255.224
serverip=192.168.209.65
ipaddr=192.168.209.76
stdin=serial
stdout=serial
stderr=serial
Environment size: 153/65532 bytes
==> bdinfo
memstart = 0x01000000
memsize = 0x01000000
flashstart = 0x00000000
flashsize = 0x00800000
flashoffset = 0x00000000
ethaddr = 08:00:3E:26:0A:5B
ip_addr = 192.168.2.21
baudrate = 115200 bps
==>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot-Users] NIOS port at Stratix DevKit: distinctions between bdi and env
2003-10-28 9:18 ` [U-Boot-Users] NIOS port at Stratix DevKit: distinctions between " Stephan Linz
@ 2003-10-28 9:15 ` Wolfgang Denk
0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2003-10-28 9:15 UTC (permalink / raw)
To: u-boot
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
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de
Just because your doctor has a name for your condition doesn't mean
he knows what it is.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot-Users] NIOS port at Stratix DevKit: distinctions between bdi and env
2003-10-27 14:42 [U-Boot-Users] NIOS port at Stratix DevKit: distinctions betw een bdi and env Scott McNutt
@ 2003-10-28 9:18 ` Stephan Linz
2003-10-28 9:15 ` Wolfgang Denk
0 siblings, 1 reply; 4+ messages in thread
From: Stephan Linz @ 2003-10-28 9:18 UTC (permalink / raw)
To: u-boot
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
--
Mit freundlichen Gruessen
Stephan Linz
======================================================================
Stephan Linz
Softwareentwicklung
MAZeT GmbH Email: mailto:linz at mazet.de
G?schwitzer Str. 32 Tel. : (3641) 2809-55
D-07745 Jena Fax : (3641) 2809-12
Besuchen Sie bitte unsere Web-Seiten: http://www.MAZeT.de
======================================================================
-------------- next part --------------
diff -Nru --exclude=CVS u-boot-20031024cvs/lib_nios/board.c u-boot-20031024cvs-bd_getenv_fix/lib_nios/board.c
--- u-boot-20031024cvs/lib_nios/board.c Mon Oct 20 01:22:12 2003
+++ u-boot-20031024cvs-bd_getenv_fix/lib_nios/board.c Mon Oct 27 18:00:31 2003
@@ -132,12 +132,6 @@
bd->bi_sramstart= CFG_SRAM_BASE;
bd->bi_sramsize = CFG_SRAM_SIZE;
bd->bi_baudrate = CONFIG_BAUDRATE;
- bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
- s = getenv ("ethaddr");
- for (i = 0; i < 6; ++i) {
- bd->bi_enetaddr[i] = s ? simple_strtoul (s, &e, 16) : 0;
- if (s) s = (*e) ? e + 1 : e;
- }
for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
if ((*init_fnc_ptr) () != 0) {
@@ -150,6 +144,13 @@
mem_malloc_init();
malloc_bin_reloc();
env_relocate();
+
+ bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
+ s = getenv ("ethaddr");
+ for (i = 0; i < 6; ++i) {
+ bd->bi_enetaddr[i] = s ? simple_strtoul (s, &e, 16) : 0;
+ if (s) s = (*e) ? e + 1 : e;
+ }
devices_init();
jumptable_init();
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-10-28 9:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-27 14:42 [U-Boot-Users] NIOS port at Stratix DevKit: distinctions betw een bdi and env Scott McNutt
2003-10-28 9:18 ` [U-Boot-Users] NIOS port at Stratix DevKit: distinctions between " Stephan Linz
2003-10-28 9:15 ` Wolfgang Denk
-- strict thread matches above, loose matches on Subject: below --
2003-10-27 14:49 Stephan Linz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox