mbox series

[v3,0/7] Simplify writing initramfs hooks

Message ID cover.1731754552.git.jan.kiszka@siemens.com
Headers show
Series Simplify writing initramfs hooks | expand

Message

Jan Kiszka Nov. 16, 2024, 10:55 a.m. UTC
Changes in v3:
 - fix DEBIAN_DEPENDS for initramfs-tee-supplicant-hook
 - use .= for extending DEBIAN_DEPENDS

Changes in v2:
 - add commit message to patch 1

Specifically while looking at the initramfs recipes we have in
isar-cip-core, it felt like it's time to simplify their creation and
offload the developers from all the related boilerplate bits. But the
benefit can also be observed with the initramfs recipes in isar itself.

Jan

Jan Kiszka (7):
  initramfs-hook: Add infrastructure to ease writing hooks
  doc: Describe initramfs customizations
  isar-initramfs: Add initramfs-fsck-hook-ext4
  initramfs-isar-example-hook: Convert recipe over to new hook.inc
  initramfs-fsck-ext4-hook: Convert to hook.inc and improve
  initramfs-tee-ftpm-hook: Convert to hook.inc
  initramfs-tee-supplicant-hook: Convert to hook.inc

 doc/user_manual.md                            | 54 ++++++++++++++
 .../images/isar-initramfs.bb                  |  3 +-
 .../initramfs-example/files/example.hook      | 21 ------
 .../initramfs-example/files/example.script    | 23 ------
 .../initramfs-example/files/local-top         |  3 +
 ....bb => initramfs-isar-example-hook_0.1.bb} | 21 ++----
 .../files/initramfs-fsck-hook-ext4.triggers   |  0
 .../initramfs-fsck-ext4-hook_0.3.bb           | 14 ++++
 .../initramfs-hook/files/hook-header.tmpl     | 39 ++++++++++
 .../initramfs-hook/files/script-header.tmpl   | 26 +++++++
 .../recipes-initramfs/initramfs-hook/hook.inc | 74 +++++++++++++++++++
 .../files/{tee-ftpm.script => local-top}      | 18 +----
 .../files/tee-ftpm.hook                       | 28 -------
 .../initramfs-tee-ftpm-hook_0.1.bb            | 27 -------
 .../initramfs-tee-ftpm-hook_0.2.bb            | 15 ++++
 .../{tee-supplicant.script => local-top}      | 18 +----
 .../files/tee-supplicant.hook                 | 36 ---------
 .../initramfs-tee-supplicant-hook_0.1.bb      | 27 -------
 .../initramfs-tee-supplicant-hook_0.2.bb      | 16 ++++
 .../files/initramfs.fsck.ext4.hook            | 39 ----------
 .../initramfs-fsck-hook-ext4_0.2.bb           | 18 -----
 21 files changed, 252 insertions(+), 268 deletions(-)
 delete mode 100644 meta-isar/recipes-initramfs/initramfs-example/files/example.hook
 delete mode 100644 meta-isar/recipes-initramfs/initramfs-example/files/example.script
 create mode 100644 meta-isar/recipes-initramfs/initramfs-example/files/local-top
 rename meta-isar/recipes-initramfs/initramfs-example/{initramfs-example.bb => initramfs-isar-example-hook_0.1.bb} (63%)
 rename meta/{recipes-support => recipes-initramfs}/initramfs-fsck-hook/files/initramfs-fsck-hook-ext4.triggers (100%)
 create mode 100644 meta/recipes-initramfs/initramfs-fsck-hook/initramfs-fsck-ext4-hook_0.3.bb
 create mode 100644 meta/recipes-initramfs/initramfs-hook/files/hook-header.tmpl
 create mode 100644 meta/recipes-initramfs/initramfs-hook/files/script-header.tmpl
 create mode 100644 meta/recipes-initramfs/initramfs-hook/hook.inc
 rename meta/recipes-initramfs/initramfs-tee-ftpm-hook/files/{tee-ftpm.script => local-top} (75%)
 delete mode 100644 meta/recipes-initramfs/initramfs-tee-ftpm-hook/files/tee-ftpm.hook
 delete mode 100644 meta/recipes-initramfs/initramfs-tee-ftpm-hook/initramfs-tee-ftpm-hook_0.1.bb
 create mode 100644 meta/recipes-initramfs/initramfs-tee-ftpm-hook/initramfs-tee-ftpm-hook_0.2.bb
 rename meta/recipes-initramfs/initramfs-tee-supplicant-hook/files/{tee-supplicant.script => local-top} (68%)
 delete mode 100644 meta/recipes-initramfs/initramfs-tee-supplicant-hook/files/tee-supplicant.hook
 delete mode 100644 meta/recipes-initramfs/initramfs-tee-supplicant-hook/initramfs-tee-supplicant-hook_0.1.bb
 create mode 100644 meta/recipes-initramfs/initramfs-tee-supplicant-hook/initramfs-tee-supplicant-hook_0.2.bb
 delete mode 100644 meta/recipes-support/initramfs-fsck-hook/files/initramfs.fsck.ext4.hook
 delete mode 100644 meta/recipes-support/initramfs-fsck-hook/initramfs-fsck-hook-ext4_0.2.bb