Apache NuttX is a mature, real-time embedded operating system (RTOS) https://nuttx.apache.org/
Find a file
wangjianyu3 324c894bd2 boards/x86/qemu/qemu-i486: Switch nsh/vga_fb from nsh to nxinit.
Aligns the qemu-i486 nsh and vga_fb defconfigs with the nxinit
migration already done for sim, rv-virt and qemu-armv8a:

- CONFIG_INIT_ENTRYPOINT/ENTRYNAME: "nsh_main" -> "init_main"
- CONFIG_SYSTEM_NXINIT=y, plus its dependencies CONFIG_EXPERIMENTAL,
  CONFIG_LIBC_EXECFUNCS, CONFIG_SCHED_HAVE_PARENT and
  CONFIG_SCHED_CHILD_STATUS
- CONFIG_ETC_ROMFS=y (CONFIG_FS_ROMFS was already enabled on both
  configs)
- New boards/x86/qemu/qemu-i486/src/etc/init.d/init.rc, identical in
  content to boards/arm64/qemu/qemu-armv8a/src/etc/init.d/init.rc
  (service console sh + restart_period 1000, started from `on init`
  under CONFIG_SYSTEM_NSH)
- src/Makefile: add init.rc to RCSRCS when CONFIG_ETC_ROMFS and
  CONFIG_SYSTEM_NXINIT are both set, matching qemu-armv8a's
  src/Makefile

This depends on the previous commit ("arch/x86: Add -P to CPP to
suppress linemarkers."): without it, the preprocessed init.rc that
Board.mk feeds to nxinit's parser at build time still contains GNU
linemarker lines and the parser rejects it with -EINVAL at boot. That
arch-level fix is otherwise independent and can be reverted on its
own without affecting other x86 boards.

qemu-i486 is 32-bit x86 with no romfs_img/romdisk_register/
romfs_boot/romfs_stub definitions anywhere under its board directory,
so it does not hit the romfs_img symbol collision that affects
qemu-intel64 (a separate board, tracked separately); i486 goes
straight from a clean ETC_ROMFS build to a working /etc mount.

Verified under QEMU (qemu-system-i386), both configs, host gcc -m32
(CROSSDEV is unset on Linux, ARCH_X86_M32=y already handles -m32):

nsh (-cpu 486 -m 2):
  nsh> ps
    TID   PID  PPID PRI POLICY   TYPE    NPX STATE    EVENT     SIGMASK            STACK COMMAND
      0     0     0   0 FIFO     Kthread   - Ready              0000000000000000 0002024 Idle_Task
      2     2     0 100 FIFO     Task      - Waiting  Semaphore 0000000000000000 0002004 init_main
      3     3     2 100 FIFO     Task      - Running            0000000000000000 0002012 sh
  nsh> mount
    /etc type romfs
    /proc type procfs
  nsh> free
        total       used       free    maxused    maxfree  nused  nfree name
       572784       9680     563104      10048     563104     52      1 Umem

vga_fb (-cpu 486 -m 1024 -vga std -serial stdio -display none): same
init_main/sh parent-child relationship, /etc romfs mounted, `fb`
framebuffer test completes ("Test finished"); free shows
551696/86832/464864 total/used/free (heavier due to LCD framebuffer
allocations, still well clear of CONFIG_RAM_SIZE=1048576).

ostest (third config on this board, INIT_ENTRYPOINT="ostest_main")
is out of scope and left untouched.

Assisted-by: Claude:claude-sonnet-5
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-09-17 16:21:59 +08:00
.github ci: apply Depends-On dependencies to the memory report 2026-09-15 08:47:25 -03:00
arch arch/x86: Add -P to CPP to suppress linemarkers. 2026-09-17 16:21:59 +08:00
audio audio: limit the buffer count guard to shared ring requests 2026-08-05 07:58:53 +02:00
binfmt libs/libc/elf, binfmt: Describe the GOT by base and size, not by index. 2026-09-08 16:31:16 -03:00
boards boards/x86/qemu/qemu-i486: Switch nsh/vga_fb from nsh to nxinit. 2026-09-17 16:21:59 +08:00
cmake cmake: fix undefined function name in parse args error messages 2026-09-11 21:15:22 +08:00
crypto tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-07-28 21:26:03 -03:00
Documentation Documentation/am67: Document I2C support on t3-gem-o1. 2026-09-17 13:49:35 +08:00
drivers drivers/sensors/sensor: cancel fetch watchdog on close to fix UAF 2026-09-15 09:41:11 +08:00
dummy
fs fs/inode: bound fdlist_extend() against the requested row 2026-09-17 13:50:27 +08:00
graphics graphics/nxterm: consume SGR escape sequences 2026-08-23 10:46:02 +08:00
include libc: add paths.h, sys/ttydefaults.h and termios IUTF8 2026-09-15 14:51:15 +02:00
libs libc/atexit: honor registrations made during exit processing 2026-09-14 18:52:46 -03:00
mm mm/pgalloc: support 32 KB and 64 KB page sizes 2026-09-10 23:28:43 +08:00
net net/tcp: add configurable delayed ACK threshold 2026-09-08 09:00:19 +08:00
openamp cmake: Use NUTTX(_DIR/_BIN_DIR) instead CMAKE(_SRC_DIR/_BIN_DIR) 2026-08-09 11:13:08 -03:00
pass1 tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-07-28 21:26:03 -03:00
sched sched/clock: Normalize CLOCK_FD getres errors. 2026-09-16 00:04:02 +08:00
syscall fs: rename PSEUDOFS_SOFTLINKS to FS_LINKS 2026-08-27 01:12:33 +08:00
tools tools: pass TOPDIR in SDIR_template and MAKE_template 2026-09-17 13:49:05 +08:00
video video/videomode: Fix EDID parsing and formatting of video mode dumps 2026-08-29 11:09:11 -03:00
wireless wireless/bluetooth: fix inverted MTU cap in bt_conn_send() 2026-08-30 10:48:18 -03:00
.asf.yaml github: master branch protection tune. 2025-05-07 18:37:13 -05:00
.codespell-ignore-lines arch/arm: Reserve r10 via ARCHCFLAGS and hoist the PIC module flags. 2026-07-24 23:09:08 +08:00
.codespellrc Revert "zbus: Add linker support and documentation for the zbus port" 2026-08-30 10:45:19 -03:00
.editorconfig .editorconfig: fix character encoding property specification 2025-11-28 19:12:13 +08:00
.gitignore boards/risc-v/eic7700x: Adopt the common board layout. 2026-08-19 01:40:57 +08:00
.gitmessage docs/contributing: Add a commit message template 2025-06-03 17:33:24 +08:00
.pre-commit-config.yaml
.yamllint
AUTHORS AUTHORS: add Jorge Guzman 2026-08-25 08:43:13 -04:00
CMakeLists.txt cmake: reconfigure when .config changes 2026-09-14 18:40:45 -03:00
CONTRIBUTING.md contributing: Add requirement for 'Assisted-by' commit field 2026-07-12 09:42:28 +08:00
INVIOLABLES.md
Kconfig include/nuttx: Add link-time iterable sections infrastructure 2026-08-27 01:04:05 +08:00
LICENSE libs/libdsp: Add Matrix operations 2026-07-11 14:55:59 -03:00
Makefile !boards: enforce secure ROMFS passwd and TEA key setup 2026-07-09 22:41:11 +08:00
NOTICE
README.md ci/testing: Add MemBrowse Integration 2026-06-18 12:07:41 -03:00
ReleaseNotes

POSIX Badge License Issues Tracking Badge Contributors GitHub Build Badge Documentation Badge MemBrowse

Apache NuttX is a real-time operating system (RTOS) with an emphasis on standards compliance and small footprint. Scalable from 8-bit to 64-bit microcontroller environments, the primary governing standards in NuttX are POSIX and ANSI standards. Additional standard APIs from Unix and other common RTOSs (such as VxWorks) are adopted for functionality not available under these standards, or for functionality that is not appropriate for deeply-embedded environments (such as fork()).

For brevity, many parts of the documentation will refer to Apache NuttX as simply NuttX.

Getting Started

First time on NuttX? Read the Getting Started guide! If you don't have a board available, NuttX has its own simulator that you can run on terminal.

Documentation

You can find the current NuttX documentation on the Documentation Page.

Alternatively, you can build the documentation yourself by following the Documentation Build Instructions.

The old NuttX documentation is still available in the Apache wiki.

Supported Boards

NuttX supports a wide variety of platforms. See the full list on the Supported Platforms page.

Contributing

If you wish to contribute to the NuttX project, read the Contributing guidelines for information on Git usage, coding standard, workflow and the NuttX principles.

License

The code in this repository is under either the Apache 2 license, or a license compatible with the Apache 2 license. See the License Page for more information.