[edk2-devel] [PATCH] MdeModulePkg/CapsuleApp: support on-disk with undefined BootOrder

Vincent Stehlé posted 1 patch 1 year, 8 months ago
Failed in applying to current master (apply log)
MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
[edk2-devel] [PATCH] MdeModulePkg/CapsuleApp: support on-disk with undefined BootOrder
Posted by Vincent Stehlé 1 year, 8 months ago
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4038

When BootOrder is not defined, CapsuleApp.efi will not find a file system
to store the capsule for on-disk update because GetUpdateFileSystem() will
fail.

BootOrder is an EFI Global Variable, which default state is firmware vendor
specific. It is possible for BootOrder to not be defined as mentioned in
the UEFI Specification in chapter 3.4.3, "Boot Option Variables Default
Boot Behavior".

Relax the check to allow that case.

Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
---


Hi,

This has passed CI with pull request https://github.com/tianocore/edk2/pull/3263.

Best regards,
Vincent.


 MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c b/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c
index 5ce5a50f7b..f04de00f65 100644
--- a/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c
+++ b/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c
@@ -456,10 +456,7 @@ GetUpdateFileSystem (
   // 2. Get EFI system partition form boot options.

   //

   BootOptionBuffer = EfiBootManagerGetLoadOptions (&BootOptionCount, LoadOptionTypeBoot);

-  if ((BootOptionBuffer == NULL) ||

-      ((BootOptionCount == 0) && (Map == NULL))

-      )

-  {

+  if ((BootOptionBuffer != NULL) && (BootOptionCount == 0) && (Map == NULL)) {

     return EFI_NOT_FOUND;

   }

 

-- 
2.35.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#93011): https://edk2.groups.io/g/devel/message/93011
Mute This Topic: https://groups.io/mt/93376313/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-