Commit graph

8445 commits

Author SHA1 Message Date
Tomasz 'CeDeROM' CEDRO
2dcad906bc github: master branch protection tune.
* Strict master branch protection requires all PR to be in sync with latest
  master even if changes are not related and there are no conflicts.
* Because we have lots of daily merges this blocks most of the PRs as they
  are forced to be rebased on top of current master.
* This also causes unnecessary automatic CI rebuild of each rebase.
* Therefore we are setting strict status checks setting to false.
* required_signatures in github means not only `git commit -s` but also
  cryptographic signature which is not required by us, setting false.
* Disable "contexts" checks enforcement, that cause CI problems, mark TODO.

References:
https://github.com/apache/infrastructure-asfyaml?tab=readme-ov-file
https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification
https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits

Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
2025-06-24 22:19:00 +08:00
Tomasz 'CeDeROM' CEDRO
fa0e073baf github: Setup protection for master branch.
* We do not have "Settings" tab in the Apache's owned repository,
  thus we need to update .asf.yaml file with repository settings.
* No direct push to master branch is possible.
* Require status checks to pass before merge.
* Setup reviews parameters.
* Require signatures.
* Require conversation resolution.
* Require linear history.

Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
2025-06-24 22:19:00 +08:00
simbit18
1e053ee936 check.yml: fix cvt2utf not found sync with nuttx repository
This PR add missing cvt2utf installation on our CI
see apache/nuttx#16561

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-06-24 08:02:07 +08:00
wangjianyu3
6afed10118 system/fastboot: add depends for TCP poll
Add TCP backlog dependence for poll(),
network related configurations referenced to may has not enable it,
without which the TCP handshake will fail.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-06-23 15:45:51 +08:00
wangjianyu3
11cf4211ab system/fastboot: enable usb and tcp the same time
Add support for enabling USB and TCP transport at the same time.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-06-23 15:45:51 +08:00
wangjianyu3
abf9fbee30 system/fastboot: switch to epoll
Switch from poll() to epoll().

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-06-23 15:45:51 +08:00
wangjianyu3
e23ba4891d system/fastboot: rename argument context to ctx
Rename argument "context" to "ctx" for all functions.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-06-23 15:45:51 +08:00
wangjianyu3
7790894bb6 system/fastboot: add support for fastboot tcp
Add TCP network transport support for fastboot, users can
add "-s tcp:HOST[:PORT]" option to specify a network device.

Examples

  fastboot -s tcp:192.168.100.2 getvar version
  fastboot -s tcp:192.168.100.2 flash virtblk0 fastboot.c
  fastboot -s tcp:192.168.100.2 oem shell "uname -a"

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-06-18 22:06:08 +08:00
wangjianyu3
75033b7d26 system/fastboot: add func for context and usbdev
fastboot_context_initialize : initialize fastboot context
fastboot_context_deinit     : deinitialize fastboot context
fastboot_usbdev_initialize  : initialize usbdev and open USB endpoint
fastboot_usbdev_deinit      : close USB endpoint

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-06-18 22:06:08 +08:00
wangjianyu3
88fea63ff4 system/fastboot: replace GETUINT32 with be32toh
Replace macro `FASTBOOT_GETUINT32` with function `be32toh()`.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-06-18 22:06:08 +08:00
raiden00pl
faea03f1fd add system/adcscope - streaming tool for ADC
add adcscope app allowing to stream data from ADC device with logging/nxscope.
Useful for testing ADC drivers.

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-06-17 14:29:08 -03:00
Michal Lenc
7b42dfc53e boot/nxboot: fix compile errors caused by nxboot_progress
Function nxboot_progress is located in nxboot_main.c, but this file
is not compiled when NXboot is used as a library to an existing
application and not as a bootloader. Therefore, the declaration of
nxboot_progress function should be dependent on NXBOOT_PROGRESS
config option.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-06-17 21:25:22 +08:00
wangjianyu3
38bd6accea system/fastboot: add const for memdump_print_t
Add qualifier "const" to the declaration of `memdump_print_t`,
the value of the 2nd argument will not be changed.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-06-17 20:57:23 +08:00
Matteo Golin
5e50e2c1f9 system/syslogd: Initial implementation
Initial implementation of syslogd including version information, simple
usage help and UDP transmission. The current implementation transmits
RFC 5424 formatted syslog entries over UDP for consumption by a syslog
collector. Only some options from the manpage are implemented since
NuttX doesn't currently have the ability for some of the more complex
features (-l, etc.).

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-06-17 20:43:58 +08:00
wangjianyu3
7375f6574e system/fastboot: move usbdev init after help
Move initialization of usbdev to after help().

This patch fix that even users just run `fastbootd -h`,
the usbdev will also be (re)initialized,
and if the daemon is running the status will be broken.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-06-15 11:19:49 +08:00
wangjianyu3
4c605ac43f system/fastboot: dump all memory regions
Add examples for oem memdump dumping all memory regions.

Host side

  $ fastboot oem memdump
  fastboot oem memdump 0x20000 0x28000
  fastboot get_staged 0x20000.bin
  fastboot oem memdump 0x40000000 0xf590000
  fastboot get_staged 0x40000000.bin
  fastboot oem memdump 0x4ff30000 0xd0000
  fastboot get_staged 0x4ff30000.bin
  FAILED (remote: 'Invalid argument')
  fastboot: error: Command failed

Device side

  nsh> fastbootd -h
  Usage: fastbootd [wait_ms]

  memdump:
      fastboot oem memdump 0x20000 0x28000
      fastboot get_staged 0x20000.bin
      fastboot oem memdump 0x40000000 0xf590000
      fastboot get_staged 0x40000000.bin
      fastboot oem memdump 0x4ff30000 0xd0000
      fastboot get_staged 0x4ff30000.bin

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-06-15 11:19:21 +08:00
Michal Lenc
7ca3656c3e benchmarks/osperf/osperf.c: add pipe read-write performance test
This adds a simple pip read-write performance test.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-06-14 17:20:23 +08:00
Michal Lenc
9a73fb7f4b benchmarks/osperf/osperf.c: fix spelling mistakes
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-06-14 17:20:23 +08:00
dongjiuzhu1
4f5c283438 testing/fs: update api name fs_getfilep/fs_putfilep to file_get/file_put
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-06-12 18:12:32 +08:00
Tim Hardisty
bcd1b46946 apps/boot/nxboot: Enhancements to add progress messages and copy-to-RAM feature
This adds Kconfig-enabled progress messages that are output to stdout.

It also adds Kconfig-enabled option to copy the validated and bootable image to RAM

Signed-off by: Tim Hardisty <timh@jti.uk.com>
2025-06-05 20:06:51 +08:00
wangjianyu3
4b8b96f060 system/uORB: fix orb_subscribe_multi undefined
Fix `orb_subscribe_multi` undefined error.

/workspace/prebuilts/gcc/linux/arm64/bin/../lib/gcc/aarch64-none-elf/13.2.1/../../../../aarch64-none-elf/bin/ld: apps/system/uorb/libapps_uorb_listener.a(listener.c.o): in function `listener_monitor':
/workspace/apps/system/uorb/listener.c:803:(.text.listener_monitor.constprop.0+0xe4): undefined reference to `orb_subscribe_multi'
/workspace/apps/system/uorb/listener.c:803:(.text.listener_monitor.constprop.0+0xe4): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `orb_subscribe_multi'

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-06-05 19:43:10 +08:00
ouyangxiangzhen
a03ed46947 ostest/wdog: Remove periodical wdog test cases.
The peridiodical wdog test cases should be removed after removing of the periodical wdog APIs.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-06-05 19:42:52 +08:00
Tim Hardisty
f0eb00ffd9 examples: add mdnsd example application to accompany netutils/mdns library
This commit adds a new example app to allow the newly added netutils/mdns
library and associated daemon to be exeercised.

Signed-off-by: Tim Hardisty <timh@jti.uk.com>
2025-06-02 23:18:24 +08:00
Tim Hardisty
30b1c024a1 apps/netutils: add mdns library support
This commit allows an external mDNS library to be included in NuttX.

It originates from here: <https://github.com/mjansson/mdns>

It is declared as being in the Public Domain as per <http://unlicense.org>

Signed-off-by: Tim Hardisty <timh@jti.uk.com>
2025-06-02 23:18:24 +08:00
vrmay23
8ff533beb3 examples/posix_stdio: Fix Kconfig to define default stack size
Fix the Kconfig file for the posix_stdio example by adding
the STACKSIZE symbol and setting it to DEFAULT_TASK_STACKSIZE.

This change ensures that the example builds properly and
respects system-wide stack size configuration.

Signed-off-by: Vinicius May <vmay.sweden@gmail.com>
2025-06-01 09:21:15 -03:00
raiden00pl
44eeb1c7c8 testing: unify Private Types banners
unify Private Types banners according to NuttX coding standard

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-05-28 10:16:50 +08:00
raiden00pl
32bcd87d8f system: unify Private Types banners
unify Private Types banners according to NuttX coding standard

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-05-28 10:16:50 +08:00
raiden00pl
1d3abc2651 modbus: unify Private Types banners
unify Private Types banners according to NuttX coding standard

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-05-28 10:16:50 +08:00
raiden00pl
d62db5eb38 logging: unify Private Types banners
unify Private Types banners according to NuttX coding standard

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-05-28 10:16:50 +08:00
raiden00pl
94d02aaaf2 examples: unify Private Types banners
unify Private Types banners according to NuttX coding standard

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-05-28 10:16:50 +08:00
dependabot[bot]
291373732f build(deps): bump codelytv/pr-size-labeler from 1.10.2 to 1.10.3
Bumps [codelytv/pr-size-labeler](https://github.com/codelytv/pr-size-labeler) from 1.10.2 to 1.10.3.
- [Release notes](https://github.com/codelytv/pr-size-labeler/releases)
- [Commits](https://github.com/codelytv/pr-size-labeler/compare/v1.10.2...v1.10.3)

---
updated-dependencies:
- dependency-name: codelytv/pr-size-labeler
  dependency-version: 1.10.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-27 14:11:00 +08:00
Richard Tucker
18b72e89a4 apps/testing: fix typo 2025-05-26 18:56:32 +02:00
ouyangxiangzhen
a570953257 ostest/wdog: update wdog_test.
This commit updated the wdog_test to adapt to the semantic changes of
the wd_start.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-05-22 13:27:16 +08:00
ouyangxiangzhen
afade4f5c9 testing/ostest: add periodic wdog testing.
This commit added periodic wdog testing.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-05-22 13:27:16 +08:00
George Poulios
49f6a219f9 examples/optee_gp: Fix Kconfig if/else condition
Previous Kconfig had a mistake guarding optee_gp
Kconfig values based on EXAMPLES_OPTEE instead of
EXAMPLES_OPTEE_GP. Fix that

Signed-off-by: George Poulios <gpoulios@census-labs.com>
2025-05-21 00:35:27 +08:00
raiden00pl
a8740c2602 logging/nxscope: fix various warnings reported by CodeChekcer
fix various warnings reported by CodeChekcer for nxscope

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-05-17 12:02:32 +08:00
raiden00pl
877e4919cb wireless/bluetooth/nimble/Kconfig: add missing header
wireless/bluetooth/nimble/Kconfig: add missing header

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-05-17 12:02:02 +08:00
raiden00pl
71df58e937 logging/nxscope: allow use in C++ code
allow nxscope to use in C++ code

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-05-17 12:01:42 +08:00
dongjiuzhu1
fb6b3ddfd9 nsh/script: remove double close for output fd
the output fd had been closed in nsh_closeifnotclosed, so
remove double close.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-05-14 15:03:35 +08:00
George Poulios
7b383d0562 examples/optee_gp: Add a OP-TEE GP API client example
Add an example app that opens a session with the devices pseudo-TA
and enumerates the available devices (prints their UUIDs only)
using the GlobalPlatform API and libteec.

The example showcases:
  - initializing the context
  - opening a session
  - invoking a command using NULL references
  - invoking a command using temp shared memory
  - invoking a command using registered shared memory
  - closing the session
  - finalizing the context

Enabled with CONFIG_EXAMPLES_OPTEE_GP.

Signed-off-by: George Poulios <gpoulios@census-labs.com>
2025-05-13 21:17:51 +08:00
George Poulios
67db0af4eb tee/libteec: Add optee_client/libteec library
Support for downloading, patching and linking against
optee_client/libteec by NuttX apps. Defaults to version
4.6.0.

Enabled with CONFIG_LIBTEEC.

More info:
 - https://github.com/OP-TEE/optee_client
 - https://optee.readthedocs.io/en/latest/architecture/globalplatform_api.html#tee-client-api
 - https://globalplatform.org/specs-library/?filter-committee=tee (GPD_SPE_007)

Signed-off-by: George Poulios <gpoulios@census-labs.com>
2025-05-13 21:17:51 +08:00
George Poulios
677089b912 examples/optee: Correct use of shm reg id and flags
Previous version of optee example was using id during
shm registration as input whereas it is an output
variable. It was also specifying flags to dictate the
behaviour whereas the latest implementation of the
driver prohibits their use. This commit addresses
those issues.

Signed-off-by: George Poulios <gpoulios@census-labs.com>
2025-05-13 21:17:51 +08:00
wangjianyu3
0fbeae7f0d uORB/sensor: Add timestamp for GNSS data
Add timestamp for GNSS measurements and clock, for matching.

When recovering the combination of `GnssMeasurement` and `GnssClock` into
[GnssData](https://android.googlesource.com/platform/hardware/libhardware/+/
           refs/heads/android14-release/include/hardware/gps.h#1748),
the reason for splitting is that the uORB buffer is not large enough to
accommodate `GnssData`, since different topics cannot guarantee the
same timing when publishing and subscribing data, we need an index to match.

WARNING: A new member "timestamp" of type uint64_t has been added at
the beginning of the struct "sensor_gnss_measurement" and "sensor_gnss_clock".

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-05-12 16:22:10 +08:00
Tiago Medicci
d63bb6d81d interpreters/python: Do not link to standard libraries
This commit prevents Python from linking to standard libraries.
This is needed because Python's `configure` script tests for a set
of available functions that are provided by NuttX (instead of the
toolchain) and not having `-nostdlib` set may give wrong results.
2025-05-11 11:31:57 +08:00
Jukka Laitinen
376cc5a731 testing/ostest: Add checking of signal delivery TID to signest test
- Add another signal action, "interfere_action", and signal the interfere thread
- In both signal action functions (waiter and interfere), check that they get executed
  in correct thread's context

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-05-08 23:21:13 +08:00
vrmay23
77b2e8dfee examples/posix_stdio: New example dedicated to posix stdio library.
This example will help newcomers to port software from Linux to NuttX
in a POSIX compliant fashion using stdio library. It shows how to work with
open(), close() and write() functions over /dev/console.

Signed-off-by: Vinicius May <vmay.sweden@gmail.com>
2025-05-07 20:07:35 +08:00
George Poulios
30ef8ff845 examples/optee: Introduce an OP-TEE client example
Add an example app that opens a session with the devices pseudo-TA
and enumerates the available devices (prints their UUIDs only).

The example showcases:
 - opening the OP-TEE client driver
 - printing its version
 - opening a session
 - allocating shared memory
 - registering shared memory
 - invoking a function to the TA referencing the shared memory
 - closing the session

Enabled with CONFIG_EXAMPLES_OPTEE.

Signed-off-by: George Poulios <gpoulios@census-labs.com>
2025-05-05 23:58:57 +08:00
Jukka Laitinen
a011cad584 testing/ostest/signest: Replace kill with pthread_kill to fix running in SMP
"kill" sends the signal to all the the threads in the group. The intention of
the test is to send signals only to the "waiter" thread.

Running signal actions in parallel is not compatible behaviour with
the signest test, which assumes that signals are being run one after another.
For example running signals 38 and 40 in parallel on two threads/two cpus
would cause the test incorrectly fail on "even signals nested".

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-05-03 11:09:07 +08:00
wangjianyu3
f14249d1d3 system/uORB: Add API for sending loop exit event
Add orb_loop_exit_async() API to send exit event to uORB loop.

Closing immediately after a write may cause missing a wakeup.

When all file descriptors associated with the same eventfd object have been closed, the resources for object are freed by the kernel. --EVENTFD(2)

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-04-26 15:48:15 +02:00
wangjianyu3
3b0181dbd0 system/uORB: Fix orb_loop_s undeclared error
/workspace/apps/system/uorb/uORB/internal.h:42:31: error: 'struct orb_loop_s' declared inside parameter list will not be visible outside of this definition or declaration

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-04-26 15:48:15 +02:00