xiaoxiang781216 commented on a change in pull request #594: Tools refine
URL: https://github.com/apache/incubator-nuttx/pull/594#discussion_r395579851
##########
File path: tools/Makefile.unix
##########
@@ -565,17 +547,15 @@ do_gconfig: dirlinks apps_preconfig
gconfig: do_gconfig clean_context
-do_savedefconfig: dirlinks apps_preconfig
-
-savedefconfig: do_savedefconfig
+savedefconfig: dirlinks apps_preconfig
$(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-conf --savedefconfig
defconfig.tmp Kconfig
$(Q) sed -i -e "/CONFIG_APPS_DIR=/d" defconfig.tmp
$(Q) grep "CONFIG_ARCH=" .config >> defconfig.tmp
$(Q) grep "^CONFIG_ARCH_CHIP_" .config >> defconfig.tmp; true
- $(Q) grep "^CONFIG_ARCH_CHIP=" .config >> defconfig.tmp; true
- $(Q) grep "CONFIG_ARCH_BOARD=" .config && grep "CONFIG_ARCH_BOARD="
.config >> defconfig.tmp; true
- $(Q) grep "^CONFIG_ARCH_CUSTOM" .config && grep "^CONFIG_ARCH_CUSTOM"
.config >> defconfig.tmp; true
- $(Q) grep "^CONFIG_ARCH_BOARD_CUSTOM=" .config && grep
"^CONFIG_ARCH_BOARD_CUSTOM" .config >> defconfig.tmp; true
+ $(Q) grep "CONFIG_ARCH_CHIP=" .config >> defconfig.tmp; true
+ $(Q) grep "CONFIG_ARCH_BOARD=" .config >> defconfig.tmp; true
+ $(Q) grep "^CONFIG_ARCH_CUSTOM" .config >> defconfig.tmp; true
+ $(Q) grep "^CONFIG_ARCH_BOARD_CUSTOM" .config >> defconfig.tmp; true
Review comment:
> @xiaoxiang781216 - this logic has been broken several times in the past.
Did you test these changes on a custom board with the complete Kconfig life
cycle oldconfig, menuconfig, savedefconfig?
>
No, I don't have custom board environment. I just test savedefconfig in our
internal project.
> Is CONFIG_ARCH_CUSTOM used?
>
I don't know I just keep it as before except remove the && check.
> ```
> CONFIG_ARCH_BOARD_CUSTOM=y
> CONFIG_ARCH_BOARD_CUSTOM_DIR="../nuttx-config"
> CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y
> CONFIG_ARCH_BOARD_CUSTOM_NAME="tvc15-pro"
> CONFIG_ARCH_CHIP="stm32h7"
> CONFIG_ARCH_CHIP_STM32H743ZI=y
> CONFIG_ARCH_CHIP_STM32H7=y
> ```
Does PX4 use custom board? If so, it's better to add a test project use this
feature, otherwise it is hard to ensure that we never break this feature
without some test.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services