mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
!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 <mishra.abhishek2808@gmail.com>
This commit is contained in:
parent
ab6b1fd6f9
commit
86a7fa9246
6 changed files with 4 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
admin:8Tv+Hbmr3pLVb5HHZgd26D:0:0:/
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -77,7 +77,6 @@ if(CONFIG_ETC_ROMFS)
|
|||
etc/init.d/rc.sysinit
|
||||
RCRAWS
|
||||
etc/group
|
||||
etc/passwd
|
||||
PATH
|
||||
${CMAKE_CURRENT_BINARY_DIR}/etc)
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
admin:8Tv+Hbmr3pLVb5HHZgd26D:0:0:/
|
||||
Loading…
Add table
Add a link
Reference in a new issue