mbox series

[isar-cip-core,v5,0/7] Add Bootloader to sw-description

Message ID 20240111200015.190376-1-Quirin.Gylstorff@siemens.com (mailing list archive)
Headers show
Series Add Bootloader to sw-description | expand

Message

Gylstorff Quirin Jan. 11, 2024, 7:59 p.m. UTC
From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

This series adds the, possible signed, efibootguard binaries to the deploy dir
and adds them to swu file and sw-description to update the bootloader.

The new entry contains following information:
{
           filename = "{efi_boot_loader_file}";
           path = "EFI/BOOT/{efi_boot_loader_file}";
           device = "{efi_boot_device}";
           filesystem = "vfat";
           sha256 = "{efi_boot_loader_file}-sha256";
           properties: {
                atomic-install = "true";
           };
}
Changes v5:
 - Add efibootguard section to README.swupdate.md
 - remove whitespace
 - Move variable EFI_ARCH and EFI_LIB_ARCH to correct patch

Changes v4:
  - Rebase to latest next
  - Remove the generator for sw-description -> if requested this can be
    added as a new patchset
  - Add new class containing the efibootguard specific settings
  - Add variable EFI_ARCH and EFI_LIB_ARCH to reduces dupilicated code
  - Generate a additional swu only for the bootloader. This will be
    always generated. If the bootloader should be added to the
    <rootfs>.swu the variable SWU_EBG_UPDATE needs to be set.

Changes v3:
 - Add Generator for sw-description instead of using a template for
   Debian 11+.

Changes v2:
 - The efibootguard file is only added if the new variable `SWU_EBG_UPDATE` equals `1`
 - Add the variable `SWU_EFI_BOOT_DEVICE` to set the device containing
   the efibootguard binary
 - Add the variable `SWU_EXTEND_SW_DESCRIPTION` to all extension of the
   sw-description file
 - use atomic-install to update the binary atomically


Quirin Gylstorff (7):
  Move efibootguard specific settings from include to class file
  efibootguard.bbclass: Add functions to generate the EFI_ARCH and
    EFI_LIB_ARCH
  efibootguard-efi.py: copy signed ebg binary to DEPLOY_DIR
  swupdate.bbclass: Add SWU_EXTEND_SW_DESCRIPTION
  swupdate: Extend sw-description to update efibootguard
  classes/swupdate: Generate swu containing only efibootguard
  doc/README.swupdate.md: add new section for bootloader updates

 classes/efibootguard.bbclass                  |  42 +++++
 classes/swupdate.bbclass                      | 143 +++++++++++++-----
 doc/README.swupdate.md                        |  13 ++
 recipes-core/images/efibootguard.inc          |   9 +-
 .../images/swu/sw-description-ebg.tmpl        |  17 +++
 recipes-core/images/swu/sw-description.tmpl   |   2 +-
 .../wic/plugins/source/efibootguard-boot.py   |  29 ++--
 .../wic/plugins/source/efibootguard-efi.py    |  50 +++---
 8 files changed, 222 insertions(+), 83 deletions(-)
 create mode 100644 classes/efibootguard.bbclass
 create mode 100644 recipes-core/images/swu/sw-description-ebg.tmpl

Comments

Jan Kiszka Jan. 15, 2024, 8:23 a.m. UTC | #1
On 11.01.24 20:59, Quirin Gylstorff wrote:
> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> 
> This series adds the, possible signed, efibootguard binaries to the deploy dir
> and adds them to swu file and sw-description to update the bootloader.
> 
> The new entry contains following information:
> {
>            filename = "{efi_boot_loader_file}";
>            path = "EFI/BOOT/{efi_boot_loader_file}";
>            device = "{efi_boot_device}";
>            filesystem = "vfat";
>            sha256 = "{efi_boot_loader_file}-sha256";
>            properties: {
>                 atomic-install = "true";
>            };
> }
> Changes v5:
>  - Add efibootguard section to README.swupdate.md
>  - remove whitespace
>  - Move variable EFI_ARCH and EFI_LIB_ARCH to correct patch
> 
> Changes v4:
>   - Rebase to latest next
>   - Remove the generator for sw-description -> if requested this can be
>     added as a new patchset
>   - Add new class containing the efibootguard specific settings
>   - Add variable EFI_ARCH and EFI_LIB_ARCH to reduces dupilicated code
>   - Generate a additional swu only for the bootloader. This will be
>     always generated. If the bootloader should be added to the
>     <rootfs>.swu the variable SWU_EBG_UPDATE needs to be set.
> 
> Changes v3:
>  - Add Generator for sw-description instead of using a template for
>    Debian 11+.
> 
> Changes v2:
>  - The efibootguard file is only added if the new variable `SWU_EBG_UPDATE` equals `1`
>  - Add the variable `SWU_EFI_BOOT_DEVICE` to set the device containing
>    the efibootguard binary
>  - Add the variable `SWU_EXTEND_SW_DESCRIPTION` to all extension of the
>    sw-description file
>  - use atomic-install to update the binary atomically
> 
> 
> Quirin Gylstorff (7):
>   Move efibootguard specific settings from include to class file
>   efibootguard.bbclass: Add functions to generate the EFI_ARCH and
>     EFI_LIB_ARCH
>   efibootguard-efi.py: copy signed ebg binary to DEPLOY_DIR
>   swupdate.bbclass: Add SWU_EXTEND_SW_DESCRIPTION
>   swupdate: Extend sw-description to update efibootguard
>   classes/swupdate: Generate swu containing only efibootguard
>   doc/README.swupdate.md: add new section for bootloader updates
> 
>  classes/efibootguard.bbclass                  |  42 +++++
>  classes/swupdate.bbclass                      | 143 +++++++++++++-----
>  doc/README.swupdate.md                        |  13 ++
>  recipes-core/images/efibootguard.inc          |   9 +-
>  .../images/swu/sw-description-ebg.tmpl        |  17 +++
>  recipes-core/images/swu/sw-description.tmpl   |   2 +-
>  .../wic/plugins/source/efibootguard-boot.py   |  29 ++--
>  .../wic/plugins/source/efibootguard-efi.py    |  50 +++---
>  8 files changed, 222 insertions(+), 83 deletions(-)
>  create mode 100644 classes/efibootguard.bbclass
>  create mode 100644 recipes-core/images/swu/sw-description-ebg.tmpl
> 

Thanks, applied. I will send another small cleanup on top in a minute.

Jan