]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
rockchip: only build GPT capsule update helpers with PARTITION_TYPE_GUID
authorDaniel Golle <daniel@makrotopia.org>
Sun, 19 Jul 2026 01:52:11 +0000 (02:52 +0100)
committerQuentin Schulz <u-boot@0leil.net>
Thu, 23 Jul 2026 12:51:25 +0000 (14:51 +0200)
The GPT-based capsule update helpers match updatable images by
partition type GUID and fail to build if PARTITION_TYPE_GUID is not
enabled:

  arch/arm/mach-rockchip/board.c:50:29: error: 'struct disk_partition'
  has no member named 'type_guid'

Boards which keep their firmware on SPI-NOR use a static dfu_string
instead of scanning GPT partitions and have no use for this code, so
guard it accordingly.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Fixes: bea9267d7e6d ("rockchip: capsule: Add functions for supporting capsule updates")
Link: https://patch.msgid.link/af0ac32e2bf603c39f490f15fe62319fd73c5282.1784423864.git.daniel@makrotopia.org
Signed-off-by: Quentin Schulz <u-boot@0leil.net>
arch/arm/mach-rockchip/board.c

index 2e6bb38b9235661861102c105370b30821f04f57..98c890d3bdc11a2cbc6eff4488c2ea1b4e798958 100644 (file)
@@ -35,7 +35,8 @@
 #include <asm/arch-rockchip/periph.h>
 #include <power/regulator.h>
 
-#if IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) && IS_ENABLED(CONFIG_EFI_PARTITION)
+#if IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) && IS_ENABLED(CONFIG_EFI_PARTITION) && \
+       IS_ENABLED(CONFIG_PARTITION_TYPE_GUID)
 
 #define DFU_ALT_BUF_LEN                        SZ_1K
 
@@ -193,7 +194,8 @@ int board_late_init(void)
 {
        setup_boot_mode();
 
-#if IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) && IS_ENABLED(CONFIG_EFI_PARTITION)
+#if IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) && IS_ENABLED(CONFIG_EFI_PARTITION) && \
+       IS_ENABLED(CONFIG_PARTITION_TYPE_GUID)
        gpt_capsule_update_setup();
 #endif