public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Andreas Oberritter <obi@saftware.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [patch] set environment on bootp without autoload and continue execution
Date: 09 Nov 2002 01:24:06 +0100	[thread overview]
Message-ID: <1036801446.610.50.camel@nadell> (raw)


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 

             reply	other threads:[~2002-11-09  0:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-09  0:24 Andreas Oberritter [this message]
2002-11-11  0:54 ` [U-Boot-Users] [patch] set environment on bootp without autoload and continue execution Wolfgang Denk
2002-11-11  2:54   ` Andreas Oberritter
2002-11-11  7:56     ` Wolfgang Denk
2002-11-11 11:39       ` Andreas Oberritter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1036801446.610.50.camel@nadell \
    --to=obi@saftware.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox