Patchwork [U-Boot,v2] lsxl: unset ncip for rescue mode

login
register
mail settings
Submitter Michael Walle
Date Oct. 4, 2012, 4:54 p.m.
Message ID <1349369665-9259-1-git-send-email-michael@walle.cc>
Download mbox | patch
Permalink /patch/189205/
State Accepted
Delegated to: Prafulla Wadaskar
Headers show

Comments

Michael Walle - Oct. 4, 2012, 4:54 p.m.
Instead of using the serverip we get from the DHCP server, implicitly use
the broadcast address, which is automatically set when no ncip environment
variable is set. That way it isn't necessary to use a special DHCP
configuration to set the netconsole peer.

Signed-off-by: Michael Walle <michael@walle.cc>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
---

The original patch subject was "lsxl: set ncip to broadcast address".

v2:
 - don't hardcode IP address
 - adjust comments in lsxl.c

 board/buffalo/lsxl/lsxl.c |    5 ++---
 include/configs/lsxl.h    |    2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)
Michael Walle - Oct. 16, 2012, 5:19 p.m.
Hi Prafulla,

Am Donnerstag 04 Oktober 2012, 18:54:25 schrieb Michael Walle:
> Instead of using the serverip we get from the DHCP server, implicitly use
> the broadcast address, which is automatically set when no ncip environment
> variable is set. That way it isn't necessary to use a special DHCP
> configuration to set the netconsole peer.
> 
> Signed-off-by: Michael Walle <michael@walle.cc>
> Cc: Prafulla Wadaskar <prafulla@marvell.com>
> ---
> 
> The original patch subject was "lsxl: set ncip to broadcast address".
> 
> v2:
>  - don't hardcode IP address
>  - adjust comments in lsxl.c
> 
>  board/buffalo/lsxl/lsxl.c |    5 ++---
>  include/configs/lsxl.h    |    2 +-
>  2 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c
> index b3f31d6..8756abf 100644
> --- a/board/buffalo/lsxl/lsxl.c
> +++ b/board/buffalo/lsxl/lsxl.c
> @@ -49,9 +49,8 @@
>   * you can do this only with a working network connection. Therefore, a
> random * ethernet address is generated if none is set and a DHCP request
> is sent. * After a successful DHCP response is received, the network
> settings are - * configured and the ncip parameter is set to the serverip.
> Eg. for a working - * resuce mode, you should set 'next-server' to the
> host where the netconsole - * client is started.
> + * configured and the ncip is unset. Therefore, all netconsole packets are
> + * broadcasted.
>   * Additionally, the bootsource is set to 'rescue'.
>   */
> 
> diff --git a/include/configs/lsxl.h b/include/configs/lsxl.h
> index 0db559c..86c4bce 100644
> --- a/include/configs/lsxl.h
> +++ b/include/configs/lsxl.h
> @@ -146,7 +146,7 @@
>  	"config_nc_dhcp=setenv autoload_old ${autoload}; "		\
>  		"setenv autoload no "					\
>  		"&& bootp "						\
> -		"&& setenv ncip ${serverip} "				\
> +		"&& setenv ncip "					\
>  		"&& setenv autoload ${autoload_old}; "			\
>  		"setenv autoload_old\0"					\
>  	"standard_env=setenv ipaddr; setenv netmask; setenv serverip; "	\


Ping ;)

Patch

diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c
index b3f31d6..8756abf 100644
--- a/board/buffalo/lsxl/lsxl.c
+++ b/board/buffalo/lsxl/lsxl.c
@@ -49,9 +49,8 @@ 
  * you can do this only with a working network connection. Therefore, a random
  * ethernet address is generated if none is set and a DHCP request is sent.
  * After a successful DHCP response is received, the network settings are
- * configured and the ncip parameter is set to the serverip. Eg. for a working
- * resuce mode, you should set 'next-server' to the host where the netconsole
- * client is started.
+ * configured and the ncip is unset. Therefore, all netconsole packets are
+ * broadcasted.
  * Additionally, the bootsource is set to 'rescue'.
  */
 
diff --git a/include/configs/lsxl.h b/include/configs/lsxl.h
index 0db559c..86c4bce 100644
--- a/include/configs/lsxl.h
+++ b/include/configs/lsxl.h
@@ -146,7 +146,7 @@ 
 	"config_nc_dhcp=setenv autoload_old ${autoload}; "		\
 		"setenv autoload no "					\
 		"&& bootp "						\
-		"&& setenv ncip ${serverip} "				\
+		"&& setenv ncip "					\
 		"&& setenv autoload ${autoload_old}; "			\
 		"setenv autoload_old\0"					\
 	"standard_env=setenv ipaddr; setenv netmask; setenv serverip; "	\