[PATCH v3 5/9] capsule: kconfig: Select SET_DFU_ALT_INFO config symbol for capsule update

Sughosh Ganu sughosh.ganu at linaro.org
Wed Mar 30 16:50:59 CEST 2022


The capsule update code uses the dfu_alt_info variable for the actual
update of the firmware component. The dfu_alt_info variable gives
information needed to perform the update, like the device on which the
update is to be made, the partition, type of partition etc. Since the
dfu_alt_info is a environmental variable, it can be modified from the
u-boot command line. An incorrect update of the variable will result
in the update being done incorrectly.

Prevent this scenario by forcing an update of the dfu_alt_info
variable from the information obtained through the board file when
UEFI capsule update functionality is enabled.

Signed-off-by: Sughosh Ganu <sughosh.ganu at linaro.org>
---

Changes since V2: New Patch

 lib/efi_loader/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig
index e5e35fe51f..09fb8cbe75 100644
--- a/lib/efi_loader/Kconfig
+++ b/lib/efi_loader/Kconfig
@@ -174,6 +174,7 @@ config EFI_CAPSULE_FIRMWARE_FIT
 	depends on EFI_CAPSULE_FIRMWARE_MANAGEMENT
 	select UPDATE_FIT
 	select DFU
+	select SET_DFU_ALT_INFO
 	select EFI_CAPSULE_FIRMWARE
 	help
 	  Select this option if you want to enable firmware management protocol
@@ -185,6 +186,7 @@ config EFI_CAPSULE_FIRMWARE_RAW
 	depends on SANDBOX || (!SANDBOX && !EFI_CAPSULE_FIRMWARE_FIT)
 	select DFU_WRITE_ALT
 	select DFU
+	select SET_DFU_ALT_INFO
 	select EFI_CAPSULE_FIRMWARE
 	help
 	  Select this option if you want to enable firmware management protocol
-- 
2.25.1



More information about the U-Boot mailing list