mirror of
https://github.com/apache/nuttx.git
synced 2026-09-26 09:54:24 +08:00
Documentation: describe CMake build for qemu-intel64 knsh_romfs
The CMake build does not need the manual export/import/mkromfsimg steps: applications and the ROMFS image are generated by the normal build. Document the CMake invocation and how to run the image. Signed-off-by: raiden00pl <raiden00@railab.me> Assisted-by: Claude Code
This commit is contained in:
@@ -201,7 +201,7 @@ are built separately. It uses ROMFS to load the user-space applications.
|
||||
This is intended to run on QEMU with COM serial port support.
|
||||
|
||||
Steps to build kernel image with user-space apps in ROMFS::
|
||||
|
||||
|
||||
./tools/configure.sh qemu-intel64/knsh_romfs
|
||||
make -j
|
||||
make export -j
|
||||
@@ -213,6 +213,24 @@ Steps to build kernel image with user-space apps in ROMFS::
|
||||
popd
|
||||
make -j
|
||||
|
||||
With CMake the user-space applications and the ROMFS image are built as
|
||||
part of the normal build (``genromfs`` and ``xxd`` must be available on
|
||||
the host)::
|
||||
|
||||
cmake -B build -GNinja -DBOARD_CONFIG=qemu-intel64/knsh_romfs .
|
||||
cmake --build build
|
||||
|
||||
Then run the image with::
|
||||
|
||||
qemu-system-x86_64 -cpu host -enable-kvm -m 2G -kernel build/nuttx \
|
||||
-nographic -serial mon:stdio
|
||||
|
||||
The applications are installed to ``build/bin`` and mounted from ROMFS
|
||||
at ``/system/bin``. The configuration does not set ``CONFIG_PATH_INITIAL``,
|
||||
so start applications with an absolute path (``/system/bin/hello``) or
|
||||
enable ``CONFIG_LIBC_ENVPATH`` and ``CONFIG_PATH_INITIAL="/system/bin"``
|
||||
to resolve bare command names.
|
||||
|
||||
knsh_romfs_pci
|
||||
--------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user