This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit a69cd3d825a9c4148b47c00fc14fa67a61ac8ccf
Author: Acfboy <[email protected]>
AuthorDate: Thu Jul 30 01:23:39 2026 +0800

    qemu-intel64/mw: add mw configuration and documentation
    
    Add the qemu-intel64:mw defconfig and board documentation entry. This 
configuration uses the Multiboot2 framebuffer, USB HID keyboard event input at 
/dev/kbda, and USB HID mouse.
    
    Signed-off-by: Acfboy <[email protected]>
    
    Assisted-by: Opencode/Deepseek-V4-pro
---
 .../x86_64/qemu/boards/qemu-intel64/index.rst      | 40 ++++++++++++++
 .../x86_64/qemu/qemu-intel64/configs/mw/defconfig  | 62 ++++++++++++++++++++++
 2 files changed, 102 insertions(+)

diff --git a/Documentation/platforms/x86_64/qemu/boards/qemu-intel64/index.rst 
b/Documentation/platforms/x86_64/qemu/boards/qemu-intel64/index.rst
index 66885aaa839..f6999a833c9 100644
--- a/Documentation/platforms/x86_64/qemu/boards/qemu-intel64/index.rst
+++ b/Documentation/platforms/x86_64/qemu/boards/qemu-intel64/index.rst
@@ -282,3 +282,43 @@ and USB keyboard::
       -chardev stdio,id=pciser,signal=off \
       -device pci-serial,chardev=pciser \
       -device qemu-xhci,id=xhci -device usb-kbd,bus=xhci.0
+
+mw
+--
+
+Microwindows demo configuration using framebuffer, USB HID keyboard in event
+mode (``/dev/kbda``), and USB HID mouse.
+
+Build the demo with::
+
+   cd nuttx
+   tools/configure.sh qemu-intel64:mw
+   make -j$(nproc)
+
+The build produces a flat ``nuttx.elf`` image.  To run it on QEMU you need a
+bootable ISO with GRUB2:
+
+#. Create the ISO directory structure::
+
+      mkdir -p iso/boot/grub
+
+#. Write ``grub.cfg``::
+
+      echo 'set timeout=0'          > iso/boot/grub/grub.cfg
+      echo 'set default=0'         >> iso/boot/grub/grub.cfg
+      echo 'menuentry "kernel" {'  >> iso/boot/grub/grub.cfg
+      echo '  multiboot2 /boot/nuttx.elf' >> iso/boot/grub/grub.cfg
+      echo '}'                     >> iso/boot/grub/grub.cfg
+
+#. Copy ``nuttx.elf`` and create the ISO::
+
+      cp nuttx.elf iso/boot/
+      grub-mkrescue -o boot.iso iso
+
+#. Run QEMU (omit ``-nographic`` so the framebuffer window opens)::
+
+      qemu-system-x86_64 -cpu host -enable-kvm -m 2G -cdrom boot.iso
+
+The pre-built config sets ``CONFIG_INIT_ENTRYPOINT="mwdemo_main"`` so the
+demo starts immediately.  See
+:doc:`/applications/graphics/microwindows/index` for Microwindows details.
diff --git a/boards/x86_64/qemu/qemu-intel64/configs/mw/defconfig 
b/boards/x86_64/qemu/qemu-intel64/configs/mw/defconfig
new file mode 100644
index 00000000000..a16db486543
--- /dev/null
+++ b/boards/x86_64/qemu/qemu-intel64/configs/mw/defconfig
@@ -0,0 +1,62 @@
+#
+# This file is autogenerated: PLEASE DO NOT EDIT IT.
+#
+# You can use "make menuconfig" to make any modifications to the installed 
.config file.
+# You can then do "make savedefconfig" to generate a new defconfig file that 
includes your
+# modifications.
+#
+# CONFIG_ARCH_INTEL64_HAVE_PCID is not set
+# CONFIG_ARCH_PVHBOOT is not set
+CONFIG_16550_ADDRWIDTH=16
+CONFIG_16550_UART0=y
+CONFIG_16550_UART0_BASE=0x3f8
+CONFIG_16550_UART0_CLOCK=1843200
+CONFIG_16550_UART0_IRQ=36
+CONFIG_16550_UART0_RXBUFSIZE=16
+CONFIG_16550_UART0_SERIAL_CONSOLE=y
+CONFIG_16550_UART0_TXBUFSIZE=16
+CONFIG_16550_UART=y
+CONFIG_ARCH="x86_64"
+CONFIG_ARCH_BOARD="qemu-intel64"
+CONFIG_ARCH_BOARD_INTEL64_QEMU=y
+CONFIG_ARCH_CHIP="qemu"
+CONFIG_ARCH_CHIP_INTEL64_QEMU=y
+CONFIG_ARCH_INTEL64_CORE_FREQ_KHZ=2600000
+CONFIG_ARCH_SIZET_LONG=y
+CONFIG_ARCH_X86_64=y
+CONFIG_BOOT_RUNFROMEXTSRAM=y
+CONFIG_DEBUG_SYMBOLS=y
+CONFIG_DEFAULT_TASK_STACKSIZE=65536
+CONFIG_DEV_SIMPLE_ADDRENV=y
+CONFIG_DRIVERS_VIDEO=y
+CONFIG_EXAMPLES_MICROWINDOWS=y
+CONFIG_EXAMPLES_MICROWINDOWS_PROGNAME="mwdemo"
+CONFIG_GRAPHICS_MICROWINDOWS=y
+CONFIG_HIDKBD_STACKSIZE=10240
+CONFIG_HIDMOUSE_STACKSIZE=10240
+CONFIG_HIDMOUSE_XMAX=1024
+CONFIG_HIDMOUSE_YMAX=768
+CONFIG_IDLETHREAD_STACKSIZE=4096
+CONFIG_INIT_ENTRYPOINT="mwdemo_main"
+CONFIG_INIT_PRIORITY=20
+CONFIG_LIBM=y
+CONFIG_MICROWINDOWS_KBD_EVENT_PATH="/dev/kbda"
+CONFIG_MICROWINDOWS_MWIN=y
+CONFIG_MULTBOOT2_FB=y
+CONFIG_PCI=y
+CONFIG_PCI_MSIX=y
+CONFIG_PTHREAD_STACK_MIN=4096
+CONFIG_RAM_SIZE=268435456
+CONFIG_SCHED_HPWORK=y
+CONFIG_SCHED_LPWORK=y
+CONFIG_SCHED_TICKLESS=y
+CONFIG_START_DAY=12
+CONFIG_START_MONTH=6
+CONFIG_START_YEAR=2026
+CONFIG_USBHOST=y
+CONFIG_USBHOST_HIDKBD=y
+CONFIG_USBHOST_HIDMOUSE=y
+CONFIG_USBHOST_WAITER=y
+CONFIG_USBHOST_XHCI_PCI=y
+CONFIG_USEC_PER_TICK=1
+CONFIG_VIDEO_FB=y

Reply via email to