Skip to contentSkip to conversation

Correct vxWorks elf boot to load at correct address

PATCH In review Stany MARCEL 2 participants 2 messages Nov 27, 2013 – Dec 16, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Correct vxWorks elf boot to load at correct address

argv[0] contains bootvx (command name) not the load address, if called with argv < 2 use load_addr, else use address argument given to the command.

---

This patch has been tested on uboot-xlnx master.

 common/cmd_elf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
common/cmd_elf.c +3 -3
index f741f6b..ab9c7e3 100644
@@ -156,16 +156,16 @@ int do_bootvx(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	 * If we don't know where the image is then we're done.
 	 */
 
-	if (argc < 1)
+	if (argc < 2)
 		addr = load_addr;
 	else
-		addr = simple_strtoul(argv[0], NULL, 16);
+		addr = simple_strtoul(argv[1], NULL, 16);
 
 #if defined(CONFIG_CMD_NET)
 	/*
 	 * Check to see if we need to tftp the image ourselves before starting
 	 */
-	if ((argc == 1) && (strcmp(argv[0], "tftp") == 0)) {
+	if ((argc == 2) && (strcmp(argv[1], "tftp") == 0)) {
 		if (NetLoop(TFTPGET) <= 0)
 			return 1;
 		printf("Automatic boot of VxWorks image@address 0x%08lx ...\n",

--
1.8.1.2

#1 lore raw
Quoted 4 lines · Stany MARCEL

argv[0] contains bootvx (command name) not the load address, if called with argv < 2 use load_addr, else use address argument given to the command.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131216/ff16d42a/attachment.pgp>