From eb815c48d7bba8af566457f8fa8aba4468c7a46f Mon Sep 17 00:00:00 2001 From: wanggang26 Date: Sun, 13 Aug 2023 16:46:29 +0800 Subject: [PATCH] ofloader: startup ofloader directly Signed-off-by: wanggang26 --- system/ofloader/ofloader.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/system/ofloader/ofloader.c b/system/ofloader/ofloader.c index 4f6252ed0..62e52bc0b 100644 --- a/system/ofloader/ofloader.c +++ b/system/ofloader/ofloader.c @@ -28,6 +28,7 @@ #include #include #include +#include #include "ofloader.h" @@ -317,6 +318,18 @@ int main(int argc, FAR char *argv[]) size_t i; mqd_t mq; +#if defined(CONFIG_BOARDCTL) && !defined(CONFIG_NSH_ARCHINIT) + /* 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 + memset(&mqattr, 0, sizeof(struct mq_attr)); mqattr.mq_msgsize = sizeof(msg); mqattr.mq_maxmsg = 10;