Skip to content

boards/sim: add ROMFS passwd and crypto deps for NSH console login - #19576

Open
Abhishekmishra2808 wants to merge 2 commits into
apache:masterfrom
Abhishekmishra2808:fix/sim-console-login-19573
Open

boards/sim: add ROMFS passwd and crypto deps for NSH console login#19576
Abhishekmishra2808 wants to merge 2 commits into
apache:masterfrom
Abhishekmishra2808:fix/sim-console-login-19573

Conversation

@Abhishekmishra2808

@Abhishekmishra2808 Abhishekmishra2808 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Enable BOARD_ETC_ROMFS_PASSWD_ENABLE and software cryptodev options on all sim configs with CONFIG_NSH_CONSOLE_LOGIN so PBKDF2 login works on NuttX 13.0+.

Companion PR apache/nuttx-apps#3679

Impact

Fixes broken NSH console login on NuttX 13.0+ for affected sim configs.

After the PBKDF2 login migration (#19209 / #19321), CONFIG_NSH_CONSOLE_LOGIN=y alone is not enough. These configs were missing the ROMFS passwd autogen and software crypto options that sim:login already had, so login failed at runtime (no valid /etc/passwd, or PBKDF2 could not run).

Fixes #19573

Testing

abhishek@Lethallaptop:~/nuttx$ ./tools/configure.sh sim:rust
  Copy files
  Select CONFIG_HOST_LINUX=y
  Refreshing...
CP: arch/dummy/Kconfig to /home/abhishek/nuttx/arch/dummy/dummy_kconfig
CP: boards/dummy/Kconfig to /home/abhishek/nuttx/boards/dummy/dummy_kconfig
LN: platform/board to /home/abhishek/nuttx-apps/platform/dummy
LN: include/arch to arch/sim/include
LN: include/arch/board to /home/abhishek/nuttx/boards/sim/sim/sim/include
LN: drivers/platform to /home/abhishek/nuttx/drivers/dummy
LN: include/arch/chip to /home/abhishek/nuttx/arch/sim/include/sim
LN: arch/sim/src/chip to /home/abhishek/nuttx/arch/sim/src/sim
LN: arch/sim/src/board to /home/abhishek/nuttx/boards/sim/sim/sim/src
mkkconfig in /home/abhishek/nuttx-apps/audioutils
mkkconfig in /home/abhishek/nuttx-apps/benchmarks
mkkconfig in /home/abhishek/nuttx-apps/boot
mkkconfig in /home/abhishek/nuttx-apps/canutils
mkkconfig in /home/abhishek/nuttx-apps/crypto
mkkconfig in /home/abhishek/nuttx-apps/database
mkkconfig in /home/abhishek/nuttx-apps/examples/elf/tests
mkkconfig in /home/abhishek/nuttx-apps/examples/elf
mkkconfig in /home/abhishek/nuttx-apps/examples/mcuboot
mkkconfig in /home/abhishek/nuttx-apps/examples/module
mkkconfig in /home/abhishek/nuttx-apps/examples/rust
mkkconfig in /home/abhishek/nuttx-apps/examples/sotest
mkkconfig in /home/abhishek/nuttx-apps/examples
mkkconfig in /home/abhishek/nuttx-apps/fsutils
mkkconfig in /home/abhishek/nuttx-apps/games
mkkconfig in /home/abhishek/nuttx-apps/graphics
mkkconfig in /home/abhishek/nuttx-apps/industry/modbus
mkkconfig in /home/abhishek/nuttx-apps/industry
mkkconfig in /home/abhishek/nuttx-apps/inertial
mkkconfig in /home/abhishek/nuttx-apps/interpreters/luamodules
mkkconfig in /home/abhishek/nuttx-apps/interpreters
mkkconfig in /home/abhishek/nuttx-apps/logging
mkkconfig in /home/abhishek/nuttx-apps/lte
mkkconfig in /home/abhishek/nuttx-apps/math
mkkconfig in /home/abhishek/nuttx-apps/mlearning
mkkconfig in /home/abhishek/nuttx-apps/netutils
mkkconfig in /home/abhishek/nuttx-apps/sdr
mkkconfig in /home/abhishek/nuttx-apps/system
mkkconfig in /home/abhishek/nuttx-apps/tee
mkkconfig in /home/abhishek/nuttx-apps/testing/arch
mkkconfig in /home/abhishek/nuttx-apps/testing/cxx
mkkconfig in /home/abhishek/nuttx-apps/testing/drivers
mkkconfig in /home/abhishek/nuttx-apps/testing/fs
mkkconfig in /home/abhishek/nuttx-apps/testing/libc
mkkconfig in /home/abhishek/nuttx-apps/testing/mm
mkkconfig in /home/abhishek/nuttx-apps/testing/sched
mkkconfig in /home/abhishek/nuttx-apps/testing
mkkconfig in /home/abhishek/nuttx-apps/videoutils
mkkconfig in /home/abhishek/nuttx-apps/wireless/bluetooth
mkkconfig in /home/abhishek/nuttx-apps/wireless/ieee802154
mkkconfig in /home/abhishek/nuttx-apps/wireless
mkkconfig in /home/abhishek/nuttx-apps
Loaded configuration '.config'
Configuration saved to '.config'
abhishek@Lethallaptop:~/nuttx$ make
Create version.h
LN: platform/board to /home/abhishek/nuttx-apps/platform/dummy
Register: gpio
Register: hello_rust
Register: dd
Register: nsh
Register: sh
CP:  /home/abhishek/nuttx/include/nuttx/config.h
CP:  /home/abhishek/nuttx/include/nuttx/fs/hostfs.h
ROMFS root password (min 8 characters): 
Confirm password: 
LD:  nuttx
Pac SIM with dynamic libs..
'/lib/x86_64-linux-gnu/libz.so.1' -> 'sim-pac/libs/libz.so.1'
'/lib/x86_64-linux-gnu/libc.so.6' -> 'sim-pac/libs/libc.so.6'
'/lib64/ld-linux-x86-64.so.2' -> 'sim-pac/ld-linux-x86-64.so.2'
SIM elf with dynamic libs archive in nuttx.tgz
abhishek@Lethallaptop:~/nuttx$ ./nuttx
login: root
password: 
User Logged-in!
nsh>

Enable BOARD_ETC_ROMFS_PASSWD_ENABLE and software cryptodev options on
all sim configs with CONFIG_NSH_CONSOLE_LOGIN so PBKDF2 login works on
NuttX 13.0+. Fixes apache#19573.

Signed-off-by: Abhishek Mishra <mishra.abhishek2808@gmail.com>
@github-actions github-actions Bot added Size: S The size of the change in this PR is small Board: simulator labels Jul 29, 2026
acassis
acassis previously approved these changes Jul 29, 2026
@xiaoxiang781216

xiaoxiang781216 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

@Abhishekmishra2808 should we add the correct dependence to avoid the user enable the incorrect combination?

@acassis

acassis commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

@Abhishekmishra2808 should we add the correct dependence to avoid the user enable the incorrect combination?

Yes, CONFIG_NSH_CONSOLE_LOGIN should depends on PASSWD with PBKDF2 enabled

@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown

MemBrowse Memory Report

No memory changes detected for:

@Abhishekmishra2808

Copy link
Copy Markdown
Contributor Author

Agreed @xiaoxiang781216 and @acassis !!

BOARD_ETC_ROMFS_PASSWD_ENABLE now depends on FSUTILS_PASSWD and a
cryptodev backend so PBKDF2 passwd autogen cannot be enabled without
the runtime login stack. Fixes apache#19573.

Signed-off-by: Abhishek Mishra <mishra.abhishek2808@gmail.com>
@Abhishekmishra2808

Copy link
Copy Markdown
Contributor Author

After merging this, please re-run the CI at apache/nuttx-apps#3679

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Build system Board: simulator Size: S The size of the change in this PR is small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] sim:rust login fails with "Invalid username or password" after upgrading to NuttX 13.0

3 participants