-
Notifications
You must be signed in to change notification settings - Fork 2k
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
core: turn kernel_init.c and panic.c into submodules of core #13241
Conversation
bootloaders/riotboot/Makefile
Outdated
@@ -14,6 +14,7 @@ CFLAGS += -DRIOTBOOT | |||
|
|||
# Disable unused modules | |||
CFLAGS += -DNDEBUG -DLOG_LEVEL=LOG_NONE | |||
DISABLE_MODULE += core_init core_msg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about core_panic
, shouldn't it be disabled as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about
core_panic
, shouldn't it be disabled as well?
Yes, that'll be another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that'll be another PR.
actually, that doesn't make sense. They both require exactly the same testing.
2408bf4
to
b6703f4
Compare
@nmeum Does this fix the issues with linktime re-ordering? |
Yes, it does seem to fix it, did a few tests locally. I also just pushed your two commits on the #13176 link time reordering branch. Since I can just rebase my branch against master as soon as this PR is merged. If you want, you can wait to see if it passes on the CI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with link time reordering (see #13176), seems to solve the problem at hand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change makes a lot of sense! Tested with native
and arduino-due
, everything still behaves as expected.
ACK.
Thanks @nmeum @haukepetersen! |
Contribution description
This PR changes the default kernel_init to be a submodule called "core_init".
That makes it possible to completely bypass it, as done by riotboot.
Previously, riotboot depended on a specific link order to properly override
kernel_init()
core_init
is made a default module, riotboot simply disables it.Same with
panic.c
turned into thecore_panic
module.Testing procedure
CI can do that.
Issues/PRs references
#13238