This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit d4620687adc2c35cee9566631cbe6de6d50a7f31
Author: wangjianyu3 <[email protected]>
AuthorDate: Mon Aug 24 23:30:58 2026 +0800

    boards/esp32s3-touch-lcd7: switch defconfigs to nxinit entrypoint
    
    Switch both esp32s3-touch-lcd7 defconfigs (lcd, usbnsh) from nsh_main
    to nxinit (init_main) as the system init entry point, matching the
    lckfb-szpi-esp32s3 board's existing nxinit configs (see 73c949c87e5a)
    for consistency across esp32s3 boards.
    
    - CONFIG_INIT_ENTRYPOINT switched to "init_main"
    - CONFIG_INIT_STACKSIZE set to 8192. Measured on lckfb-szpi-esp32s3
      with CONFIG_STACK_COLORATION=y on the worst case available: a config
      whose init.rc starts two services (console sh + adbd). At the 2048
      Kconfig default the board panics at runtime (xtensa_user_panic, task
      "sh"); at 4096 init_main reaches FILLED=99.5%, i.e. no headroom; at
      8192 it settles at USED=4336 (53.6%). A single-service config only
      fills 46.9% of a 3072-byte init stack, so 8192 is deliberately
      uniform rather than minimal: it covers the two-service worst case
      with roughly 2x margin and keeps every defconfig off the 2048
      default, where the init stack overflows and clobbers the global
      inode/mount tree - the procfs mount disappears, "ls /" crashes in
      read_pseudodir and "ps" reports "/proc not mounted".
    - CONFIG_SYSTEM_NXINIT=y added, plus its direct Kconfig dependencies
      (CONFIG_EXPERIMENTAL, CONFIG_LIBC_EXECFUNCS, CONFIG_SCHED_CHILD_STATUS,
      which depends on CONFIG_SCHED_HAVE_PARENT)
    - CONFIG_SYSTEM_NSH_STACKSIZE=8192 added: nsh now runs as a service
      spawned by init.rc instead of being init itself, so the shell
      workload is carried by its own stack rather than the init stack.
      Without this it falls back to CONFIG_DEFAULT_TASK_STACKSIZE (2048
      unless the defconfig overrides it) and crashes in getumask while
      running "ps", too small to reach the procfs read path.
    - ETC_ROMFS/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/xtensa/esp32s3/common/src/etc/init.d/init.rc), not as the
    top-level init.
    
    Verified both defconfigs build cleanly with make. Runtime
    behavior (init_main spawning nsh as a console service) was confirmed
    on lckfb-szpi-esp32s3 hardware, which shares the same nxinit/init.rc
    mechanism; this board has no hardware attached for a flash/boot pass
    in this session, so the build-verified defconfigs are the extent of
    local testing here.
    
    Assisted-by: Kiro:claude-sonnet-5
    Assisted-by: Kiro:claude-opus-5
    Signed-off-by: wangjianyu3 <[email protected]>
---
 .../xtensa/esp32s3/esp32s3-touch-lcd7/configs/lcd/defconfig  | 12 ++++++++++--
 .../esp32s3/esp32s3-touch-lcd7/configs/usbnsh/defconfig      | 12 ++++++++++--
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/boards/xtensa/esp32s3/esp32s3-touch-lcd7/configs/lcd/defconfig 
b/boards/xtensa/esp32s3/esp32s3-touch-lcd7/configs/lcd/defconfig
index 9e6adb92e17..0bea7170c0b 100644
--- a/boards/xtensa/esp32s3/esp32s3-touch-lcd7/configs/lcd/defconfig
+++ b/boards/xtensa/esp32s3/esp32s3-touch-lcd7/configs/lcd/defconfig
@@ -60,14 +60,18 @@ CONFIG_ESP32S3_SPIRAM=y
 CONFIG_ESP32S3_SPIRAM_MODE_OCT=y
 CONFIG_ESP32S3_SPIRAM_SPEED_80M=y
 CONFIG_ESP32S3_UART0=y
+CONFIG_ETC_ROMFS=y
 CONFIG_EXAMPLES_FB=y
+CONFIG_EXPERIMENTAL=y
 CONFIG_FS_PROCFS=y
+CONFIG_FS_ROMFS=y
 CONFIG_HAVE_CXX=y
 CONFIG_HAVE_CXXINITIALIZE=y
 CONFIG_IDLETHREAD_STACKSIZE=3072
-CONFIG_INIT_ENTRYPOINT="nsh_main"
-CONFIG_INIT_STACKSIZE=4096
+CONFIG_INIT_ENTRYPOINT="init_main"
+CONFIG_INIT_STACKSIZE=8192
 CONFIG_INTELHEX_BINARY=y
+CONFIG_LIBC_EXECFUNCS=y
 CONFIG_LINE_MAX=64
 CONFIG_MM_REGIONS=2
 CONFIG_NSH_BUILTIN_APPS=y
@@ -77,10 +81,14 @@ CONFIG_PREALLOC_TIMERS=4
 CONFIG_RAM_SIZE=114688
 CONFIG_RAM_START=0x20000000
 CONFIG_RR_INTERVAL=200
+CONFIG_SCHED_CHILD_STATUS=y
+CONFIG_SCHED_HAVE_PARENT=y
 CONFIG_SCHED_WAITPID=y
 CONFIG_START_DAY=6
 CONFIG_START_MONTH=12
 CONFIG_START_YEAR=2011
 CONFIG_SYSLOG_BUFFER=y
 CONFIG_SYSTEM_NSH=y
+CONFIG_SYSTEM_NSH_STACKSIZE=8192
+CONFIG_SYSTEM_NXINIT=y
 CONFIG_UART0_SERIAL_CONSOLE=y
diff --git a/boards/xtensa/esp32s3/esp32s3-touch-lcd7/configs/usbnsh/defconfig 
b/boards/xtensa/esp32s3/esp32s3-touch-lcd7/configs/usbnsh/defconfig
index 601f322f89f..81a034e7c27 100644
--- a/boards/xtensa/esp32s3/esp32s3-touch-lcd7/configs/usbnsh/defconfig
+++ b/boards/xtensa/esp32s3/esp32s3-touch-lcd7/configs/usbnsh/defconfig
@@ -30,13 +30,17 @@ CONFIG_DEBUG_FULLOPT=y
 CONFIG_DEBUG_SYMBOLS=y
 CONFIG_ESP32S3_OTG=y
 CONFIG_ESP32S3_UART0=y
+CONFIG_ETC_ROMFS=y
+CONFIG_EXPERIMENTAL=y
 CONFIG_FS_PROCFS=y
+CONFIG_FS_ROMFS=y
 CONFIG_HAVE_CXX=y
 CONFIG_HAVE_CXXINITIALIZE=y
 CONFIG_IDLETHREAD_STACKSIZE=3072
-CONFIG_INIT_ENTRYPOINT="nsh_main"
-CONFIG_INIT_STACKSIZE=4096
+CONFIG_INIT_ENTRYPOINT="init_main"
+CONFIG_INIT_STACKSIZE=8192
 CONFIG_INTELHEX_BINARY=y
+CONFIG_LIBC_EXECFUNCS=y
 CONFIG_LINE_MAX=64
 CONFIG_NSH_BUILTIN_APPS=y
 CONFIG_NSH_FILEIOSIZE=512
@@ -45,9 +49,13 @@ CONFIG_PREALLOC_TIMERS=4
 CONFIG_RAM_SIZE=114688
 CONFIG_RAM_START=0x20000000
 CONFIG_RR_INTERVAL=200
+CONFIG_SCHED_CHILD_STATUS=y
+CONFIG_SCHED_HAVE_PARENT=y
 CONFIG_SCHED_WAITPID=y
 CONFIG_START_DAY=6
 CONFIG_START_MONTH=12
 CONFIG_START_YEAR=2011
 CONFIG_SYSLOG_BUFFER=y
 CONFIG_SYSTEM_NSH=y
+CONFIG_SYSTEM_NSH_STACKSIZE=8192
+CONFIG_SYSTEM_NXINIT=y

Reply via email to