* [U-Boot-Users] [patch] set environment on bootp without autoload and continue execution
@ 2002-11-09 0:24 Andreas Oberritter
2002-11-11 0:54 ` Wolfgang Denk
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Oberritter @ 2002-11-09 0:24 UTC (permalink / raw)
To: u-boot
Hi,
attached is a patch which changes the behaviour of NetLoop().
I am using a board, which has its own bootloader and which loads u-boot
via bootp/tftp. u-boot needs to get its network settings from that bootp
server too, but to load the linux kernel via bootp/tftp it must use a
different filename than given by the bootp server.
the beginning of the u-boot commandline looks like this:
setenv autoload no; bootp; tftpboot 100000 kernel
The current version of u-boot stops executing the commandline before
tftpboot, because the bootp command returns an error, when NetLoop()
returns zero.
Currently NetLoop returns the loaded file size or zero on failure. If
you do not load a file, then file size stays zero and will be
interpreted as a failure, too. This also prevents netboot_update_env()
from being called in cmd_net.c.
This patch changes the behaviour so that NetLoop returns -1 on error.
Zero and positive integers can then be handled as the file size
correctly.
It also removes a warning in list.h. ;)
Best Regards,
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: u-boot_netloop.diff.bz2
Type: application/x-bzip
Size: 1297 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20021109/0928a6aa/attachment.bin
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot-Users] [patch] set environment on bootp without autoload and continue execution
2002-11-09 0:24 [U-Boot-Users] [patch] set environment on bootp without autoload and continue execution Andreas Oberritter
@ 2002-11-11 0:54 ` Wolfgang Denk
2002-11-11 2:54 ` Andreas Oberritter
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Denk @ 2002-11-11 0:54 UTC (permalink / raw)
To: u-boot
Dear Andreas,
in message <1036801446.610.50.camel@nadell> you wrote:
>
> attached is a patch which changes the behaviour of NetLoop().
More tests will have to be done, but I think your patch is correct.
Also, it probably fixes the problems reported by Steven Scholz.
Steven, can you please report your test resutls?
> The current version of u-boot stops executing the commandline before
> tftpboot, because the bootp command returns an error, when NetLoop()
> returns zero.
>
> Currently NetLoop returns the loaded file size or zero on failure. If
> you do not load a file, then file size stays zero and will be
> interpreted as a failure, too. This also prevents netboot_update_env()
> from being called in cmd_net.c.
>
> This patch changes the behaviour so that NetLoop returns -1 on error.
> Zero and positive integers can then be handled as the file size
> correctly.
Makes sense to me.
> It also removes a warning in list.h. ;)
Funny - my compiler didn't warn. Are you running a 3.x compiler? But
you are right anyway.
Thanks a lot!
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
See us @ electronica 2002 in Munich, Nov 12-15, Hall A3, Booth A3.325
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot-Users] [patch] set environment on bootp without autoload and continue execution
2002-11-11 0:54 ` Wolfgang Denk
@ 2002-11-11 2:54 ` Andreas Oberritter
2002-11-11 7:56 ` Wolfgang Denk
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Oberritter @ 2002-11-11 2:54 UTC (permalink / raw)
To: u-boot
On Mon, 2002-11-11 at 01:54, Wolfgang Denk wrote:
> Funny - my compiler didn't warn. Are you running a 3.x compiler?
Yes, I am using gcc 3.2.
Regards,
Andreas
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot-Users] [patch] set environment on bootp without autoload and continue execution
2002-11-11 2:54 ` Andreas Oberritter
@ 2002-11-11 7:56 ` Wolfgang Denk
2002-11-11 11:39 ` Andreas Oberritter
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Denk @ 2002-11-11 7:56 UTC (permalink / raw)
To: u-boot
In message <1036983250.608.89.camel@nadell> you wrote:
>
> > Funny - my compiler didn't warn. Are you running a 3.x compiler?
>
> Yes, I am using gcc 3.2.
Native, or as cross compiler?
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
See us @ electronica 2002 in Munich, Nov 12-15, Hall A3, Booth A3.325
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot-Users] [patch] set environment on bootp without autoload and continue execution
2002-11-11 7:56 ` Wolfgang Denk
@ 2002-11-11 11:39 ` Andreas Oberritter
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Oberritter @ 2002-11-11 11:39 UTC (permalink / raw)
To: u-boot
On Mon, 2002-11-11 at 08:56, Wolfgang Denk wrote:
> > > Funny - my compiler didn't warn. Are you running a 3.x compiler?
> >
> > Yes, I am using gcc 3.2.
>
> Native, or as cross compiler?
As cross compiler.
Regards,
Andreas
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-11-11 11:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-09 0:24 [U-Boot-Users] [patch] set environment on bootp without autoload and continue execution Andreas Oberritter
2002-11-11 0:54 ` Wolfgang Denk
2002-11-11 2:54 ` Andreas Oberritter
2002-11-11 7:56 ` Wolfgang Denk
2002-11-11 11:39 ` Andreas Oberritter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox