This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 8a8a5af90df !boards/boardctl: Remove BOARDIOC_INIT
8a8a5af90df is described below

commit 8a8a5af90df5ce50a98ae91f34f271f606914163
Author: Matteo Golin <[email protected]>
AuthorDate: Sat May 2 09:08:22 2026 -0400

    !boards/boardctl: Remove BOARDIOC_INIT
    
    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_FINALINIT` command instead.
    
    Signed-off-by: Matteo Golin <[email protected]>
---
 Documentation/components/nxgraphics/nx.rst | 14 +++------
 boards/boardctl.c                          |  8 -----
 include/sys/boardctl.h                     | 47 +++++++++++++++---------------
 3 files changed, 27 insertions(+), 42 deletions(-)

diff --git a/Documentation/components/nxgraphics/nx.rst 
b/Documentation/components/nxgraphics/nx.rst
index 37bdce5a325..3cb4955a934 100644
--- a/Documentation/components/nxgraphics/nx.rst
+++ b/Documentation/components/nxgraphics/nx.rst
@@ -21,7 +21,7 @@ features:
 * **Multi-User Support** NX includes front-end logic to an NX server
   daemon that can serve multiple NX client threads. The NX sever
   thread/daemon serializes graphics operations from multiple clients.
-  
+
 * **Minimal Graphics Toolset** The actual implementation of the graphics
   operations is performed by common, back-end logic. This back-end supports
   only a primitive set of graphic and rendering operations.
@@ -124,16 +124,10 @@ start this daemon. There are two ways that this can be 
done:
    calling the function ``nxmu_start()``. The board startup logic
    usually resides the ``boards/arch/chip/board/src`` directory. The
    board startup logic can run automatically during the early system if
-   ``CONFIG_BOARD_LATE_INITIALIZE`` is defined in the configuration. Or,
-   the board startup logic can execute under control of the application
-   by calling :c:func:`boardctl` as:
-
-   .. code-block:: c
-
-     boardctl(BOARDIOC_INIT, arg)
+   ``CONFIG_BOARD_LATE_INITIALIZE`` is defined in the configuration.
 
-   The board initialization logic will run in either case and the simple
-   call to ``nxmu_start()`` will start the NX server.
+   The board initialization logic will run and the simple call to
+   ``nxmu_start()`` will start the NX server.
 
 #. The NX server may also be started later by the application via
    :c:func:`boardctl` as:
diff --git a/boards/boardctl.c b/boards/boardctl.c
index 31ba2c245ca..3b63ca4d5ae 100644
--- a/boards/boardctl.c
+++ b/boards/boardctl.c
@@ -387,14 +387,6 @@ int boardctl(unsigned int cmd, uintptr_t arg)
 
   switch (cmd)
     {
-      case BOARDIOC_INIT:
-        {
-          /* WARNING: deprecated, will be removed */
-
-          ret = -ENOTTY;
-        }
-        break;
-
 #ifdef CONFIG_BOARDCTL_FINALINIT
       /* CMD:           BOARDIOC_FINALINIT
        * DESCRIPTION:   Perform one-time application initialization after
diff --git a/include/sys/boardctl.h b/include/sys/boardctl.h
index 00716bbcc4c..7ef05eb31c7 100644
--- a/include/sys/boardctl.h
+++ b/include/sys/boardctl.h
@@ -181,30 +181,29 @@
  * DEPENDENCIES:  Board logic must provide the board_reset_cause() interface.
  */
 
-#define BOARDIOC_INIT              _BOARDIOC(0x0001)
-#define BOARDIOC_FINALINIT         _BOARDIOC(0x0002)
-#define BOARDIOC_POWEROFF          _BOARDIOC(0x0003)
-#define BOARDIOC_RESET             _BOARDIOC(0x0004)
-#define BOARDIOC_PM_CONTROL        _BOARDIOC(0x0005)
-#define BOARDIOC_UNIQUEID          _BOARDIOC(0x0006)
-#define BOARDIOC_MKRD              _BOARDIOC(0x0007)
-#define BOARDIOC_ROMDISK           _BOARDIOC(0x0008)
-#define BOARDIOC_APP_SYMTAB        _BOARDIOC(0x0009)
-#define BOARDIOC_OS_SYMTAB         _BOARDIOC(0x000a)
-#define BOARDIOC_BUILTINS          _BOARDIOC(0x000b)
-#define BOARDIOC_USBDEV_CONTROL    _BOARDIOC(0x000c)
-#define BOARDIOC_NX_START          _BOARDIOC(0x000d)
-#define BOARDIOC_VNC_START         _BOARDIOC(0x000e)
-#define BOARDIOC_NXTERM            _BOARDIOC(0x000f)
-#define BOARDIOC_NXTERM_IOCTL      _BOARDIOC(0x0010)
-#define BOARDIOC_SPINLOCK          _BOARDIOC(0x0011)
-#define BOARDIOC_UNIQUEKEY         _BOARDIOC(0x0012)
-#define BOARDIOC_SWITCH_BOOT       _BOARDIOC(0x0013)
-#define BOARDIOC_BOOT_IMAGE        _BOARDIOC(0x0014)
-#define BOARDIOC_RESET_CAUSE       _BOARDIOC(0x0015)
-#define BOARDIOC_IRQ_AFFINITY      _BOARDIOC(0x0016)
-#define BOARDIOC_START_CPU         _BOARDIOC(0x0017)
-#define BOARDIOC_MACADDR           _BOARDIOC(0x0018)
+#define BOARDIOC_FINALINIT         _BOARDIOC(0x0001)
+#define BOARDIOC_POWEROFF          _BOARDIOC(0x0002)
+#define BOARDIOC_RESET             _BOARDIOC(0x0003)
+#define BOARDIOC_PM_CONTROL        _BOARDIOC(0x0004)
+#define BOARDIOC_UNIQUEID          _BOARDIOC(0x0005)
+#define BOARDIOC_MKRD              _BOARDIOC(0x0006)
+#define BOARDIOC_ROMDISK           _BOARDIOC(0x0007)
+#define BOARDIOC_APP_SYMTAB        _BOARDIOC(0x0008)
+#define BOARDIOC_OS_SYMTAB         _BOARDIOC(0x0009)
+#define BOARDIOC_BUILTINS          _BOARDIOC(0x000a)
+#define BOARDIOC_USBDEV_CONTROL    _BOARDIOC(0x000b)
+#define BOARDIOC_NX_START          _BOARDIOC(0x000c)
+#define BOARDIOC_VNC_START         _BOARDIOC(0x000d)
+#define BOARDIOC_NXTERM            _BOARDIOC(0x000e)
+#define BOARDIOC_NXTERM_IOCTL      _BOARDIOC(0x000f)
+#define BOARDIOC_SPINLOCK          _BOARDIOC(0x0010)
+#define BOARDIOC_UNIQUEKEY         _BOARDIOC(0x0011)
+#define BOARDIOC_SWITCH_BOOT       _BOARDIOC(0x0012)
+#define BOARDIOC_BOOT_IMAGE        _BOARDIOC(0x0013)
+#define BOARDIOC_RESET_CAUSE       _BOARDIOC(0x0014)
+#define BOARDIOC_IRQ_AFFINITY      _BOARDIOC(0x0015)
+#define BOARDIOC_START_CPU         _BOARDIOC(0x0016)
+#define BOARDIOC_MACADDR           _BOARDIOC(0x0017)
 
 /* If CONFIG_BOARDCTL_IOCTL=y, then board-specific commands will be support.
  * In this case, all commands not recognized by boardctl() will be forwarded

Reply via email to