How does fwupd update the FMP UEFI capsule file ( cab file) generated from edk2?

39 views
Skip to first unread message

潘自誠

unread,
Nov 9, 2022, 4:29:05 AM11/9/22
to fwupd

Hi all,

I used the example of edk2 platform to generate Red.16.cap and Red.16.cab, the source code is as follows:
    https://github.com/tianocore/edk2-platforms/tree/master/Platform/Intel/Vlv2TbltDevicePkg
Where Red.16.cap is a dummy test example and does not actually update the firmware.
I execute the following command in UEFI shell to update FMP UEFI capsule successfully:
     capsuleapp Red.16.cap
My system is as follows:

  Minnowboard Max 
  UEFI x64 
  Linux fedora 6.0.5-200.fc36.x86_64

I execute following command n fedora,
      sudo fwupdmgr install Red.16.cab
After the end, it shows the following messages:
      Successfully installed firmware.Restart Now?[y|N]
After choosing to restart, I see the following error message under UEFI:

   Unknown Capsule Guid - 72E2945A-00DA-448E-9AA7-075AD840F9D4 
   WARNING:  QueryCapsuleCapabilities failed, assuming EfiResetWarm: Unsupported       Unknown  Capsule Guid - 72E2945A-00DA-448E-9AA7-075AD840F9D4
   WARNING: Could not apply capsule update: Unsupported 
   WARNING: Could not apply capsules: Unsupported

It can be seen that the fwupd update fw did not succeed。

I execute ‘sudo fwupdmgr get-devices’ on fedora and got the following messages:

─UEFI Device Firmware:
 │ │ Device ID: f95c9218acd12697af946874bfe4239587209232 
 │ │ Previous version: 1
 │ │ Update State: Needs reboot 
 │ │ Last modified: 2022-07-14 00:19 
 │ │ GUID: 72e2945a-00da-448e-9aa7-075ad840f9d4 
 │ │ Device Flags: • Internal device 
 │ │ • Updatable 
 │ │ • System requires external power source 
 │ │ • Needs a reboot after installation 
 │ │ • Device is usable for the duration of the update 
 │ │ │ └─ New version: 16 
 │ License: Unknown 
 │ Description: 
 │ The vendor did not supply any release notes.

As can be seen from GenCapsuleAll.py of edk2:
   GenCapsuleSampleDevice('Red','72e2945a-00da-448e-9aa7-  075ad840f9d4',0x00000010,0x00000000, CapsulesPath, CapsulesSubDir)
The Capsule Guid can be found by fwupd, but the system reboot shows Unknown Capsule Guid’.

By the way, after updating Red.16.cab, I have successfully restarted Linux, but after restarting, it shows that it needs to be restarted.
My questions are as follows:

  1.Update Red.16.cap in UEFI shell, restarts system and it got the following messages:

           Setting BootMode to BOOT_ON_S3_RESUME

       And restart after fwupd update Red.16.cab, see the following UEFI message:

            Setting BootMode to BOOT_WITH_FULL_CONFIGURATION

      It can be seen that the mode of the two is different after UEFI restarts.  

      Is it correct that fwupd does not enter S3_RESUME mode after restarting?

   2. Can the cab file generated in edk2 be updated directly in fwupd? Or what to modify before executing fwupd?

   3. Does fwupd have other samples to test UEFI capsule(cab) update? Are there detailed operating procedures?

    Any suggestion is highly appreciated!

     Thanks!

Reply all
Reply to author
Forward
0 new messages