Skip to content

Conversation

Pietfried
Copy link
Contributor

Describe your changes

This PR adds the Linux_Systemd_Rauc module . It implements the system interface using rauc and base linux system commands.

The module requires a custom library for safe system commands, rauc and sdbus. This has been added as part of this PR to lib/everest/system

Issue ticket number and link

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • I read the contribution documentation and made sure that my changes meet its requirements

// get_boot_slot() should be more reliable since it indicates the slot
// we booted from. This will change on a successful OTA + reboot

std::string cmd = "/usr/bin/check_system_health.sh";
Copy link
Contributor Author

@Pietfried Pietfried Sep 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@james-ctc is this a file we may want to check in as part of the module and/or make the path to it configurable?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend making it a configuration item with an empty default.
/usr/bin/check_system_health.sh was provided in a Yocto meta layer. Changing to a config item removes that dependency.

@Pietfried
Copy link
Contributor Author

TODO: add sdbus requirement to ci build kit image

@Pietfried Pietfried force-pushed the feature/add-linux-systemd-rauc branch from 89cb769 to bf19be9 Compare September 11, 2025 13:54
@Pietfried Pietfried marked this pull request as ready for review September 11, 2025 13:59
@Pietfried
Copy link
Contributor Author

@james-ctc addressed all comments, can be re-reviewed

@Pietfried Pietfried requested a review from james-ctc September 11, 2025 13:59
Copy link
Member

@james-ctc james-ctc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good - just a few additional suggestions

james-ctc
james-ctc previously approved these changes Sep 12, 2025
@james-ctc james-ctc force-pushed the feature/add-linux-systemd-rauc branch from 9f32579 to 099430e Compare September 25, 2025 14:18
@Pietfried
Copy link
Contributor Author

TODO: add sdbus requirement to ci build kit image

EVerest/everest-ci#132

Copy link
Member

@james-ctc james-ctc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DBus message format description needs to be retained

james-ctc
james-ctc previously approved these changes Sep 29, 2025
Copy link
Member

@james-ctc james-ctc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

Signed-off-by: Cornelius Claussen <[email protected]>

Adding sdbus-c++ dependecy in cmake for module Linux_Systemd_Rauc (uncomment)

Signed-off-by: Florin Mihut <[email protected]>

* Reboot and mark-good

* removed mark good script. Cleanup.

mark good is handled in init() via Systemd

Signed-off-by: Cornelius Claussen <[email protected]>

* Extension of API for OTA update

Signed-off-by: Jan Christoph Habig <[email protected]>

Linux_systemd_rauc: Add compatibility with sdbus-c++ 2.x API (#186)

Signed-off-by: Cornelius Claussen <[email protected]>

feat: added new interface rauc_status that provides percentage (#246)

completion during a RAUC install
fix: added sdbus-c++ to build

Signed-off-by: James Chapman <[email protected]>

Cc 13 react to new req system restart messages new (#267)

* refactor: extract mechanism for safely calling system commands into companion lib
* Add C++ interface to safe_system mechanism
* Use safe_system mechanism to implement different types of reset
* Address minor issues from PR discussion
* Made errno->string conversion thread-safe again.
* Use safer mechanism to call external executable in Rauc module
* Improve interfaces of companion functions for safe calling of system functions
* Make safe_system_c an internal function
* Add function to print commands for logging
* Handle timeout in safe_system commands and add verbose return type
* Fix clang-format
* Fix namespace formatting

Signed-off-by: Christoph Burandt <[email protected]>

feat: add event queue so that modules can request actions from

feat: RAUC updates now via event queue

fix: SIGCHILD handler not correctly configured
fix: updated reboot command

OCPP OTA uses the RAUC primary to determine when an OTA was
successfully booted - in testing this was not always reliable.
The boot slot is more reliable and if it changes after a reboot
then that is a good indication that the OTA worked.

The updates mean that the OCPP OTA could have a different
approach if needed. This implementation supports a migration
from using primary slot to using boot slot.

feat: save boot and promary slot for OTA checking
fix: fixes during testing

The System module has code that performs OTA via RAUC's dbus interface.
The code has been updated so that a base class performs most operations
and the EVerest module specific requirements are now in a derived class.

fix: libev now working with sdbus-c++ for RAUC
feat: building code + tests with updated companion library

feat: factor out common dbus functions
feat: implement systemd dbus capability
feat: updated sdbus-c++ to support Aync calls for version 1.6 and 2.1.0

Signed-off-by: James Chapman <[email protected]>

Move into modules/Misc/Linux_Systemd_Rauc

Added system lib to lib/everest

Linking Linux_Systemd_Rauc against everest::system

Removed provides of rauc interface

Removed rauc status types dependency and changed to system types. ADjusted signal_firwmare_update_status signal

Added VerifyUpdateScriptPath config parameter and James Chapman as module author

Using VerifyUpdateScriptPath config param to decide if an update can be marked as good

fixed typo and updated documentation about sdbus version

Signed-off-by: Piet Gömpel <[email protected]>

Install sdbus-c++ v2.1.0 from source in EDM mode

Run apt update before installing libsystemd-dev dependency

Fix linkage to sdbus-c++

Use run_application() wrapper for boost process

This fixes build on opensuse

Include N01.FR.20 fix in Linux_Systemd_Rauc module

Signed-off-by: Kai-Uwe Hermann <[email protected]>
@hikinggrass hikinggrass force-pushed the feature/add-linux-systemd-rauc branch from 62474fb to 3e249b2 Compare September 30, 2025 07:14
@hikinggrass hikinggrass changed the title Feature/add linux systemd rauc Feature: add Linux_Systemd_Rauc module Sep 30, 2025
@hikinggrass hikinggrass added this pull request to the merge queue Sep 30, 2025
Merged via the queue into main with commit 3a87ac1 Sep 30, 2025
11 of 12 checks passed
@hikinggrass hikinggrass deleted the feature/add-linux-systemd-rauc branch September 30, 2025 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants