!boards/boardctl: Remove BOARDIOC_INIT#18832
!boards/boardctl: Remove BOARDIOC_INIT#18832linguini1 wants to merge 3 commits intoapache:masterfrom
Conversation
|
@linguini1 please remove this leftover: from boards/xxx/yyy/boardname/src/boardname.h |
|
Now that #18833 is merged, this PR is ready for review and merge. |
399eb60 to
2bd7f65
Compare
|
Should now have the final mentions of |
|
Is MCU boot externally managed? How can I go about removing the BOARDIOC_INIT calls from it? |
|
@linguini1 So we're trying to fix this Compile Error: https://github.com/apache/nuttx/actions/runs/25459302764/job/74697383268?pr=18832#step:10:913 Which actually comes from the MCUBoot Repo: https://github.com/mcu-tools/mcuboot/blob/main/boot/nuttx/main.c#L106 int main(int argc, FAR char *argv[]) {
struct boot_rsp rsp;
FIH_DECLARE(fih_rc, FIH_FAILURE);
#ifdef NEED_BOARDINIT
/* Perform architecture-specific initialization (if configured) */
boardctl(BOARDIOC_INIT, 0);Which means we need to submit a PR at MCUBoot Repo? This needs to be changed, after patching MCUBoot Repo: https://github.com/apache/nuttx-apps/blob/master/boot/mcuboot/Kconfig#L23-L30 |
|
I can submit that PR then! |
|
Cool! Remember to update nuttx-apps after that. Thanks :-) |
|
Having the nuttx code scattered across various repos outside our control isn't a good idea. Nuttx porting layer should come from nuttx repos. The same problem affected Nimble, so I moved required nuttx-things to nuttx-apps some time ago. Maybe this should be done for mcuboot as well? |
I agree, at least where possible. This changes reduces a little bit of coupling. |
I totally agree!! |
+1 and for all other dependencies too. We should have one repo like nuttx-deps to keep all of them in one place, then we would clone nuttx, nuttx-apps, nuttx-deps to have fully self contained ecosystem. we can start step by step? :-) |
|
I think some things in the application space are fine, shim layers should stay in apps. For instance, downloading the Unity test framework repo but hooking in our own shim layer. This also gives us a nice (?) indication that we're making an impactful breaking change. |
Yes we talked about that before some times. We should stay as much self-contained as possible. If code can be small part of the nuttx-apps it should be part of the nuttx-apps. If dependency is large and not really part of the code (i.e. sdk tool, compiler, etc) it could be part of nuttx-deps repo :-) I proposed to put bigger dependencies, libraties, tools into a separate repo because:
|

Summary
BREAKING CHANGE: Remove BOARDIOC_INIT macro now that the interface is removed in favour of CONFIG_BOARD_LATE_INITIALIZE.
Quick fix: instead of calling BOARDIOC_INIT from your application, instead enable late initialization to have it performed automatically prior to application entry.
If you need custom initialization logic, use the board_final_initialize function and
BOARDIOC_FINALINITcommand instead.Must not be merged before: apache/nuttx-apps#3405
Impact
Closes #11321, finally finishing the simplification of NuttX initialization logic permanently.
Impacts users relying on
BOARDIOC_INITin their custom applications. WithinNuttX, these usages are already removed.
Testing
Since this interface is entirely removed from NuttX use already, there will not
be any compilation errors building any configuration. Here is a build and run of
sim:
OSTest:
Details