JianyuWang0623 opened a new pull request, #20964: URL: https://github.com/apache/nuttx/pull/20964
## Summary In a protected build the kernel cannot see the user-space builtin list, so `posix_spawnp()` of a builtin fails with `ENOENT` unless user space first calls `boardctl(BOARDIOC_BUILTINS)`. With nxinit as init, every service fails to start and there is no shell. This series publishes the builtin table through `struct userspace_s` instead, and removes `BOARDIOC_BUILTINS` and `builtin_setlist()`. ## Impact - Protected builds: builtins can be spawned without any user-space registration. Flat/kernel builds unchanged. - ABI: `BOARDIOC_BUILTINS` removed and later `BOARDIOC_*` renumbered; `struct userspace_s` gains two fields. - All 46 in-tree `kernel/*_userspace.c` updated. ## Testing `rv-virt:pnsh` (protected + nxinit + ostest) on `qemu-system-riscv32`, apps at upstream master. Before (master `d17f5c91e4f`), no shell: ``` ABCDError Starting service 'console': 2 Error Starting service 'console': 2 Error Starting service 'console': 2 Error Starting service 'console': 2 ... ``` After (this PR): ``` ABCDnsh> ostest stdio_test: Standard I/O Check: printf ostest_main: Started user_main at PID=5 user_main: vfork() test vfork_test: Child 6 ran and exited before the parent resumed ... Final memory usage: VARIABLE BEFORE AFTER ======== ======== ======== arena ff1b0 ff1b0 ordblks 5 8 mxordblk f5ff8 f0ff8 uordblks 5d10 7d30 fordblks f94a0 f7480 user_main: Exiting ostest_main: Exiting with status 0 nsh> ``` Also built `esp32s3-devkit:knsh` (each commit), `imxrt1050-evk:knsh`, `esp32s3-devkit:nsh`; `checkpatch.sh -c -u -m -g` passes. -- 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]
