Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add service to acquire hw information for swupdate #434

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fmoessbauer
Copy link
Member

This patch adds a one-shot systemd service that reads the hardware revision part from /proc/device-tree/compatible and writes that to /etc/hwrevision. By that, the hardware-compatibility node in the swupdate description file can be used to limit the boards an update can be applied to. This helps to avoid that images are applied to unsupported boards (e.g. due to lack of RAM, no M2, etc...).

This patch adds a one-shot systemd service that reads the hardware
revision part from /proc/device-tree/compatible and writes that to
/etc/hwrevision. By that, the hardware-compatibility node in the
swupdate description file can be used to limit the boards an update can
be applied to. This helps to avoid that images are applied to
unsupported boards (e.g. due to lack of RAM, no M2, etc...).

Signed-off-by: Felix Moessbauer <[email protected]>
@fmoessbauer fmoessbauer changed the title add service to aquire hw information for swupdate add service to acquire hw information for swupdate Apr 17, 2023
@jan-kiszka
Copy link
Collaborator

But this service is neither used nor otherwise described in meta-iot2050 right now, correct? I'd like to see a demo use case here as well so that user get an idea what it can be good for.

@fmoessbauer
Copy link
Member Author

fmoessbauer commented Apr 17, 2023

The service is integrated into the swupdate image, so it is used. However, the data that is written to /etc/hwrevision is not being used yet. There are multiple issues in providing an example:

  1. The corresponding entries in the sw-description file just recently were added to cip-core (they are in next currently, but not master)
  2. What is considered compatible highly depends on the use-case
  3. In case we enable the hardware-compatibility node in the sw-description file, the update can no longer be applied via swupdate, as the corresponding data in /etc/hwrevision is not yet there.

That's why I would like to only integrate this service, but not enforce compatibility by now.

@jan-kiszka
Copy link
Collaborator

That leaves us with documenting this option at minimum.

@fmoessbauer
Copy link
Member Author

That leaves us with documenting this option at minimum.

Tell me where and I'll add it.

@gylstorffq
Copy link
Contributor

Also Hardware compatibility check is currently disabled when using SWUpdate 2021.11 from isar-cip-core. See https://gitlab.com/cip-project/cip-core/isar-cip-core/-/blob/master/recipes-core/swupdate/swupdate_2021.11-1%2Bdebian-gbp.bb#L32

@jan-kiszka
Copy link
Collaborator

What's the status?

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.

3 participants