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

swupdate_get_sha256 currently does not search for files in artifactory #10

Open
Sperrus opened this issue Sep 24, 2024 · 6 comments
Open

Comments

@Sperrus
Copy link

Sperrus commented Sep 24, 2024

The sw-description function swupdate_get_sha256 currently does not search for the filename in artifactory.
Meanwhile swupdate_get_size does. This is somewhat inconsistent.

@Sperrus
Copy link
Author

Sperrus commented Sep 24, 2024

Hmmm, I just noticed this function is completely obsolete as process_entry always adds an sha256 to new entries.
This is not really ideal, when the target swupdate does not have CONFIG_SIGNED_IMAGES enabled as this always throws an error

@sbabic
Copy link
Owner

sbabic commented Sep 24, 2024

I will check, but obsolete function can be dropped. It is not required to enable CONFIG_SIGNED_IMAGE, just CONFIG_HASH_VERIFY (it is always suggested to set it on) must be set.

@Sperrus
Copy link
Author

Sperrus commented Sep 25, 2024

You are correct, CONFIG_HASH_VERIFY should always be set.
But it is possible to configure swupdate without this feature and therefore swugenerator should be able to generate valid images for this configuration.

@sbabic
Copy link
Owner

sbabic commented Sep 25, 2024

Yes, confirmed, this is a limitation in swugenerator - a flag to disable sha256 should be added.

@Sperrus
Copy link
Author

Sperrus commented Sep 30, 2024

I am not sure if a new flag is necessary.
Imho the sw-description file should be the deciding factor on what is being done. If there is no sha field in sw-description, no sha should be added for that entry.

@sbabic
Copy link
Owner

sbabic commented Oct 1, 2024

sw-description is the master, but the generator should help in cases this is mandatory. If sha256 must be added, a missing sha256 in case of signed image will result in runtime error (this is the case when built in Yocto). The only drawback is for the use case where CONFIG_HASH_VERIFY is off (probably your use case), but this is a minority of projects. So I think it is better to tell the generator to disable the computation of the hash, but let it to create in the other cases.

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

No branches or pull requests

2 participants