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>
|
||
|---|---|---|
| .github | ||
| arch | ||
| audio | ||
| binfmt | ||
| boards | ||
| cmake | ||
| crypto | ||
| Documentation | ||
| drivers | ||
| dummy | ||
| fs | ||
| graphics | ||
| include | ||
| libs | ||
| mm | ||
| net | ||
| openamp | ||
| pass1 | ||
| sched | ||
| syscall | ||
| tools | ||
| video | ||
| wireless | ||
| .asf.yaml | ||
| .codespell-ignore-lines | ||
| .codespellrc | ||
| .editorconfig | ||
| .gitignore | ||
| .gitmessage | ||
| .pre-commit-config.yaml | ||
| .yamllint | ||
| AUTHORS | ||
| CMakeLists.txt | ||
| CONTRIBUTING.md | ||
| INVIOLABLES.md | ||
| Kconfig | ||
| LICENSE | ||
| Makefile | ||
| NOTICE | ||
| README.md | ||
| ReleaseNotes | ||
Apache NuttX is a real-time operating system (RTOS) with an emphasis on standards compliance and small footprint. Scalable from 8-bit to 64-bit microcontroller environments, the primary governing standards in NuttX are POSIX and ANSI standards. Additional standard APIs from Unix and other common RTOSs (such as VxWorks) are adopted for functionality not available under these standards, or for functionality that is not appropriate for deeply-embedded environments (such as fork()).
For brevity, many parts of the documentation will refer to Apache NuttX as simply NuttX.
Getting Started
First time on NuttX? Read the Getting Started guide! If you don't have a board available, NuttX has its own simulator that you can run on terminal.
Documentation
You can find the current NuttX documentation on the Documentation Page.
Alternatively, you can build the documentation yourself by following the Documentation Build Instructions.
The old NuttX documentation is still available in the Apache wiki.
Supported Boards
NuttX supports a wide variety of platforms. See the full list on the Supported Platforms page.
Contributing
If you wish to contribute to the NuttX project, read the Contributing guidelines for information on Git usage, coding standard, workflow and the NuttX principles.
License
The code in this repository is under either the Apache 2 license, or a license compatible with the Apache 2 license. See the License Page for more information.