platform, common, lowlevel modules cleanup #4249
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR focuses on cleaning up tangled code in the
platform.c/h
,common.c/h
,lowlevel.c/h
modules, as well as the Unix emulator.main_clean_exit
cyclic dependency) from the emulator code.lowlevel
module has been relocated to the newoption_bytes
module.pvd
(Power Voltage Detector) module, which was previously split across two different places.reset_flags
module, which was previously located in thelowlevel
module. Although it's currently not very useful, it might be improved in the future.platform.c
has been moved to a newstartup_init
module, which better reflects its purpose.platform.h
header no longer exists, freeing up the name for potential future use.Possible next steps:
common.h
now only contains just utility functions. We might consider renaming this module to better reflect its purpose.utils.s
seem slightly out of place and could be better organized betweenbootutil
andstartup_init
.