aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-06-28 16:22:13 -0400
committerTom Rini <trini@konsulko.com>2021-06-28 16:22:13 -0400
commit6d0453d88915feeece6e55748a2476d8509e5fad (patch)
treef4564a64f771cb071a74787f11471250fdbdf47b /cmd
parent67edf2553f15e5148efca213af3f41cef3410680 (diff)
parent3ef4572110a43acdd7d401b0cb184c6ebd6eaa17 (diff)
downloadu-boot-6d0453d88915feeece6e55748a2476d8509e5fad.zip
u-boot-6d0453d88915feeece6e55748a2476d8509e5fad.tar.gz
u-boot-6d0453d88915feeece6e55748a2476d8509e5fad.tar.bz2
Merge tag 'v2021.07-rc5' into next
Prepare v2021.07-rc5 # gpg: Signature made Mon 28 Jun 2021 03:39:36 PM EDT # gpg: using RSA key 1A3C7F70E08FAB1707809BBF147C39FF9634B72C # gpg: Good signature from "Thomas Rini <trini@konsulko.com>" [ultimate] # Conflicts: # configs/am64x_evm_r5_defconfig
Diffstat (limited to 'cmd')
-rw-r--r--cmd/Kconfig5
-rw-r--r--cmd/mmc.c14
-rw-r--r--cmd/pxe_utils.c8
3 files changed, 21 insertions, 6 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig
index f962bb7..a9fb4ee 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -1346,8 +1346,11 @@ config CMD_ROCKUSB
config CMD_USB_MASS_STORAGE
bool "UMS usb mass storage"
select USB_FUNCTION_MASS_STORAGE
+ depends on BLK && USB_GADGET
help
- USB mass storage support
+ Enables the command "ums" and the USB mass storage support to the
+ export a block device: U-Boot, the USB device, acts as a simple
+ external hard drive plugged on the host USB port.
config CMD_PVBLOCK
bool "Xen para-virtualized block device"
diff --git a/cmd/mmc.c b/cmd/mmc.c
index a10f137..b942576 100644
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -808,7 +808,7 @@ static int do_mmc_boot_resize(struct cmd_tbl *cmdtp, int flag,
return CMD_RET_SUCCESS;
}
-static int mmc_partconf_print(struct mmc *mmc)
+static int mmc_partconf_print(struct mmc *mmc, const char *varname)
{
u8 ack, access, part;
@@ -821,6 +821,9 @@ static int mmc_partconf_print(struct mmc *mmc)
ack = EXT_CSD_EXTRACT_BOOT_ACK(mmc->part_config);
part = EXT_CSD_EXTRACT_BOOT_PART(mmc->part_config);
+ if(varname)
+ env_set_hex(varname, part);
+
printf("EXT_CSD[179], PARTITION_CONFIG:\n"
"BOOT_ACK: 0x%x\n"
"BOOT_PARTITION_ENABLE: 0x%x\n"
@@ -836,7 +839,7 @@ static int do_mmc_partconf(struct cmd_tbl *cmdtp, int flag,
struct mmc *mmc;
u8 ack, part_num, access;
- if (argc != 2 && argc != 5)
+ if (argc != 2 && argc != 3 && argc != 5)
return CMD_RET_USAGE;
dev = simple_strtoul(argv[1], NULL, 10);
@@ -850,8 +853,8 @@ static int do_mmc_partconf(struct cmd_tbl *cmdtp, int flag,
return CMD_RET_FAILURE;
}
- if (argc == 2)
- return mmc_partconf_print(mmc);
+ if (argc == 2 || argc == 3)
+ return mmc_partconf_print(mmc, argc == 3 ? argv[2] : NULL);
ack = simple_strtoul(argv[2], NULL, 10);
part_num = simple_strtoul(argv[3], NULL, 10);
@@ -1061,8 +1064,9 @@ U_BOOT_CMD(
" - Set the BOOT_BUS_WIDTH field of the specified device\n"
"mmc bootpart-resize <dev> <boot part size MB> <RPMB part size MB>\n"
" - Change sizes of boot and RPMB partitions of specified device\n"
- "mmc partconf <dev> [boot_ack boot_partition partition_access]\n"
+ "mmc partconf <dev> [[varname] | [<boot_ack> <boot_partition> <partition_access>]]\n"
" - Show or change the bits of the PARTITION_CONFIG field of the specified device\n"
+ " If showing the bits, optionally store the boot_partition field into varname\n"
"mmc rst-function <dev> <value>\n"
" - Change the RST_n_FUNCTION field of the specified device\n"
" WARNING: This is a write-once field and 0 / 1 / 2 are the only valid values.\n"
diff --git a/cmd/pxe_utils.c b/cmd/pxe_utils.c
index 71c5af4..9a30629 100644
--- a/cmd/pxe_utils.c
+++ b/cmd/pxe_utils.c
@@ -587,6 +587,14 @@ static int label_boot(struct cmd_tbl *cmdtp, struct pxe_label *label)
f2 = "-";
f3 = env_get("board");
f4 = ".dtb";
+ if (!f1) {
+ f1 = "";
+ f2 = "";
+ }
+ if (!f3) {
+ f2 = "";
+ f3 = "";
+ }
}
len = strlen(label->fdtdir);