diff options
| author | Tom Rini <[email protected]> | 2026-05-13 07:53:21 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-05-13 07:54:10 -0600 |
| commit | 944427c3da6591f7971f48d91d69b60cbff3db12 (patch) | |
| tree | c0166af53ee938843a09d5179c46ba08367bee79 /lib | |
| parent | 36d4c653580824b16574560b21d4401614d8b68e (diff) | |
| parent | 612256838acec75407b1a268459c3a9dbb63c7f9 (diff) | |
Merge tag 'u-boot-stm32-20260512' of https://source.denx.de/u-boot/custodians/u-boot-stm
CI: https://source.denx.de/u-boot/custodians/u-boot-stm/-/pipelines/30081
- reset: stm32: Fix compilation error
- Remove remaining non-existant STM32_RESET flag
- configs: stm32mp13: Add SPI-NAND UBI boot support
- Support metadata-driven A/B boot for STM32MP25
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/fwu_updates/fwu.c | 33 | ||||
| -rw-r--r-- | lib/uuid.c | 1 |
2 files changed, 34 insertions, 0 deletions
diff --git a/lib/fwu_updates/fwu.c b/lib/fwu_updates/fwu.c index e82600a29a4..2b11e5da061 100644 --- a/lib/fwu_updates/fwu.c +++ b/lib/fwu_updates/fwu.c @@ -244,6 +244,39 @@ int fwu_sync_mdata(struct fwu_mdata *mdata, int part) } /** + * fwu_mdata_get_image_guid() - Get image GUID for a type and bank + * @image_guid: Pointer to be filled with the found image GUID + * @image_type_guid: Pointer to the image type GUID to search for + * @bank_index: Index of the bank + * + * Return: 0 if OK, -ve on error + */ +int fwu_mdata_get_image_guid(efi_guid_t *image_guid, + const efi_guid_t *image_type_guid, u32 bank_index) +{ + struct fwu_data *data = &g_fwu_data; + struct fwu_image_entry *image; + int i; + + if (bank_index >= data->num_banks) + return -EINVAL; + + for (i = 0; i < data->num_images; i++) { + image = &data->fwu_images[i]; + + if (!guidcmp(image_type_guid, &image->image_type_guid)) { + struct fwu_image_bank_info *bank; + + bank = &image->img_bank_info[bank_index]; + guidcpy(image_guid, &bank->image_guid); + return 0; + } + } + + return -ENOENT; +} + +/** * fwu_mdata_copies_allocate() - Allocate memory for metadata * @mdata_size: Size of the metadata structure * diff --git a/lib/uuid.c b/lib/uuid.c index 3a666d0430d..d7c164ea06b 100644 --- a/lib/uuid.c +++ b/lib/uuid.c @@ -86,6 +86,7 @@ static const struct { {"swap", NULL, PARTITION_LINUX_SWAP_GUID}, {"lvm", NULL, PARTITION_LINUX_LVM_GUID}, {"u-boot-env", NULL, PARTITION_U_BOOT_ENVIRONMENT}, + {"xbootldr", NULL, PARTITION_XBOOTLDR}, {"cros-kern", NULL, PARTITION_CROS_KERNEL}, {"cros-root", NULL, PARTITION_CROS_ROOT}, {"cros-fw", NULL, PARTITION_CROS_FIRMWARE}, |
