!boards/moxart: Use ROMFS PBKDF2 passwd login

Migrate moxa:nsh from fixed telnet password to build-time ROMFS
/etc/passwd with PBKDF2-HMAC-SHA256 and cryptodev.

Signed-off-by: Abhishek Mishra <mishra.abhishek2808@gmail.com>
This commit is contained in:
Abhishek Mishra 2026-07-15 15:44:37 +00:00 committed by Xiang Xiao
parent 4761f15b3e
commit cb3954e70b
5 changed files with 65 additions and 1 deletions

View file

@ -43,13 +43,22 @@ CONFIG_ARCH_INTERRUPTSTACK=1024
CONFIG_ARCH_STACKDUMP=y
CONFIG_BOARDCTL_APP_SYMTAB=y
CONFIG_BOARDCTL_RESET=y
CONFIG_BOARD_ETC_ROMFS_PASSWD_ENABLE=y
CONFIG_BOARD_LOOPSPERMSEC=6965
CONFIG_BOOT_RUNFROMISRAM=y
CONFIG_BUILTIN=y
CONFIG_CRYPTO=y
CONFIG_CRYPTO_CRYPTODEV=y
CONFIG_CRYPTO_CRYPTODEV_SOFTWARE_CRYPTO=y
CONFIG_CRYPTO_SW_AES=y
CONFIG_DEFAULT_SMALL=y
CONFIG_ETC_ROMFS=y
CONFIG_ETC_ROMFSDEVNO=0
CONFIG_FS_BINFS=y
CONFIG_FS_ROMFS=y
CONFIG_FS_UNIONFS=y
CONFIG_FSUTILS_PASSWD=y
CONFIG_FSUTILS_PASSWD_READONLY=y
CONFIG_FTMAC100_BASE=0x90900000
CONFIG_FTMAC100_IRQ=25
CONFIG_FTMAC100_MAC0_ENV_ADDR=0x80000050
@ -69,7 +78,6 @@ CONFIG_NET_SOCKOPTS=y
CONFIG_NET_TCP=y
CONFIG_NET_TCP_WRITE_BUFFERS=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_LOGIN_PASSWORD="nuttx"
CONFIG_NSH_TELNET=y
CONFIG_NSH_TELNET_LOGIN=y
CONFIG_RAM_SIZE=2097152

View file

@ -28,4 +28,9 @@ ifeq ($(CONFIG_BOARDCTL_RESET),y)
CSRCS += moxart_reset.c
endif
ifeq ($(CONFIG_ETC_ROMFS),y)
RCSRCS = etc/init.d/rc.sysinit etc/init.d/rcS
RCRAWS = etc/group
endif
include $(TOPDIR)/boards/Board.mk

View file

@ -0,0 +1 @@
root:*:0:root

View file

@ -0,0 +1,25 @@
/****************************************************************************
* boards/arm/moxart/moxa/src/etc/init.d/rc.sysinit
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
#include <nuttx/config.h>
/* ROMFS /etc system-init script (no board-specific init commands yet). */

View file

@ -0,0 +1,25 @@
/****************************************************************************
* boards/arm/moxart/moxa/src/etc/init.d/rcS
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
#include <nuttx/config.h>
/* ROMFS /etc start-up script (no board-specific start-up commands yet). */