JianyuWang0623 opened a new pull request, #19021:
URL: https://github.com/apache/nuttx/pull/19021

   *Note: Please adhere to [Contributing 
Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).*
   
   ## Summary
   
   Switch the `lckfb-szpi-esp32s3:adb` defconfig from the NSH-based init flow
   to `system/nxinit`, so that long-running services (console `sh`, `adbd`)
   are described in `/etc/init.d/init.rc` and spawned/reaped by a real init.
   
   - `defconfig`: `CONFIG_INIT_ENTRYPOINT="init_main"`, `CONFIG_SYSTEM_NXINIT=y`
     (pulls in `CONFIG_EXPERIMENTAL=y`).
   - New `boards/xtensa/esp32s3/common/src/etc/init.d/init.rc` defines the
     `console`/`adbd`/`fastbootd` services and starts them on `init`.
   - `Make.defs` adds the new `init.rc` to `RCSRCS` only when
     `CONFIG_SYSTEM_NXINIT=y`, so existing rcS-based configs are untouched.
   
   Depends on the apps-side `system/nxinit` upstreaming PR.
   
   ## Impact
   
   - Only affects `lckfb-szpi-esp32s3:adb`. All other esp32s3 configs continue
     to use `rc.sysinit` / `rcS` unchanged.
   - `adbd` is now a managed service with auto-restart instead of a one-shot
     background task launched from `rcS`.
   - No build, doc, security, or compatibility impact.
   
   ## Testing
   
   Host: Ubuntu 22.04, `xtensa-esp32s3-elf-gcc`, `esptool.py 4.8.1`.
   Board: `lckfb-szpi-esp32s3` (16 MB flash, 8 MB PSRAM).
   
   ```
   $ ./tools/configure.sh lckfb-szpi-esp32s3:adb
   $ make -j$(nproc)
   $ make flash ESPTOOL_PORT=/dev/ttyUSB0 ESPTOOL_BINDIR=./
   ```
   
   After boot, `adb shell` reaches NuttShell and `ps` confirms init owns the
   service lifecycle:
   
   ```
   $ adb -s 1234 shell ps
     TID   PID  PPID PRI POLICY  TYPE     ...  COMMAND
       3     3     0 100 RR      Task     ...  init_main
       4     4     3 100 RR      Task     ...  sh
       5     5     3 100 RR      Task     ...  adbd
   ```
   
   `init_main` (PID 3) is the parent of both `sh` and `adbd`. Killing `sh`
   restarts it within the configured `restart_period` (1 s).
   
   Spot-checked `lckfb-szpi-esp32s3:nsh`: builds identically; no `init.rc`
   included.
   


-- 
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]

Reply via email to