Skip to contentSkip to conversation

TFTP: add host ip addr support

PATCH New Jean-Christophe PLAGNIOL-VILLARD 6 participants 19 messages Dec 24, 2007 – Jan 11, 2008 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 TFTP: add host ip addr support

common/cmd_net.c +1 -1
index 21682c0..2fb0e7c 100644
@@ -51,7 +51,7 @@ int do_tftpb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 U_BOOT_CMD(
 	tftpboot,	3,	1,	do_tftpb,
 	"tftpboot- boot image via network using TFTP protocol\n",
-	"[loadAddress] [bootfilename]\n"
+	"[loadAddress] [host ip addr:bootfilename]\n"
 );
 
 int do_rarpb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
net/tftp.c +13 -5
index 8b95bcf..d5d6e65 100644
@@ -34,7 +34,7 @@
 #define TFTP_ERROR	5
 #define TFTP_OACK	6
 
-
+static IPaddr_t TftpServerIP;
 static int	TftpServerPort;		/* The UDP port at their end		*/
 static int	TftpOurPort;		/* The UDP port at our end		*/
 static int	TftpTimeoutCount;
@@ -231,7 +231,7 @@ TftpSend (void)
 		break;
 	}
 
-	NetSendUDPPacket(NetServerEther, NetServerIP, TftpServerPort, TftpOurPort, len);
+	NetSendUDPPacket(NetServerEther, TftpServerIP, TftpServerPort, TftpOurPort, len);
 }
 
 
@@ -464,19 +464,27 @@ TftpStart (void)
 		printf ("*** Warning: no boot file name; using '%s'\n",
 			tftp_filename);
 	} else {
-		tftp_filename = BootFile;
+		char *p=BootFile;
+		p = strchr (p, ':');
+		if (p != NULL) {
+			TftpServerIP = string_to_ip (BootFile);
+			++p;
+			strcpy (tftp_filename, p);
+		} else {
+			strcpy (tftp_filename, BootFile);
+		}
 	}
 
 #if defined(CONFIG_NET_MULTI)
 	printf ("Using %s device\n", eth_get_name());
 #endif
-	puts ("TFTP from server ");	print_IPaddr (NetServerIP);
+	puts ("TFTP from server ");	print_IPaddr (TftpServerIP);
 	puts ("; our IP address is ");	print_IPaddr (NetOurIP);
 
 	/* Check if we need to send across this subnet */
 	if (NetOurGatewayIP && NetOurSubnetMask) {
 	    IPaddr_t OurNet 	= NetOurIP    & NetOurSubnetMask;
-	    IPaddr_t ServerNet 	= NetServerIP & NetOurSubnetMask;
+	    IPaddr_t ServerNet 	= TftpServerIP & NetOurSubnetMask;
 
 	    if (OurNet != ServerNet) {
 		puts ("; sending through gateway ");
Signature · 1 line
1.5.3.7
#1 lore raw

PATCH 1/1 TFTP: add host ip addr support

common/cmd_net.c int do_tftpb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) · line 54

Quoted 12 lines · Jean-Christophe PLAGNIOL-VILLARD
common/cmd_net.c +1 -1
index 21682c0..2fb0e7c 100644
@@ -51,7 +51,7 @@ int do_tftpb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 U_BOOT_CMD(
 	tftpboot,	3,	1,	do_tftpb,
 	"tftpboot- boot image via network using TFTP protocol\n",
-	"[loadAddress] [bootfilename]\n"
+	"[loadAddress] [host ip addr:bootfilename]\n"

Hi Jean-Christophe,

Interesting. I can see how that would be useful rather than having to modify the dhcp server configuration when you want to use an alternate server.

Critique: the help is misleading: "host ip addr:" is optional so it needs another set of [] around it. Having spaces in "host ip addr" is more readable, but makes it look like it is three things or perhaps a keyword.

I would suggest the following, but there may be a better way...
"[loadAddress] [[hostIPaddr:]bootfilename]\n"

Best regards,
gvb

#2 lore raw

cover TFTP: add host ip addr support

allow to use a different server as set in serverip

common/cmd_net.c +1 -1
index 21682c0..e03ffbf 100644
@@ -51,7 +51,7 @@ int do_tftpb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 U_BOOT_CMD(
 	tftpboot,	3,	1,	do_tftpb,
 	"tftpboot- boot image via network using TFTP protocol\n",
-	"[loadAddress] [bootfilename]\n"
+	"[loadAddress] [[host ip addr]:bootfilename]\n"
 );
 
 int do_rarpb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
net/tftp.c +13 -5
index 8b95bcf..d5d6e65 100644
@@ -34,7 +34,7 @@
 #define TFTP_ERROR	5
 #define TFTP_OACK	6
 
-
+static IPaddr_t TftpServerIP;
 static int	TftpServerPort;		/* The UDP port at their end		*/
 static int	TftpOurPort;		/* The UDP port at our end		*/
 static int	TftpTimeoutCount;
@@ -231,7 +231,7 @@ TftpSend (void)
 		break;
 	}
 
-	NetSendUDPPacket(NetServerEther, NetServerIP, TftpServerPort, TftpOurPort, len);
+	NetSendUDPPacket(NetServerEther, TftpServerIP, TftpServerPort, TftpOurPort, len);
 }
 
 
@@ -464,19 +464,27 @@ TftpStart (void)
 		printf ("*** Warning: no boot file name; using '%s'\n",
 			tftp_filename);
 	} else {
-		tftp_filename = BootFile;
+		char *p=BootFile;
+		p = strchr (p, ':');
+		if (p != NULL) {
+			TftpServerIP = string_to_ip (BootFile);
+			++p;
+			strcpy (tftp_filename, p);
+		} else {
+			strcpy (tftp_filename, BootFile);
+		}
 	}
 
 #if defined(CONFIG_NET_MULTI)
 	printf ("Using %s device\n", eth_get_name());
 #endif
-	puts ("TFTP from server ");	print_IPaddr (NetServerIP);
+	puts ("TFTP from server ");	print_IPaddr (TftpServerIP);
 	puts ("; our IP address is ");	print_IPaddr (NetOurIP);
 
 	/* Check if we need to send across this subnet */
 	if (NetOurGatewayIP && NetOurSubnetMask) {
 	    IPaddr_t OurNet 	= NetOurIP    & NetOurSubnetMask;
-	    IPaddr_t ServerNet 	= NetServerIP & NetOurSubnetMask;
+	    IPaddr_t ServerNet 	= TftpServerIP & NetOurSubnetMask;
 
 	    if (OurNet != ServerNet) {
 		puts ("; sending through gateway ");
Signature · 1 line
1.5.3.7
#3 lore raw

PATCH 1/1 Fix nfs command help to reflect that the serverip is optional

common/cmd_net.c +1 -1
index e03ffbf..894d863 100644
@@ -87,7 +87,7 @@ int do_nfs (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 U_BOOT_CMD(
 	nfs,	3,	1,	do_nfs,
 	"nfs\t- boot image via network using NFS protocol\n",
-	"[loadAddress] [host ip addr:bootfilename]\n"
+	"[loadAddress] [[host ip addr]:bootfilename]\n"
 );
 #endif
 
Signature · 1 line
1.5.3.7
#4 lore raw

PATCH 1/1 Fix nfs command help to reflect that the serverip is optional

Quoted 8 lines · Jean-Christophe PLAGNIOL-VILLARD
common/cmd_net.c +0 -0
index e03ffbf..894d863 100644

common/cmd_net.c int do_nfs (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) · line 93

Quoted 8 lines
common/cmd_net.c +1 -1
@@ -87,7 +87,7 @@ int do_nfs (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 U_BOOT_CMD(
 	nfs,	3,	1,	do_nfs,
 	"nfs\t- boot image via network using NFS protocol\n",
-	"[loadAddress] [host ip addr:bootfilename]\n"
+	"[loadAddress] [[host ip addr]:bootfilename]\n"
 );
 #endif
 

Sorry for being a PITA, but since we're changing documentation shouldn't this be:

- "[loadAddress] [host ip addr:bootfilename]\n"
+ "[loadAddress] [[host ip addr:]bootfilename]\n"

Can you spot the difference?

regards,
Ben

#5 lore raw

PATCH 1/1 Fix nfs command help to reflect that the serverip is optional

Quoted 9 lines · In message <[email protected]> you wrote:

common/cmd_net.c int do_nfs (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) · line 92

Quoted 7 lines
common/cmd_net.c +1 -1
-	"[loadAddress] [host ip addr:bootfilename]\n"
+	"[loadAddress] [[host ip addr]:bootfilename]\n"
 );
 #endif

Sorry for being a PITA, but since we're changing documentation shouldn't this be:

You're not a PITA, but a careful reader.

Quoted 5 lines
(quoted diff) +1 -1
-	"[loadAddress] [host ip addr:bootfilename]\n"
+	"[loadAddress] [[host ip addr:]bootfilename]\n"

Can you spot the difference?

Indeed - it's the difference between right and wrong, between working and failing.

Also, I ask to change this (as gvb previously recommended) into

"[loadAddress] [[HostIpAddr:]bootfilename]\n"

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
EMACS belongs in <sys/errno.h>: Editor too big!
#6 lore raw

cover TFTP: add host ip addr support

allow to use a different server as set in serverip

common/cmd_net.c +1 -1
index 21682c0..b86ca86 100644
@@ -51,7 +51,7 @@ int do_tftpb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 U_BOOT_CMD(
 	tftpboot,	3,	1,	do_tftpb,
 	"tftpboot- boot image via network using TFTP protocol\n",
-	"[loadAddress] [bootfilename]\n"
+	"[loadAddress] [[hostIPaddr:]bootfilename]\n"
 );
 
 int do_rarpb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
net/tftp.c +13 -5
index 8b95bcf..d5d6e65 100644
@@ -34,7 +34,7 @@
 #define TFTP_ERROR	5
 #define TFTP_OACK	6
 
-
+static IPaddr_t TftpServerIP;
 static int	TftpServerPort;		/* The UDP port at their end		*/
 static int	TftpOurPort;		/* The UDP port at our end		*/
 static int	TftpTimeoutCount;
@@ -231,7 +231,7 @@ TftpSend (void)
 		break;
 	}
 
-	NetSendUDPPacket(NetServerEther, NetServerIP, TftpServerPort, TftpOurPort, len);
+	NetSendUDPPacket(NetServerEther, TftpServerIP, TftpServerPort, TftpOurPort, len);
 }
 
 
@@ -464,19 +464,27 @@ TftpStart (void)
 		printf ("*** Warning: no boot file name; using '%s'\n",
 			tftp_filename);
 	} else {
-		tftp_filename = BootFile;
+		char *p=BootFile;
+		p = strchr (p, ':');
+		if (p != NULL) {
+			TftpServerIP = string_to_ip (BootFile);
+			++p;
+			strcpy (tftp_filename, p);
+		} else {
+			strcpy (tftp_filename, BootFile);
+		}
 	}
 
 #if defined(CONFIG_NET_MULTI)
 	printf ("Using %s device\n", eth_get_name());
 #endif
-	puts ("TFTP from server ");	print_IPaddr (NetServerIP);
+	puts ("TFTP from server ");	print_IPaddr (TftpServerIP);
 	puts ("; our IP address is ");	print_IPaddr (NetOurIP);
 
 	/* Check if we need to send across this subnet */
 	if (NetOurGatewayIP && NetOurSubnetMask) {
 	    IPaddr_t OurNet 	= NetOurIP    & NetOurSubnetMask;
-	    IPaddr_t ServerNet 	= NetServerIP & NetOurSubnetMask;
+	    IPaddr_t ServerNet 	= TftpServerIP & NetOurSubnetMask;
 
 	    if (OurNet != ServerNet) {
 		puts ("; sending through gateway ");
Signature · 1 line
1.5.3.7
#7 lore raw

PATCH 1/1 Fix nfs command help to reflect that the serverip is optional

common/cmd_net.c +1 -1
index b86ca86..dbf6b86 100644
@@ -87,7 +87,7 @@ int do_nfs (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 U_BOOT_CMD(
 	nfs,	3,	1,	do_nfs,
 	"nfs\t- boot image via network using NFS protocol\n",
-	"[loadAddress] [host ip addr:bootfilename]\n"
+	"[loadAddress] [[hostIPaddr:]bootfilename]\n"
 );
 #endif
 
Signature · 1 line
1.5.3.7
#8 lore raw

cover TFTP: add host ip addr support

In reply to Jean-Christophe PLAGNIOL-VILLARD
Quoted 4 lines · Jean-Christophe PLAGNIOL-VILLARD
net/tftp.c +0 -0
@@ -464,19 +464,27 @@ TftpStart (void)
 		printf ("*** Warning: no boot file name; using '%s'\n",
 			tftp_filename);
 	} else {

net/tftp.c TftpStart (void) · line 475

Quoted 10 lines
net/tftp.c +9 -1
-		tftp_filename = BootFile;
+		char *p=BootFile;
+		p = strchr (p, ':');
+		if (p != NULL) {
+			TftpServerIP = string_to_ip (BootFile);
+			++p;
+			strcpy (tftp_filename, p);
+		} else {
+			strcpy (tftp_filename, BootFile);
+		}

Doesn't this mean that TftpServerIP will be undefined if no server is specified. Should it not be:

@@ -464,19 +464,27 @@ TftpStart (void)
printf ("*** Warning: no boot file name; using '%s'\n",
tftp_filename);
} else {
- tftp_filename = BootFile;
+ char *p=BootFile;
+ p = strchr (p, ':');
+ if (p != NULL) {
+ TftpServerIP = string_to_ip (BootFile);
+ ++p;
+ strcpy (tftp_filename, p);
+ } else {
+ TftpServerIP = NetServerIP;
+ strcpy (tftp_filename, BootFile);
+ }

Andre

Signature · 7 lines
Bluewater Systems Ltd - ARM Technology Solutions Centre

       Andre Renaud                             Bluewater Systems Ltd
Phone: +64 3 3779127 (Aus 1 800 148 751)        Level 17, 119 Armagh St
Fax:   +64 3 3779135                            PO Box 13889
Email: arenaud at bluewatersys.com                 Christchurch
Web:   http://www.bluewatersys.com              New Zealand
#9 lore raw

cover TFTP: add host ip addr support

Quoted 11 lines · Andre Renaud

Jean-Christophe PLAGNIOL-VILLARD wrote:

Doesn't this mean that TftpServerIP will be undefined if no server is specified. Should it not be:

net/tftp.c +1 -1
@@ -464,19 +464,27 @@ TftpStart (void)
 		printf ("*** Warning: no boot file name; using '%s'\n",
 			tftp_filename);
 	} else {
-		tftp_filename = BootFile;
+		char *p=BootFile;

net/tftp.c TftpStart (void) · line 477

Quoted 10 lines
net/tftp.c +9 -0
+		p = strchr (p, ':');
+		if (p != NULL) {
+			TftpServerIP = string_to_ip (BootFile);
+			++p;
+			strcpy (tftp_filename, p);
+		} else {
+			TftpServerIP = NetServerIP;
+			strcpy (tftp_filename, BootFile);
+		}
 

I will prefer

+       TftpServerIP = NetServerIP;
        if (BootFile[0] == '\0') {
                sprintf(default_filename, "%02lX%02lX%02lX%02lX.img",
                        NetOurIP & 0xFF,
@@ -464,19 +465,26 @@ TftpStart (void)
                printf ("*** Warning: no boot file name; using '%s'\n",
                        tftp_filename);
        } else {
-               tftp_filename = BootFile;
+               char *p=BootFile;
+               p = strchr (p, ':');
+               if (p != NULL) {
+                       TftpServerIP = string_to_ip (BootFile);
+                       ++p;
+                       strcpy (tftp_filename, p);

+ } else
+ strcpy (tftp_filename, BootFile);

Quoted 10 lines

Andre

Signature · 7 lines
Bluewater Systems Ltd - ARM Technology Solutions Centre

       Andre Renaud                             Bluewater Systems Ltd
Phone: +64 3 3779127 (Aus 1 800 148 751)        Level 17, 119 Armagh St
Fax:   +64 3 3779135                            PO Box 13889
Email: arenaud at bluewatersys.com                 Christchurch
Web:   http://www.bluewatersys.com              New Zealand
#10 lore raw

PATCH 1/1 Fix nfs command help to reflect that the serverip is optional

In reply to Jean-Christophe PLAGNIOL-VILLARD
Quoted 7 lines · In message <[email protected]> you wrote:
common/cmd_net.c +0 -0
index e03ffbf..894d863 100644

common/cmd_net.c int do_nfs (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) · line 92

Quoted 7 lines
common/cmd_net.c +1 -1
@@ -87,7 +87,7 @@ int do_nfs (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 U_BOOT_CMD(
 	nfs,	3,	1,	do_nfs,
 	"nfs\t- boot image via network using NFS protocol\n",
-	"[loadAddress] [host ip addr:bootfilename]\n"
+	"[loadAddress] [[host ip addr]:bootfilename]\n"
 );
 #endif

Rejected, because this is not correct:

=> print serverip
serverip=192.168.1.1
=> nfs 200000 :/opt/eldk/ppc_4xx/images/uImage Using ppc_4xx_eth0 device
File transfer via NFS from server 0.0.0.0; our IP address is 192.168.80.2
Filename '/opt/eldk/ppc_4xx/images/uImage'.
Load address: 0x200000
Loading: *** ERROR: Cannot mount
...

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Make it right before you make it faster.
#11 lore raw

cover TFTP: add host ip addr support

In reply to Jean-Christophe PLAGNIOL-VILLARD
Quoted 9 lines · In message <[email protected]> you wrote:

allow to use a different server as set in serverip

common/cmd_net.c +0 -0
index 21682c0..e03ffbf 100644

common/cmd_net.c int do_tftpb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) · line 54

Quoted 5 lines
common/cmd_net.c +1 -1
@@ -51,7 +51,7 @@ int do_tftpb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 U_BOOT_CMD(
 	tftpboot,	3,	1,	do_tftpb,
 	"tftpboot- boot image via network using TFTP protocol\n",
-	"[loadAddress] [bootfilename]\n"
+	"[loadAddress] [[host ip addr]:bootfilename]\n"

NAK.

Ben, please don't apply. I reject this patch.

Jean-Christophe - as already discussed on IRC I really ask you to pay attemtion to gvb's comments on your patch:

| Critique: the help is misleading: "host ip addr:" is optional so it 
| needs another set of [] around it.  Having spaces in "host ip addr" is 
| more readable, but makes it look like it is three things or perhaps a 
| keyword.
| 
| I would suggest the following, but there may be a better way...
| 	"[loadAddress] [[hostIPaddr:]bootfilename]\n"

Also make sure that you place the ';' in the right pair of brackets.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"The X11 source code style is ATROCIOUS and should not be used  as  a
model."                                                   - Doug Gwyn
#12 lore raw

cover TFTP: add host ip addr support

allow to use a different server as set in serverip

common/cmd_net.c +1 -1
index 21682c0..4e3d489 100644
@@ -51,7 +51,7 @@ int do_tftpb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 U_BOOT_CMD(
 	tftpboot,	3,	1,	do_tftpb,
 	"tftpboot- boot image via network using TFTP protocol\n",
-	"[loadAddress] [bootfilename]\n"
+	"[loadAddress] [[host ip addr:]bootfilename]\n"
 );
 
 int do_rarpb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
net/tftp.c +13 -5
index 8b95bcf..d5d6e65 100644
@@ -34,7 +34,7 @@
 #define TFTP_ERROR	5
 #define TFTP_OACK	6
 
-
+static IPaddr_t TftpServerIP;
 static int	TftpServerPort;		/* The UDP port at their end		*/
 static int	TftpOurPort;		/* The UDP port at our end		*/
 static int	TftpTimeoutCount;
@@ -231,7 +231,7 @@ TftpSend (void)
 		break;
 	}
 
-	NetSendUDPPacket(NetServerEther, NetServerIP, TftpServerPort, TftpOurPort, len);
+	NetSendUDPPacket(NetServerEther, TftpServerIP, TftpServerPort, TftpOurPort, len);
 }
 
 
@@ -464,19 +464,27 @@ TftpStart (void)
 		printf ("*** Warning: no boot file name; using '%s'\n",
 			tftp_filename);
 	} else {
-		tftp_filename = BootFile;
+		char *p=BootFile;
+		p = strchr (p, ':');
+		if (p != NULL) {
+			TftpServerIP = string_to_ip (BootFile);
+			++p;
+			strcpy (tftp_filename, p);
+		} else {
+			strcpy (tftp_filename, BootFile);
+		}
 	}
 
 #if defined(CONFIG_NET_MULTI)
 	printf ("Using %s device\n", eth_get_name());
 #endif
-	puts ("TFTP from server ");	print_IPaddr (NetServerIP);
+	puts ("TFTP from server ");	print_IPaddr (TftpServerIP);
 	puts ("; our IP address is ");	print_IPaddr (NetOurIP);
 
 	/* Check if we need to send across this subnet */
 	if (NetOurGatewayIP && NetOurSubnetMask) {
 	    IPaddr_t OurNet 	= NetOurIP    & NetOurSubnetMask;
-	    IPaddr_t ServerNet 	= NetServerIP & NetOurSubnetMask;
+	    IPaddr_t ServerNet 	= TftpServerIP & NetOurSubnetMask;
 
 	    if (OurNet != ServerNet) {
 		puts ("; sending through gateway ");
Signature · 1 line
1.5.3.7
#13 lore raw

PATCH 1/1 Fix nfs command help to reflect that the serverip is optional

common/cmd_net.c +1 -1
index 4e3d489..fec87b6 100644
@@ -87,7 +87,7 @@ int do_nfs (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 U_BOOT_CMD(
 	nfs,	3,	1,	do_nfs,
 	"nfs\t- boot image via network using NFS protocol\n",
-	"[loadAddress] [host ip addr:bootfilename]\n"
+	"[loadAddress] [[host ip addr:]bootfilename]\n"
 );
 #endif
 
Signature · 1 line
1.5.3.7
#14 lore raw

PATCH 1/1 Fix nfs command help to reflect that the serverip is optional

common/cmd_net.c int do_nfs (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) · line 90

Quoted 12 lines · In message <[email protected]> you wrote:
common/cmd_net.c +1 -1
index 4e3d489..fec87b6 100644
@@ -87,7 +87,7 @@ int do_nfs (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 U_BOOT_CMD(
 	nfs,	3,	1,	do_nfs,
 	"nfs\t- boot image via network using NFS protocol\n",
-	"[loadAddress] [host ip addr:bootfilename]\n"
+	"[loadAddress] [[host ip addr:]bootfilename]\n"

Rejected. Please see previous reject message for the reason.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
In the beginning, there was nothing, which exploded.
                                - Terry Pratchett, _Lords and Ladies_
#15 lore raw

cover TFTP: add host ip addr support

In reply to Jean-Christophe PLAGNIOL-VILLARD
Quoted 9 lines · In message <[email protected]> you wrote:

allow to use a different server as set in serverip

common/cmd_net.c +0 -0
index 21682c0..4e3d489 100644

common/cmd_net.c int do_tftpb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) · line 54

Quoted 5 lines
common/cmd_net.c +1 -1
@@ -51,7 +51,7 @@ int do_tftpb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 U_BOOT_CMD(
 	tftpboot,	3,	1,	do_tftpb,
 	"tftpboot- boot image via network using TFTP protocol\n",
-	"[loadAddress] [bootfilename]\n"
+	"[loadAddress] [[host ip addr:]bootfilename]\n"

Rejected. Please READ what I wrote before. Heed gvb's suggestion.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Hiring experienced unix people is  like  a  built-in  filter  against
idiots. Hiring experienced NT people provides no such guarantee.
            -- Miguel Cruz in WgL96.349$CC.122704 at typhoon2.ba-dsg.net
#16 lore raw

cover TFTP: add host ip addr support

In reply to Jean-Christophe PLAGNIOL-VILLARD

Jean-Christophe PLAGNIOL-VILLARD wrote:

<snip>

This doesn't work.
Baseline: (before patch applied):

=> tftp 100000 mpc8349emds/u-boot.bin.newnfs
Speed: 100, full duplex
Using TSEC0 device
TFTP from server 10.69.69.21; our IP address is 10.69.69.201 Filename 'mpc8349emds/u-boot.bin.newnfs'.
Load address: 0x100000
Loading: ####################################### done
Bytes transferred = 198116 (305e4 hex)

Problem #1. First time through, with patch. Doesn't use serverip, so no default server:

=> tftp 100000 mpc8349emds/u-boot.bin
Speed: 100, full duplex
Using TSEC0 device
TFTP from server 0.0.0.0; our IP address is 10.69.69.201; sending through gatew1 Filename '<NULL>'.
Load address: 0x100000
Loading: *
TFTP error: 'File not found' (1)
Starting again

Problem #2. Doesn't parse file name:

=> tftp 100000 10.69.69.21:mpc8349emds/u-boot.bin
Speed: 100, full duplex
Using TSEC0 device
TFTP from server 10.69.69.21; our IP address is 10.69.69.201 Filename '<NULL>'.
Load address: 0x100000
Loading: ##################################
done
Bytes transferred = 170996 (29bf4 hex)

Please fix these if you want the code included.

regards,
Ben

#17 lore raw

PATCH 1/1 TFTP: add host ip addr support

In reply to Jean-Christophe PLAGNIOL-VILLARD
Quoted 2 lines · On Mon, 24 Dec 2007 16:55:38 +0100 Jean-Christophe PLAGNIOL-VILLARD…

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD
<[email protected]>

Jean-Christophe, I love your work, but your changelogs totally suck. Could you please add a bit of text explaining what kind of problem this patch solves?

Haavard

#18 lore raw

PATCH 1/1 TFTP: add host ip addr support

Quoted 9 lines · In message <20071226214227.499a2109@siona> you wrote:
Quoted 2 lines · On Mon, 24 Dec 2007 16:55:38 +0100 Jean-Christophe PLAGNIOL-VILLARD…

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD
<[email protected]>

Jean-Christophe, I love your work, but your changelogs totally suck. Could you please add a bit of text explaining what kind of problem this patch solves?

I support this request.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Testing can show the presense of bugs, but not their absence.
                                                   -- Edsger Dijkstra