diff options
| author | wdenk <wdenk> | 2004-02-27 08:20:54 +0000 | 
|---|---|---|
| committer | wdenk <wdenk> | 2004-02-27 08:20:54 +0000 | 
| commit | 132ba5fdc546084dfbebe4668a6e18f5da8eb407 (patch) | |
| tree | 307c6b930e79fcd3c8543f3aac17b919192203be /net/bootp.c | |
| parent | 11dadd547c08a3480ea153482e99c6ae70b73415 (diff) | |
| download | olio-uboot-2014.01-132ba5fdc546084dfbebe4668a6e18f5da8eb407.tar.xz olio-uboot-2014.01-132ba5fdc546084dfbebe4668a6e18f5da8eb407.zip | |
* Patch by Pierre Aubert, 26 Feb 2004
  add IDE support for MPC5200
* Patch by Masami Komiya, 26 Feb 2004:
  add autoload via NFS
* Patch by Stephen Williams
  Use of CONFIG_SERIAL_SOFTWARE_FIFO in board.c consistent with uses
  elsewhere in the source.
Diffstat (limited to 'net/bootp.c')
| -rw-r--r-- | net/bootp.c | 40 | 
1 files changed, 30 insertions, 10 deletions
| diff --git a/net/bootp.c b/net/bootp.c index 854ca16d6..e02372cb2 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -331,13 +331,21 @@ BootpHandler(uchar * pkt, unsigned dest, unsigned src, unsigned len)  	debug ("Got good BOOTP\n"); -	if (((s = getenv("autoload")) != NULL) && (*s == 'n')) { -		/* -		 * Just use BOOTP to configure system; -		 * Do not use TFTP to load the bootfile. -		 */ -		NetState = NETLOOP_SUCCESS; -		return; +	if ((s = getenv("autoload")) != NULL) { +		if (*s == 'n') { +			/* +			 * Just use BOOTP to configure system; +			 * Do not use TFTP to load the bootfile. +			 */ +			NetState = NETLOOP_SUCCESS; +			return; +		} else if (strcmp(s, "NFS") == 0) { +			/* +			 * Use NFS to load the bootfile. +			 */ +			NfsStart(); +			return; +		}  	}  	TftpStart(); @@ -881,9 +889,21 @@ DhcpHandler(uchar * pkt, unsigned dest, unsigned src, unsigned len)  			printf("\n");  			/* Obey the 'autoload' setting */ -			if (((s = getenv("autoload")) != NULL) && (*s == 'n')) { -				NetState = NETLOOP_SUCCESS; -				return; +			if ((s = getenv("autoload")) != NULL) { +				if (*s == 'n') { +					/* +					 * Just use BOOTP to configure system; +					 * Do not use TFTP to load the bootfile. +					 */ +					NetState = NETLOOP_SUCCESS; +					return; +				} else if (strcmp(s, "NFS") == 0) { +					/* +					 * Use NFS to load the bootfile. +					 */ +					NfsStart(); +					return; +				}  			}  			TftpStart();  			return; |