summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2025-04-11 09:09:08 -0600
committerTom Rini <[email protected]>2025-04-11 09:09:08 -0600
commitdea298c62e904dd697e7b91bd3dae5d839f31d8f (patch)
tree796cb253e7511a277c0b54e1c3fb87306a56f353 /cmd
parent048266be426865282e8a482fe1f25bb919a9bfb8 (diff)
parenta73b854700abcf680379497c32b92aa39fed6270 (diff)
Merge tag 'efi-2025-07-rc1' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request efi-2025-07-rc1 CI: * https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/25648 Documentation: * Update authenticated capsules documentation UEFI: * Add support for loading FIT images including initrd - efi_loader: efi_load_initrd: provide a memory mapped initrd - efi_loader: binary_run: register an initrd - bootm: add support for initrd in do_bootm_efi * efi_selftest: remove un-needed NULL checks * efi: Fix efiboot for payloads loaded from memory * Print extra information from the bootmgr * Move public cert for capsules to .rodata * Set EFI capsule dfu_alt_info env explicitly * Make FDT extra space configurable * Install the ACPI table from the bloblist * Handle GD_FLG_SKIP_RELOC * Handle malloc() errors Others: * acpi: select CONFIG_BLOBLIST * smbios: select CONFIG_BLOBLIST * xilinx: dfu: Fill directly update_info.dfu_string * cmd: fwu: Dump custom fields from mdata structure * board: remove capsule update support in set_dfu_alt_info()
Diffstat (limited to 'cmd')
-rw-r--r--cmd/Kconfig1
-rw-r--r--cmd/bootefi.c2
-rw-r--r--cmd/fwu_mdata.c25
3 files changed, 27 insertions, 1 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig
index ecef664fcea..c2ce519d1e3 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -185,6 +185,7 @@ config CMD_UFETCH
config CMD_FWU_METADATA
bool "fwu metadata read"
depends on FWU_MULTI_BANK_UPDATE
+ imply HEXDUMP if FWU_MDATA_V2
help
Command to read the metadata and dump it's contents
diff --git a/cmd/bootefi.c b/cmd/bootefi.c
index c1454ffb948..dce8285b047 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -211,7 +211,7 @@ static int do_bootefi(struct cmd_tbl *cmdtp, int flag, int argc,
}
}
- ret = efi_binary_run(image_buf, size, fdt);
+ ret = efi_binary_run(image_buf, size, fdt, NULL, 0);
if (ret != EFI_SUCCESS)
return CMD_RET_FAILURE;
diff --git a/cmd/fwu_mdata.c b/cmd/fwu_mdata.c
index 9c048d69a13..5b5a2e4d1cd 100644
--- a/cmd/fwu_mdata.c
+++ b/cmd/fwu_mdata.c
@@ -7,6 +7,7 @@
#include <dm.h>
#include <fwu.h>
#include <fwu_mdata.h>
+#include <hexdump.h>
#include <log.h>
#include <stdio.h>
#include <stdlib.h>
@@ -45,6 +46,30 @@ static void print_mdata(struct fwu_data *data)
img_info->accepted == 0x1 ? "yes" : "no");
}
}
+
+ if (data->version == 2) {
+ struct fwu_mdata *mdata = data->fwu_mdata;
+ struct fwu_fw_store_desc *desc;
+ void *end;
+ u32 diff;
+
+ /*
+ * fwu_mdata defines only header that's why taking it as array
+ * which exactly point to image description location
+ */
+ desc = (struct fwu_fw_store_desc *)&mdata[1];
+
+ /* Number of entries is taken from for loop - variable i */
+ end = &desc->img_entry[i];
+ debug("mdata %p, desc %p, end %p\n", mdata, desc, end);
+
+ diff = data->metadata_size - ((void *)end - (void *)mdata);
+ if (diff) {
+ printf("Custom fields covered by CRC len: 0x%x\n", diff);
+ print_hex_dump_bytes("CUSTOM ", DUMP_PREFIX_OFFSET,
+ end, diff);
+ }
+ }
}
int do_fwu_mdata_read(struct cmd_tbl *cmdtp, int flag,