xuxin930 commented on code in PR #16897:
URL: https://github.com/apache/nuttx/pull/16897#discussion_r2297013193


##########
CMakeLists.txt:
##########
@@ -158,6 +158,27 @@ if(NOT EXISTS "${NUTTX_DEFCONFIG}")
   message(FATAL_ERROR "No config file found at ${NUTTX_DEFCONFIG}")
 endif()
 
+# Custom board ###################################################
+
+file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/boards/dummy)
+if(CONFIG_ARCH_BOARD_CUSTOM)
+  get_filename_component(NUTTX_BOARD_ABS_DIR ${CONFIG_ARCH_BOARD_CUSTOM_DIR}
+                         ABSOLUTE BASE_DIR ${NUTTX_DIR})
+else()
+  set(NUTTX_BOARD_ABS_DIR ${NUTTX_BOARD_DIR})
+  file(TOUCH ${CMAKE_BINARY_DIR}/boards/dummy/Kconfig)
+endif()

Review Comment:
   why move this conifg here?
   
   `CONFIG_ARCH_BOARD_CUSTOM` may be not loaded yet here?



##########
CMakeLists.txt:
##########
@@ -158,6 +158,27 @@ if(NOT EXISTS "${NUTTX_DEFCONFIG}")
   message(FATAL_ERROR "No config file found at ${NUTTX_DEFCONFIG}")
 endif()
 
+# Custom board ###################################################
+
+file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/boards/dummy)
+if(CONFIG_ARCH_BOARD_CUSTOM)
+  get_filename_component(NUTTX_BOARD_ABS_DIR ${CONFIG_ARCH_BOARD_CUSTOM_DIR}
+                         ABSOLUTE BASE_DIR ${NUTTX_DIR})
+else()
+  set(NUTTX_BOARD_ABS_DIR ${NUTTX_BOARD_DIR})
+  file(TOUCH ${CMAKE_BINARY_DIR}/boards/dummy/Kconfig)
+endif()
+
+# Process initial defconfig ###################################################
+# Process initial defconfig to recursively expand #include in it
+
+include(nuttx_process_config)
+process_config(
+  ${CMAKE_BINARY_DIR}/.defconfig.processed ${NUTTX_DEFCONFIG} INCLUDE_PATHS
+  ${NUTTX_BOARD_ABS_DIR}/../../common/configs ${NUTTX_BOARD_ABS_DIR}/../common
+  ${NUTTX_BOARD_ABS_DIR})

Review Comment:
   how about default search path such as:
   1. defconfig same level directory
   2. appsdir



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to