patacongo commented on issue #12356:
URL: https://github.com/apache/nuttx/issues/12356#issuecomment-2115472462

   > ... I am trying to understand if there's a way to compile the nsh library 
into the kernel or if I have to perform a `make export` and then a `make 
import` inside the `../apps` folder, followed by rebuilding NuttX with the 
generated romfs header file using the `mkromfsimg.sh` tool. ...
   
   No, that is not possible.  NSH users only user space OS interfaces.  These 
cannot (or at least should) be used inside of the OS.
   
   Also, each process lives inside a protected address space.  If NSH were in 
the kernel, it could not interact with anything in user space and vice versa.
   
   > If so, can you comment on why the size of the generated `boot_romfsimg.h` 
file is so large? Is there a way to minimize the size of this?
   
   That is mostly because there are no shared libraries.  As a consequence, a 
lot of C library code must be duplicated in each process.  There is a lot of 
room for improvement for KERNEL build tools to make things cleaner.  Wouldn't 
it be nice if there were a elf-nuttx- toolchain that could build efficient ELF 
modules as simply as GLIBC and GCC make build Linux processes?
   
   You can reduce the amount of C library code in the module to reducing the 
size of the symbol table that draws the code into the link.


-- 
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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to