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

sys/riotboot: provide riotboot_slot_offset() #13405

Merged
merged 2 commits into from
Feb 20, 2020

Conversation

kaspar030
Copy link
Contributor

Contribution description

Previously, a slot's offset in flash was calculated within the suit handler code by getting the address of a slot's header and subtracting CPU_FLASH_BASE.
That's ugly (and won't work if there is no CPU_FLASH_BASE, e.g., in a unittest running on native which we have in the queue).

This PR factors out that calculation into a function riotboot_slot_offset(slotnum).

Testing procedure

Issues/PRs references

@kaspar030 kaspar030 added Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Area: sys Area: System labels Feb 19, 2020
@bergzand bergzand added CI: run tests If set, CI server will run tests on hardware for the labeled PR CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Feb 19, 2020
@benpicco benpicco added the Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer label Feb 19, 2020
Copy link
Contributor

@benpicco benpicco left a comment

Choose a reason for hiding this comment

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

The code is the same as before, was just moved to a function.
If it builds, no change in behavior is expected.

@bergzand bergzand added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Feb 19, 2020
@kaspar030
Copy link
Contributor Author

Murdock only failed on (unrelated) micropython on samr21-xpro. Re-triggering without tests.

@kaspar030 kaspar030 added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: run tests If set, CI server will run tests on hardware for the labeled PR CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Feb 20, 2020
@bergzand
Copy link
Member

And go!

@bergzand bergzand merged commit 640cbfe into RIOT-OS:master Feb 20, 2020
@kaspar030 kaspar030 deleted the introduce_riotboot_slot_offset branch February 20, 2020 13:00
@leandrolanzieri leandrolanzieri added this to the Release 2020.04 milestone Feb 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: sys Area: System CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants