boards/lckfb-szpi-esp32s3: switch all defconfigs to nxinit entrypoint - #19946
Merged
Merged
Conversation
JianyuWang0623
marked this pull request as ready for review
August 24, 2026 09:02
Contributor
Author
|
wait for fix in apache/nuttx-apps#3733 |
xiaoxiang781216
approved these changes
Aug 24, 2026
Switch all lckfb-szpi-esp32s3 defconfigs from nsh_main to nxinit (init_main) as the system init entry point, for consistency across the whole board (adb and txtable already used nxinit, see 73c949c). For each defconfig (adb, camera, es7210, fastboot, fastboot_tcp, gc0308, gpio, lcd, lvgl, nsh, pca9557, psram, pwm, qmi8658, sdmmc, usb_device, uvc, vncviewer): - CONFIG_INIT_ENTRYPOINT="nsh_main" -> "init_main" - CONFIG_INIT_STACKSIZE raised to 8192. The default init and nsh stacks overflow at runtime on this target: init_main overflows a smaller stack (observed 100% usage with a corrupted task name), clobbering the global inode/mount tree so the procfs mount installed by board bringup disappears; "ls /" then crashes in read_pseudodir and "ps" reports "/proc not mounted". Raising CONFIG_INIT_STACKSIZE to 8192 drops init_main to about 61% usage on hardware, and /proc stays mounted. - CONFIG_SYSTEM_NXINIT=y added, plus its direct Kconfig dependencies (CONFIG_EXPERIMENTAL, CONFIG_LIBC_EXECFUNCS, CONFIG_SCHED_CHILD_STATUS which in turn selects CONFIG_SCHED_HAVE_PARENT) - CONFIG_SYSTEM_NSH_STACKSIZE=8192 added: the nsh console service launched by init.rc also needs a larger stack, otherwise it crashes in getumask while running "ps" because its stack is too small to reach the procfs read path. - ETC_ROMFS/FS_ROMFS added where missing, needed to ship init.rc via the board's ROMFS nsh continues to run as a console service started by init.rc (boards/xtensa/esp32s3/common/src/etc/init.d/init.rc), not as the top-level init, matching the adb/txtable configs. Verified all 20 defconfigs (adb, camera, es7210, fastboot, fastboot_tcp, fastboot_usb, gc0308, gpio, lcd, lvgl, nsh, pca9557, psram, pwm, qmi8658, sdmmc, txtable, usb_device, uvc, vncviewer) build cleanly with `make`. Flashed nsh and es7210 to hardware: - nsh: UART0 console reachable, "ps" shows init_main (PID 2) as the parent of nsh's "sh" (PID 3). - es7210: adb reachable, "ps" shows init_main (PID 4) as the parent of both "sh" (PID 5) and "adbd" (PID 6). Assisted-by: Kiro:claude-sonnet-5 Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
JianyuWang0623
force-pushed
the
lckfb-esp32s3-nsh-to-init
branch
from
August 25, 2026 08:54
73ad366 to
35b6524
Compare
simbit18
approved these changes
Aug 25, 2026
simbit18
requested review from
eren-terzioglu,
fdcavalcanti,
jerpelea and
tmedicci
August 25, 2026 09:15
jerpelea
approved these changes
Aug 25, 2026
acassis
approved these changes
Aug 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Impact
Testing
Build Host: Linux x86_64, xtensa-esp32s3-elf-gcc 12.2.0 (ESP-IDF toolchain)
Target: esp32s3 / lckfb-szpi-esp32s3 (all 20 configs)
All 20 defconfigs (adb, camera, es7210, fastboot, fastboot_tcp, fastboot_usb, gc0308, gpio, lcd, lvgl, nsh, pca9557, psram, pwm, qmi8658, sdmmc, txtable, usb_device, uvc, vncviewer) build cleanly with
make. tools/checkpatch.sh passes on the diff.Flashed nsh and es7210 to real hardware (lckfb-szpi-esp32s3, MAC a0:85:e3:f4:43:30) and captured actual runtime output:
nsh config — flash log:
nsh config — serial console after reset (UART0, 115200 8N1):
init_main (PID 2) is running as the root init and is the parent of the nsh console service
sh(PID 3), confirming nxinit is in control of the boot sequence.es7210 config — flash log:
es7210 config — via adb after reset:
init_main (PID 4) is the parent of both the console
sh(PID 5) andadbd(PID 6), matching init.rc'son initservice list (console, adbd).The remaining 15 changed defconfigs (camera, fastboot, fastboot_tcp, gc0308, gpio, lcd, lvgl, pca9557, psram, pwm, qmi8658, sdmmc, usb_device, uvc, vncviewer) were build-verified only in this pass (not flashed/run on hardware — no dedicated peripherals like camera/LCD/touch were wired up for each one).