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


##########
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:
   Yes, this is not correct, just updated my PR



##########
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:
   Ok, updated according to your comments



-- 
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