From a75249689d8e8899a28d1b4c643e3699f7ef4430 Mon Sep 17 00:00:00 2001 From: Matteo Golin Date: Fri, 8 May 2026 13:46:14 -0400 Subject: [PATCH] boot: nuttx: Remove deprecated board initialization NuttX now relies on kernel logic to perform the boot tasks that were once done from this removed userspace call. This commit removes it to be in line with the current boot method. BOARDIOC_FINALINIT can still be used by NuttX users to perform custom initialization tasks/as a boot hook. Signed-off-by: Matteo Golin --- boot/nuttx/main.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/boot/nuttx/main.c b/boot/nuttx/main.c index 44605464d9..d2ded255bd 100644 --- a/boot/nuttx/main.c +++ b/boot/nuttx/main.c @@ -36,23 +36,6 @@ * Pre-processor Definitions ****************************************************************************/ -/* Should we perform board-specific driver initialization? There are two - * ways that board initialization can occur: 1) automatically via - * board_late_initialize() during bootupif CONFIG_BOARD_LATE_INITIALIZE - * or 2). - * via a call to boardctl() if the interface is enabled - * (CONFIG_BOARDCTL=y). - * If this task is running as an NSH built-in application, then that - * initialization has probably already been performed otherwise we do it - * here. - */ - -#undef NEED_BOARDINIT - -#if defined(CONFIG_BOARDCTL) && !defined(CONFIG_NSH_ARCHINIT) -# define NEED_BOARDINIT 1 -#endif - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -100,16 +83,10 @@ 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); - #ifdef CONFIG_BOARDCTL_FINALINIT /* Perform architecture-specific final-initialization (if configured) */ boardctl(BOARDIOC_FINALINIT, 0); -#endif #endif syslog(LOG_INFO, "*** Booting MCUboot build %s ***\n", CONFIG_MCUBOOT_VERSION);