mbox series

[0/6] Add target bootstrapper framework

Message ID 20250922170445.1393839-1-alexander.heinisch@siemens.com
Headers show
Series Add target bootstrapper framework | expand

Message

Heinisch, Alexander Sept. 22, 2025, 5:04 p.m. UTC
From: Alexander Heinisch <alexander.heinisch@siemens.com>

Currently the installer deploys images embedded to itself.

In many situations this is fine, but for some more demanding requirements
are in place. e.g.:
- enrollment of keys (e.g. Secure Boot),
- setup for disk encryption,
- collection and reporting of device information (serial number, mac addresses, ...)
- resize / repartition of disk during comissioning
- generation of a commissioning report

While many of these tasks can be done on first-boot doing so during
device setup can be beneficial in many cases.
e.g.
- additional time required for "first-boot" when performing tasks
with high effort on site may not be desired
- the comissioning environment oftentimes allows for failures during
that phase - worst case the device is put aside. On site failures during
the wrong bootstrapping phases (secure boot setup, disk encryption)
can be severe.

This patch extends current installer behaviour to support a flexible
framework to define multiple tasks to be executed in sequence during
the "target (device) bootstrapping" phase.

Note: Current patchset uses installer and target-bootstrapper interchangeably.
Imo the name target-bootstrapper fits better to the actual purpose,
while installer is already established for some time in isar and changing
the naming would probably break some downstream. Although, that could be
fixed in a backwards compatible way, I left this exercise open upon agreement.

Alexander Heinisch (6):
  isar-installer: Moved installer related Kconfig to separate file.
  isar-installer: Added target bootstrapper framework
  isar-installer: Use target-bootstrapper-service in favour of
    deploy-image-service
  isar-installer: Removed deploy-image-service
  isar-installer: Fixing race between ttys in unattended mode.
  isar-installer: Added example target bootstrapper task to collect
    device information.

 kas/image/Kconfig                             |  83 ++------------
 kas/image/isar-image-installer.yaml           |   6 +
 kas/installer/Kconfig                         | 104 ++++++++++++++++++
 kas/installer/add-device-info-collector.yaml  |  14 +++
 kas/installer/unattended.yaml                 |  18 +++
 meta-isar/classes/target-bootstrapper.bbclass |  37 +++++++
 .../images/isar-image-installer.bb            |   2 +-
 .../deploy-image-service.bb                   |  21 ----
 .../files/install.override.conf               |   5 -
 .../device-info-collector.bb                  |  27 +++++
 .../files/usr/bin/device-info-collector.sh    |  28 +++++
 .../files/target-bootstrapper.override.conf   |   3 +
 .../target-bootstrapper-service.bb            |  38 +++++++
 .../files/target-bootstrapper.sh.tmpl         |  44 ++++++++
 .../target-bootstrapper.bb                    |  41 +++++++
 15 files changed, 369 insertions(+), 102 deletions(-)
 create mode 100644 kas/installer/Kconfig
 create mode 100644 kas/installer/add-device-info-collector.yaml
 create mode 100644 kas/installer/unattended.yaml
 create mode 100644 meta-isar/classes/target-bootstrapper.bbclass
 delete mode 100644 meta-isar/recipes-installer/deploy-image-service/deploy-image-service.bb
 delete mode 100644 meta-isar/recipes-installer/deploy-image-service/files/install.override.conf
 create mode 100644 meta-isar/recipes-installer/device-info-collector/device-info-collector.bb
 create mode 100755 meta-isar/recipes-installer/device-info-collector/files/usr/bin/device-info-collector.sh
 create mode 100644 meta-isar/recipes-installer/target-bootstrapper-service/files/target-bootstrapper.override.conf
 create mode 100644 meta-isar/recipes-installer/target-bootstrapper-service/target-bootstrapper-service.bb
 create mode 100644 meta-isar/recipes-installer/target-bootstrapper/files/target-bootstrapper.sh.tmpl
 create mode 100644 meta-isar/recipes-installer/target-bootstrapper/target-bootstrapper.bb

--
2.39.5