mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
efi_loader: capsule: add capsule_on_disk support
Capsule data can be loaded into the system either via UpdateCapsule runtime service or files on a file system (of boot device). The latter case is called "capsules on disk", and actual updates will take place at the next boot time. In this commit, we will support capsule on disk mechanism. Please note that U-Boot itself has no notion of "boot device" and all the capsule files to be executed will be detected only if they are located in a specific directory, \EFI\UpdateCapsule, on a device that is identified as a boot device by "BootXXXX" variables. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
This commit is contained in:
parent
2bc27ca8a0
commit
c74cd8bd08
5 changed files with 541 additions and 0 deletions
|
@ -825,6 +825,11 @@ efi_status_t EFIAPI efi_query_capsule_caps(
|
|||
u64 *maximum_capsule_size,
|
||||
u32 *reset_type);
|
||||
|
||||
#define EFI_CAPSULE_DIR L"\\EFI\\UpdateCapsule\\"
|
||||
|
||||
/* Hook at initialization */
|
||||
efi_status_t efi_launch_capsules(void);
|
||||
|
||||
#else /* CONFIG_IS_ENABLED(EFI_LOADER) */
|
||||
|
||||
/* Without CONFIG_EFI_LOADER we don't have a runtime section, stub it out */
|
||||
|
@ -841,6 +846,10 @@ static inline void efi_set_bootdev(const char *dev, const char *devnr,
|
|||
const char *path) { }
|
||||
static inline void efi_net_set_dhcp_ack(void *pkt, int len) { }
|
||||
static inline void efi_print_image_infos(void *pc) { }
|
||||
static inline efi_status_t efi_launch_capsules(void)
|
||||
{
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_IS_ENABLED(EFI_LOADER) */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue