nuttx/boards
wangjianyu3 0dccf2b289 boards/esp32p4: switch all nsh defconfigs to nxinit entrypoint
Switch all three esp32p4 boards' nsh defconfigs (esp32p4-function-ev-board,
esp32p4-pico-wifi-wareshare, esp32p4-tab5) from nsh_main to nxinit
(init_main) as the system init entry point, matching the esp32s3 boards'
existing nxinit configs for consistency across Espressif boards.

- Add boards/risc-v/esp32p4/common/src/etc/init.d/init.rc, copied from
  the esp32s3 common version: registers a "console sh" service (nsh)
  guarded by CONFIG_SYSTEM_NSH, plus adbd/fastbootd service stubs
  guarded by their own Kconfig symbols for future reuse; "on init"
  starts whichever services are enabled.
- boards/risc-v/esp32p4/common/src/Make.defs: ship init.rc via ROMFS
  (RCSRCS) when CONFIG_SYSTEM_NXINIT=y, alongside the existing
  rc.sysinit/rcS, mirroring esp32s3's Make.defs.
- Per board defconfig:
  - CONFIG_INIT_ENTRYPOINT switched to "init_main"
  - CONFIG_INIT_STACKSIZE=8192 (was unset/2048 default), matching the
    value already used and measured on esp32s3 boards for the
    nxinit init task running console-sh (and up to two services)
  - CONFIG_SYSTEM_NXINIT=y added, plus its direct Kconfig dependencies:
    CONFIG_LIBC_EXECFUNCS, CONFIG_SCHED_CHILD_STATUS (which depends on
    CONFIG_SCHED_HAVE_PARENT); CONFIG_EXPERIMENTAL was already set on
    all three boards
  - CONFIG_SYSTEM_NSH_STACKSIZE=8192 added: nsh now runs as a service
    spawned by init.rc instead of being init itself, so it needs its
    own stack instead of borrowing the init stack
  - CONFIG_ETC_ROMFS/CONFIG_FS_ROMFS added, needed to ship init.rc via
    the board's ROMFS

nsh continues to run as a console service started by init.rc
(boards/risc-v/esp32p4/common/src/etc/init.d/init.rc), not as the
top-level init.

CMake: esp32p4's common/src/CMakeLists.txt currently has no ROMFS/RCSRCS
wiring at all (unlike e.g. esp32c3's nuttx_add_romfs() block), so
rc.sysinit/rcS/init.rc are only shipped via the Make build. This is a
pre-existing gap independent of this change and is left untouched here.

Verified all three defconfigs with:
  ./tools/configure.sh -l <board>:nsh
  make -j$(nproc) CROSSDEV=riscv-none-elf-
using the xPack riscv-none-elf-gcc 14.2.0 toolchain (the local
riscv64-unknown-elf-gcc bare-metal toolchain lacks sys/cdefs.h needed
by esp-hal-3rdparty). All three link cleanly with no errors/warnings;
the built nuttx.bin contains the init.rc-embedded "service console sh"
string, confirming init.rc is picked up by the ROMFS build. Each
defconfig was regenerated with "make savedefconfig" to normalize
field ordering.

esp32p4 has no hardware attached in this session, so this change is
build-verified only; no flash/boot pass was performed.

Assisted-by: opencode/claude-sonnet-5
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-08-27 01:05:24 +08:00
..
arm boards: fix lvglterm defconfig 2026-08-26 17:25:34 +08:00
arm64 arm64/am62x: Add TISCI client, GPIO and I2C drivers 2026-08-02 11:40:13 +08:00
avr !arch/arm: Use r9 as the PIC base register. 2026-08-06 01:38:23 +08:00
dummy
hc/m9s12 !arch/arm: Use r9 as the PIC base register. 2026-08-06 01:38:23 +08:00
mips boards: select the keyboard byte stream where the application needs it 2026-07-31 11:02:20 -03:00
misoc/lm32/misoc !libc/stream: remove CONFIG_LIBC_LONG_LONG and always support long long 2026-05-19 16:21:28 +08:00
or1k/mor1kx/or1k !arch/arm: Use r9 as the PIC base register. 2026-08-06 01:38:23 +08:00
renesas !arch/arm: Use r9 as the PIC base register. 2026-08-06 01:38:23 +08:00
risc-v boards/esp32p4: switch all nsh defconfigs to nxinit entrypoint 2026-08-27 01:05:24 +08:00
sim/sim/sim sim/thermal: Exercise the devfreq cooling path. 2026-08-18 09:46:47 -03:00
sparc !libc/stream: remove CONFIG_LIBC_LONG_LONG and always support long long 2026-05-19 16:21:28 +08:00
tricore !sched/clock: remove CONFIG_SYSTEM_TIME64 and always use 64-bit time 2026-05-19 16:21:28 +08:00
x86/qemu/qemu-i486 boards/comments: Remove legacy comments 2026-05-04 12:16:11 -03:00
x86_64/qemu/qemu-intel64 boards/qemu-intel64: add NXTerm display console config 2026-08-25 10:06:53 +08:00
xtensa boards: fix lvglterm defconfig 2026-08-26 17:25:34 +08:00
z16/z16f/z16f2800100zcog boards/z16: Replace board_app_initialize 2026-05-02 18:36:46 +08:00
z80 boards/comments: Remove legacy comments 2026-05-04 12:16:11 -03:00
.gitignore
Board.mk !tools/mkpasswd: PBKDF2 host tool and ROMFS passwd build integration 2026-07-21 20:19:14 +08:00
boardctl.c !boards/boardctl: Remove BOARDIOC_INIT 2026-05-26 09:57:29 +08:00
CMakeLists.txt cmake: Use NUTTX(_DIR/_BIN_DIR) instead CMAKE(_SRC_DIR/_BIN_DIR) 2026-08-09 11:13:08 -03:00
dummy.c
Kconfig boards/arm: add nucleo-h7s3l8 support 2026-08-23 11:03:16 +08:00
Makefile tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-07-28 21:26:03 -03:00