]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sandbox: Enable wget command
authorYasuharu Shibata <yasuharu.shibata@gmail.com>
Wed, 14 Aug 2024 12:41:06 +0000 (21:41 +0900)
committerTom Rini <trini@konsulko.com>
Thu, 15 Aug 2024 17:32:12 +0000 (11:32 -0600)
Enable this so that the tests run.

Fix a few warnings in the code so that CI passes.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Yasuharu Shibata <yasuharu.shibata@gmail.com>
cmd/Kconfig
net/wget.c

index 8af136d2bd4aa314358247d72402b3f565551642..43f78a5aeb107b36410fbcebac7683fba457864e 100644 (file)
@@ -2010,6 +2010,7 @@ config SYS_DISABLE_AUTOLOAD
 config CMD_WGET
        bool "wget"
        select PROT_TCP
+       default y if SANDBOX
        help
          wget is a simple command to download kernel, or other files,
          from a http server over TCP.
index f1dd7abeff69a75510f650f646ea71c932177b83..945bfd266939e713940bb86f0c2ece3e0f964edb 100644 (file)
@@ -244,7 +244,7 @@ static void wget_connected(uchar *pkt, unsigned int tcp_seq_num,
                pkt_in_q = (void *)image_load_addr + PKT_QUEUE_OFFSET +
                        (pkt_q_idx * PKT_QUEUE_PACKET_SIZE);
 
-               ptr1 = map_sysmem((phys_addr_t)pkt_in_q, len);
+               ptr1 = map_sysmem((ulong)pkt_in_q, len);
                memcpy(ptr1, pkt, len);
                unmap_sysmem(ptr1);
 
@@ -314,9 +314,8 @@ static void wget_connected(uchar *pkt, unsigned int tcp_seq_num,
                        for (i = 0; i < pkt_q_idx; i++) {
                                int err;
 
-                               ptr1 = map_sysmem(
-                                       (phys_addr_t)(pkt_q[i].pkt),
-                                       pkt_q[i].len);
+                               ptr1 = map_sysmem((ulong)pkt_q[i].pkt,
+                                                 pkt_q[i].len);
                                err = store_block(ptr1,
                                          pkt_q[i].tcp_seq_num -
                                          initial_data_seq_num,