Abhishekmishra2808 commented on code in PR #18396:
URL: https://github.com/apache/nuttx/pull/18396#discussion_r2984001003
##########
boards/Board.mk:
##########
@@ -30,11 +30,35 @@ $(RCOBJS): $(ETCDIR)$(DELIM)%: %
$(Q) mkdir -p $(dir $@)
$(call PREPROCESS, $<, $@)
-$(ETCSRC): $(foreach raw,$(RCRAWS), $(if $(wildcard
$(BOARD_DIR)$(DELIM)src$(DELIM)$(raw)), $(BOARD_DIR)$(DELIM)src$(DELIM)$(raw),
$(if $(wildcard $(BOARD_COMMON_DIR)$(DELIM)$(raw)),
$(BOARD_COMMON_DIR)$(DELIM)$(raw), $(BOARD_DIR)$(DELIM)src$(DELIM)$(raw))))
$(RCOBJS)
+$(ETCSRC): $(foreach raw,$(RCRAWS), $(if $(wildcard
$(BOARD_DIR)$(DELIM)src$(DELIM)$(raw)), $(BOARD_DIR)$(DELIM)src$(DELIM)$(raw),
$(if $(wildcard $(BOARD_COMMON_DIR)$(DELIM)$(raw)),
$(BOARD_COMMON_DIR)$(DELIM)$(raw), $(BOARD_DIR)$(DELIM)src$(DELIM)$(raw))))
$(RCOBJS) $(TOPDIR)$(DELIM).config $(TOPDIR)$(DELIM)tools$(DELIM)mkpasswd.c
$(foreach raw, $(RCRAWS), \
$(shell rm -rf $(ETCDIR)$(DELIM)$(raw)) \
$(shell mkdir -p $(dir $(ETCDIR)$(DELIM)$(raw))) \
$(shell cp -rfp $(if $(wildcard
$(BOARD_DIR)$(DELIM)src$(DELIM)$(raw)), $(BOARD_DIR)$(DELIM)src$(DELIM)$(raw),
$(if $(wildcard $(BOARD_COMMON_DIR)$(DELIM)$(raw)),
$(BOARD_COMMON_DIR)$(DELIM)$(raw), $(BOARD_DIR)$(DELIM)src$(DELIM)$(raw)))
$(ETCDIR)$(DELIM)$(raw)))
+ifeq ($(CONFIG_BOARD_ETC_ROMFS_PASSWD_ENABLE),y)
+ifeq ($(CONFIG_BOARD_ETC_ROMFS_PASSWD_PASSWORD),)
+ $(error CONFIG_BOARD_ETC_ROMFS_PASSWD_PASSWORD must be set when
BOARD_ETC_ROMFS_PASSWD_ENABLE is enabled. Run 'make menuconfig' to set a
password.)
+endif
+ifeq ($(CONFIG_BOARD_ETC_ROMFS_PASSWD_PASSWORD),"")
Review Comment:
for me I think we should keep `mkpasswd` as the source of truth for
validation and keep only one early empty password check for better user
feedback when the feature is enabled. this avoids duplicated checks while still
failing early with a clear message. For `savedefconfig,` we can print the
warning conditionally only when this feature is enabled, so users are informed
without adding noise.
--
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]