You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2026/04/14 08:06:38 UTC
(nuttx) 02/03: !boards: migrate SIM and ESP32-C3-legacy to generated passwd files.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 86a7fa9246f74c08e42275a666e31687e2eac76f
Author: Abhishek Mishra <mi...@gmail.com>
AuthorDate: Mon Apr 13 19:53:29 2026 +0000
!boards: migrate SIM and ESP32-C3-legacy to generated passwd files.
Migrate boards from static /etc/passwd files to build-time generation:
* Remove static etc/passwd files from SIM and ESP32-C3-legacy boards
* Update board configurations to enable BOARD_ETC_ROMFS_PASSWD_ENABLE
* Configure SIM board with login demo user (root/Administrator)
* Update board build rules to use newly generated passwd files
* Remove CMakeLists.txt dependency on static passwd in SIM
* Update MOTD string from username=admin to username=root
This completes the infrastructure migration for boards supporting
login functionality.
BREAKING CHANGE: The static etc/passwd files have been removed from
boards/sim/sim/sim/src/etc/passwd
boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/src/etc/passwd
These boards now require CONFIG_BOARD_ETC_ROMFS_PASSWD_ENABLE=y and a
configured password. Any board carrying a custom static passwd file must
set RCRAWS to exclude etc/passwd and manage credentials via the new
Kconfig options or provide their own passwd generation. To fix: run
'make menuconfig' and navigate to:
Board Selection --->
Auto-generate /etc/passwd at build time --->
Admin password
Signed-off-by: Abhishek Mishra <mi...@gmail.com>
---
boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/src/Make.defs | 2 +-
boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/src/etc/passwd | 1 -
boards/sim/sim/sim/configs/login/defconfig | 3 ++-
boards/sim/sim/sim/src/CMakeLists.txt | 1 -
boards/sim/sim/sim/src/Makefile | 2 +-
boards/sim/sim/sim/src/etc/passwd | 1 -
6 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/src/Make.defs b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/src/Make.defs
index 4e78fdf8242..4040c7f9393 100644
--- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/src/Make.defs
+++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/src/Make.defs
@@ -46,7 +46,7 @@ endif
ifeq ($(CONFIG_ETC_ROMFS),y)
RCSRCS = etc/init.d/rc.sysinit etc/init.d/rcS
- RCRAWS = etc/group etc/passwd
+ RCRAWS = etc/group
endif
DEPPATH += --dep-path board
diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/src/etc/passwd b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/src/etc/passwd
deleted file mode 100644
index bc1f3a68e46..00000000000
--- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/src/etc/passwd
+++ /dev/null
@@ -1 +0,0 @@
-admin:8Tv+Hbmr3pLVb5HHZgd26D:0:0:/
diff --git a/boards/sim/sim/sim/configs/login/defconfig b/boards/sim/sim/sim/configs/login/defconfig
index b59060be174..77883e7617d 100644
--- a/boards/sim/sim/sim/configs/login/defconfig
+++ b/boards/sim/sim/sim/configs/login/defconfig
@@ -13,6 +13,7 @@ CONFIG_ARCH_CHIP="sim"
CONFIG_ARCH_SIM=y
CONFIG_BOARDCTL_APP_SYMTAB=y
CONFIG_BOARDCTL_POWEROFF=y
+CONFIG_BOARD_ETC_ROMFS_PASSWD_ENABLE=y
CONFIG_BOARD_LOOPSPERMSEC=0
CONFIG_BOOT_RUNFROMEXTSRAM=y
CONFIG_BUILTIN=y
@@ -50,7 +51,7 @@ CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_CONSOLE_LOGIN=y
CONFIG_NSH_FILE_APPS=y
CONFIG_NSH_MOTD=y
-CONFIG_NSH_MOTD_STRING="MOTD: username=admin password=Administrator"
+CONFIG_NSH_MOTD_STRING="This is an example NuttX Message Of The Day (MOTD). Have fun!"
CONFIG_NSH_READLINE=y
CONFIG_PATH_INITIAL="/bin"
CONFIG_PSEUDOFS_ATTRIBUTES=y
diff --git a/boards/sim/sim/sim/src/CMakeLists.txt b/boards/sim/sim/sim/src/CMakeLists.txt
index de5a6695baa..cbf3cc7168c 100644
--- a/boards/sim/sim/sim/src/CMakeLists.txt
+++ b/boards/sim/sim/sim/src/CMakeLists.txt
@@ -77,7 +77,6 @@ if(CONFIG_ETC_ROMFS)
etc/init.d/rc.sysinit
RCRAWS
etc/group
- etc/passwd
PATH
${CMAKE_CURRENT_BINARY_DIR}/etc)
diff --git a/boards/sim/sim/sim/src/Makefile b/boards/sim/sim/sim/src/Makefile
index 4d5c5e83152..6fe51cd401e 100644
--- a/boards/sim/sim/sim/src/Makefile
+++ b/boards/sim/sim/sim/src/Makefile
@@ -56,7 +56,7 @@ endif
ifeq ($(CONFIG_ETC_ROMFS),y)
RCSRCS = etc/init.d/rc.sysinit etc/init.d/rcS
- RCRAWS = etc/group etc/passwd
+ RCRAWS = etc/group
endif
ifeq ($(CONFIG_ARCH_BUTTONS),y)
diff --git a/boards/sim/sim/sim/src/etc/passwd b/boards/sim/sim/sim/src/etc/passwd
deleted file mode 100644
index bc1f3a68e46..00000000000
--- a/boards/sim/sim/sim/src/etc/passwd
+++ /dev/null
@@ -1 +0,0 @@
-admin:8Tv+Hbmr3pLVb5HHZgd26D:0:0:/