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

   ## Summary
   
   qemu-armv8a:rpserver and qemu-armv8a:rpproxy do not start NSH. nxinit starts 
NSH from init.rc with `posix_spawnp("sh")`, and the spawn fails with ENOENT 
every second: `Error Starting service 'console': 2`.
   
   These two configurations have `CONFIG_LIBC_ENVPATH=y`. With it, 
`load_module()` searches a file name without '/' only in PATH. PATH is empty 
(`CONFIG_PATH_INITIAL` is not set) and no BINFS is mounted, so "sh" is not 
found. The configurations came to nxinit with b6af2d4fac4 ("switch all nsh 
defconfigs to nxinit entrypoint"); before, `nsh_main` was the init entry point 
and no spawn was needed. The other qemu-armv8a configurations have no 
LIBC_ENVPATH, so the builtin loader finds "sh" by its name.
   
   This PR removes `CONFIG_LIBC_ENVPATH` from the two defconfigs. Nothing in 
them sets or uses PATH. qemu-armv7a:rpserver and qemu-armv7a:rpproxy already 
have no LIBC_ENVPATH.
   
   ## Impact
   
   - qemu-armv8a:rpserver and qemu-armv8a:rpproxy only. The defconfigs stay 
normalized (`make savedefconfig` gives the same files).
   - No documentation change: Documentation/ does not mention LIBC_ENVPATH for 
these boards.
   
   ## Testing
   
   qemu-armv8a:rpserver and qemu-armv8a:rpproxy (make, aarch64 gcc, `-Wno-cpp 
-Werror`), QEMU TCG on a Linux host, started as in the qemu-armv8a 
documentation (ivshmem):
   
   | image | NSH | rpmsg link |
   |---|---|---|
   | master 6d1fa235d69, server alone | no prompt: `Error Starting service 
'console': 2` 60 times in 60 s | – |
   | this PR, server alone | `server>` prompt | – |
   | this PR, server + proxy | `server>` and `proxy>` prompts | `mount -t 
rpmsgfs -o cpu=server,fs=/srvtmp /srv` on the proxy works, and file operations 
on it work |
   
   The same master failure shows on a macOS host (QEMU 11.0, the RPMSG port 
UART transport).
   
   `tools/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]

Reply via email to