JianyuWang0623 opened a new pull request, #3750:
URL: https://github.com/apache/nuttx-apps/pull/3750
## Summary
- Extract init_parse_config_buffer() out of init_parse_config_file()
so an in-memory buffer (not just a file) can be parsed with the
same section/validation logic.
- Add a post-parse check() loop to init_parse_config_buffer(),
mirroring the existing validation already done for file-based
parsing.
- Add "boot" and "start_cpu" builtin actions (depend on
BOARDCTL_BOOT_IMAGE / BOARDCTL_START_CPU respectively), letting
init.rc trigger firmware boot / secondary CPU bring-up.
- Fix event/board init timing: move the boot event chain into a
preset config buffer so "init" and the optional "netinit"/
"finalinit" events are triggered as a serialized chain instead of
being queued back-to-back in main(). Adds a "netinit" builtin that
calls netinit_bringup(), driven by
on init -> trigger netinit -> on netinit -> netinit
instead of calling netinit_bringup() directly in main(), restoring
the auto network bring-up that nsh provided (see nshlib/nsh_init.c).
finalinit remains a pure event for user-defined services to hook.
BOARDIOC_INIT/BOARDIOC_FINALINIT are not reintroduced since
BOARDIOC_INIT was already removed upstream in favor of
CONFIG_BOARD_LATE_INITIALIZE.
## Impact
- User: minor behavior change — when CONFIG_NETUTILS_NETINIT is set,
the network is now brought up automatically during boot again
(previously the event fired but nothing consumed it).
- Build: no new required config; "boot"/"start_cpu" builtins are
gated by existing BOARDCTL_BOOT_IMAGE/BOARDCTL_START_CPU.
- Hardware: NO.
- Documentation: NO.
- Compatibility: NO break to existing init.rc files.
## Testing
Build Host: Linux x86_64, gcc 13.4.0
Target: xtensa / ESP32-S3 / esp32s3-lckfb (adb config), toolchain
xtensa-esp32s3-elf-gcc 12.2.0
- tools/nxstyle on parser.c / builtin.c / init.c -> clean (exit 0)
- make -j8 -> Generated: nuttx.bin (link OK)
- Flashed and boot-verified on lckfb-szpi-esp32s3 hardware
(MAC a0:85:e3:f4:43:30) via esptool + adb:
```
$ esptool.py -c esp32s3 -p /dev/ttyUSB0 chip_id
Chip is ESP32-S3 (QFN56) (revision v0.2)
MAC: a0:85:e3:f4:43:30
$ make flash ESPTOOL_PORT=/dev/ttyUSB0
Wrote 287192 bytes (150626 compressed) at 0x00000000 in 2.9 seconds
Hash of data verified.
$ adb -s 1234 shell uname -a
NuttX 13.0.1-RC0 95a292de9ab-dirty Aug 24 2026 11:13:50 xtensa
lckfb-szpi-esp32s3
$ adb -s 1234 shell ps
TID PID PPID ... COMMAND
3 3 0 ... init_main <- nxinit as system init
4 4 3 ... sh <- init.rc: service console sh
5 5 3 ... adbd <- init.rc: service adbd adbd
```
init_main (nxinit, PID 3) boots and starts sh/adbd as services per
/etc/init.d/init.rc; confirmed reproducible across an adb reboot
cycle (same uname/ps output after reboot).
Note: this board's current config has BOARDCTL_BOOT_IMAGE,
BOARDCTL_START_CPU and NETUTILS_NETINIT unset, so the new "boot"/
"start_cpu"/"netinit" builtins are compiled out on this target and
were not exercised at runtime here. Their compile-time correctness
was separately verified against a NETUTILS_NETINIT-enabled config
(fastboot_tcp), where parser.c/builtin.c build and link cleanly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]