Commit graph

9274 commits

Author SHA1 Message Date
raiden00pl
35133b6a63 netutils/s2opc: add NuttX platform integration
Add Make and CMake packaging for the S2OPC 1.7.3 toolkit.

Assisted-by: OpenAI Codex:gpt-5
Signed-off-by: raiden00pl <raiden00@railab.me>
2026-09-07 15:01:21 -03:00
Ansh Rai
0ae2c5391c mlearning/tflite-micro: Register DEPTHWISE_CONV_2D in tflm_tool resolver.
MicroMutableOpResolver<8> only registered 8 ops, missing
DEPTHWISE_CONV_2D, required by any depthwise-separable CNN
(MobileNet-style, DS-CNN keyword-spotting models). The kernel
already exists upstream (Register_DEPTHWISE_CONV_2D_INT8() in
tensorflow/lite/micro/kernels/depthwise_conv.h); this wires it
into the resolver and bumps the template size to <9>.

Verified with micro_speech_quantized.tflite on sim:tflm.
Before: Didn't find op for builtin opcode 'DEPTHWISE_CONV_2D'.
After: RESHAPE/DEPTHWISE_CONV_2D/FULLY_CONNECTED/SOFTMAX all execute.

Signed-off-by: Ansh Rai <anshrai331@gmail.com>
2026-09-07 14:07:09 +02:00
raiden00pl
dc3cc88758 testing/ostest: use STACKSIZE for the wqueue test worker threads
Size the worker stacks with STACKSIZE like the rest of ostest.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-09-06 22:39:30 +08:00
Pavel Pisa
6be063a7fc graphics/microwindows: nanoxcalc fix and upstream update to fix warnings
This update introduces the following changes in mw:
- Fixed all idetified -Werror warnings in CI.
- Fixed the issue where the backspace key was not working in QEMU

Signed-off-by: Pavel Pisa <ppisa@pikron.com>
2026-09-06 10:39:44 -03:00
Acfboy
e0fd7c67c1 graphics/microwindiws: Update microwindows commit hash
This update introduces the following changes in mw:
- Fixed some -Werror warnings in CI.
- Fixed the issue where the backspace key was not working in QEMU

Signed-off-by: Acfboy <AcfboyU@outlook.com>
2026-09-04 11:49:29 +02:00
wangjianyu3
00653bb510 .github/workflows/build.yml: bump nuttx-ntfc-testing to release-0.0.2
nuttx-ntfc-testing's release-0.0.1 tag pins ntfc.yaml's citest
requirement to CONFIG_INIT_ENTRYPOINT=nsh_main, so any sim/citest
defconfig that switches to a different init entrypoint (e.g. nxinit's
init_main) fails CI with:

  OSError: Missing kconfig dependency: ['CONFIG_INIT_ENTRYPOINT', 'nsh_main']

Maintainer raiden00pl cut nuttx-ntfc-testing release-0.0.2, which drops
that CONFIG_INIT_ENTRYPOINT requirement from ntfc.yaml, and requested
both nuttx and nuttx-apps workflows be updated to it:
https://github.com/apache/nuttx-ntfc-testing/issues/7#issuecomment-5480486089

Only the `git clone -b release-0.0.1` line is changed; the unrelated
`ntfc==0.0.1` PyPI package pin (build.yml) is untouched.

Assisted-by: opencode-agent/claude-sonnet-5
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-09-01 11:24:28 +08:00
guao
c91322216b testing/crypto: add SHA2-224 HMAC test case
Add SHA2-224 HMAC verification to the crypto hmac test using
CRYPTO_SHA2_224_HMAC through the /dev/crypto interface. Uses
standard HMAC test vectors producing a 28-byte digest.

Signed-off-by: guao <guao@xiaomi.com>
2026-08-29 00:12:45 +08:00
guao
6a19675e77 testing/crypto: add chacha20 and chacha20-poly1305 tests
Add test cases for ChaCha20 stream cipher and ChaCha20-Poly1305
AEAD algorithm using the NuttX cryptodev interface. Tests cover
RFC 7539 test vectors including encryption/decryption with various
key/nonce/counter combinations.

Signed-off-by: guao <guao@xiaomi.com>
2026-08-29 00:12:45 +08:00
wangjianyu3
63698738a8 system/nxinit: add cmocka unit tests for parser/action/service
Add a test/ subdirectory (mirroring apps/system/uorb/test/) with
cmocka-based unit tests covering the NxInit logic most prone to
regression:

- init_parse_arguments(): plain/quoted arguments, "--" separator vs.
  "--option" long options (regression coverage for a previously fixed
  bug), argv-capacity truncation (asserting the exact folded contents
  of the last slot, not just its presence).
- init_parse_config_file()/init_parse_config_lines()/
  init_parse_config_buffer(): section routing, blank/whitespace-only
  line skipping, unknown-section rejection, over-length line rejection,
  and a line straddling two read-buffer refills, exercised through both
  the file-based and buffer-based entry points.
- Action event matching: exact match, invert (!=), fnmatch wildcards,
  and AND semantics across multiple events per action.
- Service conflict detection: duplicate service name rejection,
  override replacing an earlier duplicate, and the SERVICE_ARGS_MAX
  boundary built dynamically from CONFIG_SYSTEM_NXINIT_SERVICE_ARGS_MAX
  rather than a hardcoded value.

Test sources compile action.c/parser.c/service.c a second time into a
separate nxinit_unit_test program, gated behind new
CONFIG_SYSTEM_NXINIT_TEST (depends on TESTING_CMOCKA); the default init
program is unaffected. The CMake path builds a dedicated
nxinit_unit_test target (with test/test_nxinit.c placed first in SRCS
so nuttx_add_application() renames its main() correctly); the Make path
appends the test sources into the shared CSRCS list.

Supporting bits required to make the suite exercise the real code:

- init_parse_config_buffer() is declared in parser.h and made
  non-static so the buffer-based boundary test can call it directly,
  alongside the existing init_parse_config_file() entry point.
- CONFIG_SYSTEM_NXINIT_ACTION_EVENTS_MAX default is raised from 1 to 2
  so an action can carry more than one event ("on evA && evB"), which
  the multi-event AND-semantics test exercises; a single event slot
  made that test dead code.
- CONFIG_SYSTEM_NXINIT_TEST_STACKSIZE defaults to 8192: several parser
  test cases build multi-hundred-byte stack buffers on top of cmocka's
  own overhead, and the previous DEFAULT_TASK_STACKSIZE (2048)
  overflowed the test task's stack silently on real hardware (no crash
  dump, no watchdog reset, output just stopped) partway through the
  suite.

Testing:
Built via `make CROSSDEV=riscv-none-elf-` for
esp32p4-pico-wifi-wareshare:nsh (CONFIG_SYSTEM_NXINIT_TEST=y) and ran
nxinit_unit_test on real esp32p4-pico-wifi-wareshare hardware over
UART:

  nsh> nxinit_unit_test
  [==========] nxinit_tests: Running 18 test(s).
  ...
  [==========] nxinit_tests: 18 test(s) run.
  [  PASSED  ] 18 test(s).

nxstyle clean on all touched files.

Assisted-by: GitHubCopilot:claude-sonnet-5
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-08-28 09:33:47 -03:00
wangjianyu3
7a1c6aaa7c system/nxinit: fix stack-buffer-overflow in init_parse_config_buffer
init_parse_config_buffer() computed the per-refill copy length as
MIN(len - off, sizeof(tmp)) without subtracting the 'n' leftover bytes
already held at the front of 'tmp' from a previous refill, so
memcpy(&tmp[n], ..., r) could write past the end of tmp[]. The
file-based twin, init_parse_config_file(), already gets this right
(read(fd, &buf[n], sizeof(buf) - n)).

Reproduced locally with an AddressSanitizer host harness feeding the
real 95-byte builtin "preset" rc content through
init_parse_config_buffer() at CONFIG_SYSTEM_NXINIT_RC_LINE_MAX=32/48:
ASan reports a stack-buffer-overflow on the 'tmp' array. Fixed to
MIN(len - off, sizeof(tmp) - n) and reverified clean at
RC_LINE_MAX=32/48/64/128.

The default config never hits this (the builtin preset is 95 bytes and
the default RC_LINE_MAX is 128), but SYSTEM_NXINIT_RC_LINE_MAX had no
lower bound, so lowering it towards 32/48 for a smaller build would
silently corrupt the stack while parsing the preset during boot. Add a
"range 64 4096" bound so the value can no longer be set below the
builtin preset's needs.

Assisted-by: opencode:mimo-v2.5-pro
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-08-28 09:33:47 -03:00
wangjianyu3
a31fe191fa system/nxinit: fix missing blank line after declaration in parser.c
init_parse_config_file() declares 'r' inside the read loop with no
blank line before the following 'if (r < 0)' statement, violating the
NuttX coding standard (nxstyle: "Missing blank line after
declarations"). checkpatch.sh runs a whole-file nxstyle check on any
file a commit touches, not diff-only, so this pre-existing issue
surfaced on this PR's CI once parser.c was touched again.

Assisted-by: GitHubCopilot:claude-sonnet-5
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-08-28 09:33:47 -03:00
wangjianyu3
5c3f14ae76 system/nxinit: fix truncated line loss in config parser
init_parse_config_lines() had a dead early "continue" for a truly
empty line (buf == "\0") that skipped the memmove() bookkeeping its
sibling whitespace-only-line branch performs. When a real empty line
appeared mid-buffer, subsequent bytes were never shifted to the front
of the working buffer, corrupting the remaining-length tracking and
silently dropping every line after it for that refill chunk.

The whitespace-skip loop right below already handles the empty-string
case correctly (the loop body never executes, so it falls straight
into the "only whitespace" -> memmove -> continue path), so the buggy
early exit is simply redundant and removed.

Assisted-by: GitHubCopilot:claude-sonnet-5
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-08-28 09:33:47 -03:00
wangjianyu3
11c1c6bece system/nxinit: add 'set' builtin command for environment variables
Previously, 'set KEY VALUE' in init.rc was not recognized as a builtin
command. It fell through to posix_spawnp(), which ran it in a
temporary child shell. The environment variable was set only in the
child process and lost when it exited, so services started afterward
never inherited it.

Register cmd_set as an init builtin that calls setenv(key, value, 1)
directly in the init process. The command takes exactly 2 arguments
(key and value). All code is guarded by CONFIG_DISABLE_ENVIRON so it
compiles out when environment support is disabled.

Since child processes inherit init's environment, 'set TZ Asia/Shanghai'
in init.rc now correctly propagates to all subsequently started
services.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-08-28 09:30:53 -03:00
wangjianyu3
ec33a924a5 system/nxinit: increase SERVICE_ARGS_MAX default to 16
The previous default of 8 is insufficient for services with many
arguments (e.g. ptpd needs 10 argv slots). When exceeded, argv lacks
a NULL terminator, causing posix_spawnp to read out of bounds.

Increase default to 16 to prevent argument truncation for typical
daemon services.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-08-28 09:30:53 -03:00
zhengyu16
48ddaadad1 nshlib, wamr: fix pre-existing style issues in touched files
Because this PR modifies nsh_fscmds.c and wamr/Kconfig, CI runs
nxstyle and codespell over the whole files and rejects pre-existing
issues that are unrelated to the rename:

  - nsh_fscmds.c: reindent misaligned switch/case blocks in cmd_dmesg,
    cmd_losetup, cmd_losmart, cmd_lomtd, cmd_mkdir, cmd_mkfatfs and
    cmd_mkrd to the standard NuttX layout.
  - wamr/Kconfig: fix two spelling typos flagged by codespell
    ("expections" -> "exceptions", "Configuable" -> "Configurable").

Style/whitespace and spelling only; no functional change.

Signed-off-by: zhengyu16 <zhengyu16@xiaomi.com>
2026-08-27 13:31:34 +08:00
zhengyu16
9cda1fbb60 fs: rename PSEUDOFS_SOFTLINKS to FS_LINKS
The link support is no longer limited to the pseudo file system and now
covers both soft (symbolic) links and hard links across the VFS.  Update
all references to the renamed configuration option PSEUDOFS_SOFTLINKS,
which has been renamed to FS_LINKS in the NuttX kernel, so that nshlib,
the interpreters, adb, tlpi and the test suites keep building.

This must be merged together with the corresponding NuttX change that
performs the actual kernel-side rename.

Signed-off-by: zhengyu16 <zhengyu16@xiaomi.com>
2026-08-27 13:31:34 +08:00
Pavel Pisa
94012303da netutils/libshvc: implement headers export and update shv-libs4c
The uLUt and libshvc declare headers intended for make export
by EXPORTED_INCLUDES mechanism implemented during 2026
Micowindows GSoC. The shv-libs4c has been updated as well
to support newer pyshv versions and that way firmware updates
when shv-nxboot-updater is used through pyshv based shvflasher.py
and related GUI.

For pyshv see https://github.com/silicon-heaven/pyshv

New commits from shv-libs4c project

  https://github.com/silicon-heaven/shv-libs4c

- shv_com_common: shv_unpack_discard and shv_unpack_skip

   required to skip additional parameters and query requests
   introduced introduced by newer silicon-heaven protocol
   and pyshv. Incorrect skipping was a bug even against
   previous protocol version but did not present itself because
   older pyshv did not send additional requests which need
   to be ignored.

- shv_file_node: small, but crucial unpack change

  Ignore any other messages than PARAM in file node's write unpack
  function. Other different states should be handled, too.

- shv_file_node: fix the CRC unpack method too

  Any other messages than PARAM are ignored.

- shv_com: add a method to close a connection only

- shv_dotdevice_node.c: close the conn with the other side when resetted

- shv_com.h: use array designators for error strings

- libshvtree: move shv_con_errno_strs to the C file to not waste space
  by copies

- shvtree/shv_clayer_posix: provide alternative socketpair notification
  support

  This allows to use shv-libs4c and related pysimCoder support
  on RTEMS system which does not provide functional pipe
  directive/system call but BSD networking supported local/UNIX
  socket pair is fully supported.

Signed-off-by: Pavel Pisa <ppisa@pikron.com>
2026-08-27 02:04:21 +08:00
wangjianyu3
82eb73da76 system/nxinit: fix unkown -> unknown typo in resetcause[]
codespell flagged this in PR #3751 CI:
  system/nxinit/init.c:119: unkown ==> unknown
  system/nxinit/init.c:130: unkown ==> unknown

Both entries were introduced by the resetcause-for-triggers commit and
are unrelated to the earlier nxstyle regression already discussed on
the PR.

Assisted-by: GitHubCopilot:claude-sonnet-5
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-08-26 10:00:02 -03:00
wangjianyu3
c91fe7bf01 system/nxinit: Add missing "assert" entry to resetflag
Add the missing mapping entries in the resetflag[] array to prevent
potential NULL pointer dereference when accessing reset.flag.

The resetflag array uses designated initializers and must have entries
for all BOARDIOC_SOFTRESETCAUSE_* values to avoid array holes.

Reported by: xuchuntian@xiaomi.com
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-08-26 10:00:02 -03:00
wangjianyu3
ee32ebda06 system/nxinit: Add subreason for sys.boot.reason
init.rc

  on init && property:sys.boot.reason=watchdog,4
     ...

  on init && property:sys.boot.reason=bootloader|recovery|thermal
     ...

Test

  cause->cause = BOARDIOC_RESETCAUSE_CPU_RWDT;
  cause->flag  = 4
  init_main: setprop key:sys.boot.reason value:watchdog,4

  cause->cause = BOARDIOC_RESETCAUSE_CPU_SOFT;
  cause->flag  = BOARDIOC_SOFTRESETCAUSE_ENTER_BOOTLOADER;
  init_main: setprop key:sys.boot.reason value:bootloader

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-08-26 10:00:02 -03:00
wangjianyu3
fd35a05249 system/nxinit: Add resetcause for triggers
Add built-in property sys.boot.reason, which allows action triggers to be
executed on specific reset cause.

For example:
  ```
  on property:sys.boot.reason=cpu_soft_reset(bootloader)
      echo "bootloader mode ..."
      start fastboot
  ```

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-08-26 10:00:02 -03:00
fangpeina
4cb0068732 system/nxinit: support compound command execution
Example in init.rc:
  echo "start" && hello && echo "done"
  ls /missing || echo "not found"
  echo "A" && echo "B" || echo "fallback"

Signed-off-by: fangpeina <fangpeina@xiaomi.com>
2026-08-26 10:00:02 -03:00
Filipe Cavalcanti
19bab7621d examples/lvglterm: fix wrong dependency on PSEUDOTERM
Changes PSEUDOTERM dependency from 'select' to 'depends on' which was
missing from the initial pull request.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-08-26 10:28:21 +08:00
Filipe Cavalcanti
2b92bedaee examples/lvglterm: replace PIPES with PSEUDOTERM
The lvglterm terminal now runs the shell on a pseudo-terminal instead of three
plain pipes.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-08-25 12:21:12 +08:00
raiden00pl
d570175cc9 interpreters/python: use NuttX readline for TTY input
CPython's default TTY reader bypasses NuttX editing and control-key handling.

Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: Claude Code
2026-08-24 22:15:31 +08:00
raiden00pl
9545e12054 system/readline: add caller-selectable control handling
Let CPython handle Ctrl-D and signals without changing existing NSH behavior.

Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: Claude Code
2026-08-24 22:15:31 +08:00
wangjianyu3
0923948d80 system/nxinit: fix event-board timing
Move the boot event orchestration into a preset config buffer so the
"init" and (optional) "netinit"/"finalinit" events are triggered as a
serialized chain rather than queued back-to-back in main(). This fixes
the timing between preset event initialization and board initialization.

Adapted for the community tree: BOARDIOC_INIT has been removed upstream
(replaced by CONFIG_BOARD_LATE_INITIALIZE), so no board_init/board_finalinit
builtins are added and no boardctl(BOARDIOC_INIT)/boardctl(BOARDIOC_FINALINIT)
calls are reintroduced; board device init is now performed by the kernel
before init starts.

netinit is not a boardctl call, so it is kept in the serialized event
chain like the original: add a "netinit" builtin that calls
netinit_bringup(), driven by "on init -> trigger netinit -> on netinit",
instead of calling netinit_bringup() directly in main(). finalinit
remains a pure event for user-defined services to hook.

Assisted-by: GitHubCopilot:claude-opus-4.8
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-08-24 20:11:14 +08:00
jingfei
6d178011d5 system/nxinit: Add start_cpu support for action
Add support for starting a cpu's software.
Depends on `BOARDCTL_START_CPU`.

Signed-off-by: jingfei <jingfei@xiaomi.com>
2026-08-24 20:11:14 +08:00
wangjianyu3
a485d9636b system/nxinit: Add boot support for action
Add support for booting a new application firmware image.
Depends on `BOARDCTL_BOOT_IMAGE`.

When the built-in boot command of nsh is enabled, the built-in boot
command of Init will take precedence (see init_builtin_run()). To use
the built-in boot command of nsh, use: `exec -- sh boot [args...]`.

Referred to nshlib/nsh_syscmds.c: cmd_boot()

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-08-24 20:11:14 +08:00
wangjianyu3
e0a1031bcc system/nxinit: add check loop to init_parse_config_buffer
Add the parser[n].check validation loop to init_parse_config_buffer(),
matching the same pattern already used in init_parse_config_file().
This ensures that services and actions parsed from in-memory buffers
are properly validated after parsing.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-08-24 20:11:14 +08:00
wangjianyu3
63eb6c79f2 system/nxinit: Extract init_parse_config_buffer()
Extract the init_parse_config_buffer() interface from the init_parse_config_file() function.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-08-24 20:11:14 +08:00
zhangyu117
21bb388f8e apps: replace atomic_fetch_xxx with atomic_xxx
Rename atomic_fetch_xxx to atomic_xxx (e.g., atomic_fetch_add ->
atomic_add) and atomic_store/atomic_load to atomic_set/atomic_read,
to match the <nuttx/atomic.h> API rename in the companion nuttx PR.

The atomic_fetch_xxx naming is reserved by the C/C++ standard and
conflicts with standard library declarations when <atomic>/
<stdatomic.h> is included by third-party code.

Files changed:
- crypto/openssl_mbedtls_wrapper/mbedtls/ssl_lib.c
- testing/libc/atomic/atomic_main.c
- testing/ostest/roundrobin.c
- testing/ostest/spinlock.c

Signed-off-by: zhangyu117 <zhangyu117@xiaomi.com>
2026-08-24 20:10:37 +08:00
aviralgarg05
44d1f6c05a examples/calculator: add an LVGL touchscreen calculator
Add a touchscreen calculator with cooperative shutdown and board initialization through BOARDIOC_FINALINIT.

Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
2026-08-24 12:03:42 +08:00
aviralgarg05
e871059fa4 games: support supervised loadable game processes
Allow cgol, match4, and snake to build as modules. Let cgol handle SIGTERM from its render loop and release the framebuffer.

Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
2026-08-24 12:02:46 +08:00
Bogdan
31342e02ce testing/nettest: add cmocka test for local socket SCM_RIGHTS
Add CMocka regression test case to verify local socket SCM_RIGHTS
behavior when the file descriptor table is exhausted.

Signed-off-by: Bogdan <Bogdan4ik0759@gmail.com>
2026-08-23 11:04:33 +08:00
raiden00pl
a71c329cfb netutils/paho_mqtt: configure embedded runtime mode
Expose the upstream HIGH_PERFORMANCE mode through
CONFIG_LIB_MQTT5_HIGH_PERFORMANCE and enable it by default. This keeps
normal embedded builds lightweight while allowing developers to restore
Paho heap and call-stack diagnostics when investigating library issues.

Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: OpenAI Codex:gpt-5
2026-08-22 17:10:33 -03:00
raiden00pl
53c234880c netutils/paho_mqtt: separate library worker stack size
Add CONFIG_LIB_MQTT5_THREAD_STACKSIZE for threads created
internally by Paho and use it in Thread.c.
Keep CONFIG_UTILS_MQTT5_STACKSIZE scoped to the two utility
application tasks.

This permits S2OPC to enable MQTT through LIB_MQTT5 without
also building unrelated command-line utilities.

Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: OpenAI Codex:gpt-5
2026-08-22 17:10:33 -03:00
raiden00pl
6e56388956 netutils/paho_mqtt: fix package preparation and utilities
The bundled patch still contains an MQTTPacket.h hunk for a bool
typedef that no longer exists in Paho 1.3.15. Make and CMake both
hide the resulting rejection, allowing a partially patched source
tree to be compiled. Remove the stale hunk and make patch failures
fatal.

The Make context target also allows VersionInfo.h generation to
race source extraction under parallel builds. Make the generated
header depend on the extraction target so the input template is
present first.

The publisher and subscriber samples live below src/samples but
include public headers from src. Add the Paho source include directory
to the Make flags, matching the CMake targets, so CONFIG_UTILS_MQTT5
builds both utilities.

Finally, define distclean independently of whether the downloaded
tree exists when Make parses the file. Remove package-owned archives
and sources while preserving a developer Git checkout, and ignore
those downloaded paths.

Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: OpenAI Codex:gpt-5
2026-08-22 17:10:33 -03:00
raiden00pl
e3dc165ccc examples/nxterm: add serial console fallback
Prevent framebuffer startup failures from leaving the system without NSH.

Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: Claude Code
2026-08-22 17:09:58 -03:00
raiden00pl
c775800214 examples/nxterm: add PTY-backed keyboard console
Convert event-mode keyboard records into the TTY input and signals NSH expects.

Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: Claude Code
2026-08-22 17:09:58 -03:00
raiden00pl
6b3b42008b examples/nxterm: add full-screen window option
Use the full framebuffer instead of the example's centered three-quarter window.

Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: Claude Code
2026-08-22 08:47:01 -03:00
raiden00pl
96f6e7d460 system/readline: restore terminal attributes safely
Track successful mode changes so failed setup cannot corrupt terminal state.

Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: Claude Code
2026-08-22 08:45:03 -03:00
wangjianyu3
247a8c03cb system/nxinit: fix argument parser treating --option as -- separator
The init_parse_arguments() function checked for '--' by only
comparing the first two characters, causing options like --system,
--nofork to be misinterpreted as the '--' argument separator. This
truncated the remaining arguments. Add an isblank() check on the
third character to ensure only standalone '--' followed by whitespace
triggers the separator logic.

Assisted-by: GitHubCopilot:claude-4.6-opus
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-08-22 17:36:04 +08:00
wangjianyu3
8ff98a6b51 system/nxinit: Parse default cpu-specific configs
On the basis of init.rc, add default parsing of cpu-specific configs.
- /etc/init.d/init.rc
- /etc/init.d/init.cpu${CPUID}.rc

Refactor function `init_parse_configs()` to parse files from the default path
instead of identifying and parsing directories or files, as the functionality
is unnecessary.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-08-22 17:36:04 +08:00
Acfboy
d7f64eca5b example/microwindows: exports microwindows/src/include
registers microwindows/src/include through the EXPORTED_INCLUDES
 mechanism in its Make.defs

Signed-off-by: Acfboy <AcfboyU@outlook.com>
2026-08-21 10:59:06 -03:00
Acfboy
564cabe9b1 build: introduce EXPORTED_INCLUDES machanism
* Introduce EXPORTED_INCLUDES in apps/Make.defs; every entry is
  prefixed with INCDIR_PREFIX and added to CFLAGS/CXXFLAGS so it
  takes effect in the in-tree build as well
* The export target in apps/Makefile copies the content of the listed
  directories into the include directory of the export package, so
  out-of-tree applications built from the package can still find the
  public headers

Signed-off-by: Acfboy <AcfboyU@outlook.com>
2026-08-21 10:59:06 -03:00
Acfboy
1080111f99 graphics/microwindows: add NONETWORK mode for linking Nano-X apps with the server
* Add CONFIG_MICROWINDOWS_NANOX_NONETWORK which builds the Nano-X
  client library and server in the linked-in (NONETWORK) mode, so
  client applications are linked directly with the server and run in
  the same task, requiring no network stack or socket at all
* Reorganize the source lists: the drawing sources (nxdraw, nxutil,
  nxtransform, nxpaintnc) are shared by both modes, while the server
  is built from srvnet.c in the network mode and srvnonet.c in the
  NONETWORK mode
* Use MULTITHREAD_SERVER in the network mode so that several client
  tasks can run at the same time in the flat build
* Let the examples/nanoxterm start the server task only in the
  network mode (NONETWORK applications run the server inside main)

Assisted-by: OpenCode:DeepSeek-V4-Flash
Signed-off-by: Acfboy <AcfboyU@outlook.com>
2026-08-21 10:59:06 -03:00
Acfboy
634d2dbdea examples/nanoxterm: add Nano-X terminal emulator example
* Port the nxterm demo from Microwindows
* Starts the Nano-X server as a separate task before connecting
* Runs an NSH shell instance on a pseudo terminal in the spwaned child
  instead of exec /bin/sh (no filesystem binaries in flat builds)

Assisted-by: OpenCode:DeepSeek-V4-Flash
Signed-off-by: Acfboy <AcfboyU@outlook.com>
2026-08-21 10:59:06 -03:00
Acfboy
d79e503612 examples/nanoxcalc: add Nano-X calculator example
* Port the nxcalc demo from Microwindows
* Connects to the Nano-X server started by examples/nanoxterm
* Requires CONFIG_LIBC_FLOATINGPOINT for the result formatting

Signed-off-by: Acfboy <AcfboyU@outlook.com>
2026-08-21 10:59:06 -03:00
Acfboy
edb4d26663 graphics/microwindows: add Nano-X client library and built-in server support for NuttX
Build the Nano-X client library, server and (optional) built-in window manager
from the bundled Microwindows tree

Signed-off-by: Acfboy <AcfboyU@outlook.com>
2026-08-21 10:59:06 -03:00