summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/Kconfig25
-rw-r--r--cmd/cat.c1
-rw-r--r--cmd/pxe.c2
-rw-r--r--cmd/ximg.c18
4 files changed, 41 insertions, 5 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig
index f21d27cb27f..9a70c7a0b83 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -1986,6 +1986,7 @@ config BOOTP_PXE_CLIENTARCH
config BOOTP_PXE_DHCP_OPTION
bool "Request & store 'pxe_configfile' from BOOTP/DHCP server"
+ default y
depends on BOOTP_PXE
config BOOTP_VCI_STRING
@@ -1996,6 +1997,30 @@ config BOOTP_VCI_STRING
default "U-Boot.arm" if ARM
default "U-Boot"
+config BOOTP_RANDOM_XID
+ bool "Send random transaction ID to BOOTP/DHCP server"
+ depends on CMD_BOOTP && (LIB_RAND || LIB_HW_RAND)
+ help
+ Selecting this will allow for a random transaction ID to get
+ selected for each BOOTP/DHCPv4 exchange.
+
+if CMD_DHCP6
+
+config DHCP6_PXE_CLIENTARCH
+ hex
+ default 0x16 if ARM64
+ default 0x15 if ARM
+ default 0xFF
+
+config DHCP6_PXE_DHCP_OPTION
+ bool "Request & store 'pxe_configfile' from DHCP6 server"
+
+config DHCP6_ENTERPRISE_ID
+ int "Enterprise ID to send in DHCPv6 Vendor Class Option"
+ default 0
+
+endif
+
config CMD_TFTPPUT
bool "tftp put"
depends on CMD_TFTPBOOT
diff --git a/cmd/cat.c b/cmd/cat.c
index 6828b7b364e..3167cda6032 100644
--- a/cmd/cat.c
+++ b/cmd/cat.c
@@ -8,6 +8,7 @@
#include <fs.h>
#include <malloc.h>
#include <mapmem.h>
+#include <linux/errno.h>
static int do_cat(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
diff --git a/cmd/pxe.c b/cmd/pxe.c
index 0f26b3b4219..71d8b542b28 100644
--- a/cmd/pxe.c
+++ b/cmd/pxe.c
@@ -64,6 +64,8 @@ static int pxe_dhcp_option_path(struct pxe_context *ctx, unsigned long pxefile_a
int ret = get_pxe_file(ctx, pxelinux_configfile, pxefile_addr_r);
free(pxelinux_configfile);
+ /* set to NULL to avoid double-free if DHCP is tried again */
+ pxelinux_configfile = NULL;
return ret;
}
diff --git a/cmd/ximg.c b/cmd/ximg.c
index 29d7c3279b3..e97167a79cc 100644
--- a/cmd/ximg.c
+++ b/cmd/ximg.c
@@ -27,6 +27,7 @@
#include <asm/byteorder.h>
#include <asm/cache.h>
#include <asm/io.h>
+#include <u-boot/zlib.h>
static int
do_imgextract(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
@@ -206,11 +207,18 @@ do_imgextract(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
break;
#ifdef CONFIG_GZIP
case IH_COMP_GZIP:
- printf(" Uncompressing part %d ... ", part);
- if (gunzip((void *) dest, unc_len,
- (uchar *) data, &len) != 0) {
- puts("GUNZIP ERROR - image not loaded\n");
- return 1;
+ {
+ int ret = 0;
+ printf(" Uncompressing part %d ... ", part);
+ ret = gunzip((void *)dest, unc_len,
+ (uchar *)data, &len);
+ if (ret == Z_BUF_ERROR) {
+ puts("Image too large: increase CONFIG_SYS_XIMG_LEN\n");
+ return 1;
+ } else if (ret != 0) {
+ puts("GUNZIP ERROR - image not loaded\n");
+ return 1;
+ }
}
break;
#endif