Commit Graph

1124 Commits

Author SHA1 Message Date
tengshuangshuang 8730f32308 mq_open:remove support for _POSIX_MQ_OPEN_MAX
In pse52 case, tests the maximum number of message queue descriptors that can be opened as defined by the system, or if it is not supported:
"A call to mq_open() when too many message queue descriptors or file descriptors are currently in use by the calling process shall return -1 and set errno to EMFILE."
In Linux implementation,  MQ_OPEN_MAX always return -1 to indicate no support of MQ_OPEN_MAX.
It's not necessary for us to support max mq open feature, use -1 should prefer.

Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
2026-04-21 01:34:50 +08:00
ganjing 396d0a5380 (libc/tls): enhance thread-local storage security
Signed-off-by: ganjing <ganjing@xiaomi.com>
2026-04-21 01:34:47 +08:00
tengshuangshuang 93e68a88d9 timer_create:add limit for the timer number of per process
A call to timer_create() when the calling process has
already created all of the timers it is allowed by
the implementation shall return -1 and set errno to
EAGAIN.

Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
2026-04-21 01:34:13 +08:00
guoshichao 8525d88782 limits: add the default value for _POSIX_THREAD_KEYS_MAX
the CONFIG_TLS_NELEM is depends on !CONFIG_DISABLE_PTHREAD, and pthread
is not always enabled, so we need to add default value for
_POSIX_THREAD_KEYS_MAX to preevent build error on pthread is disabled

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2026-04-21 01:34:05 +08:00
tengshuangshuang d5ffea2306 sysconf:add pse52 mode standard
Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
2026-04-21 01:32:33 +08:00
tengshuangshuang 4d20253005 sysconf:add support for AIO_LISTIO_MAX
In the case test of ltp, nent is set to 10, so the value of AIO_LISTIO_MAX in limit.h is modified to 11 in order to pass the ltp test.

Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
2026-04-21 01:32:11 +08:00
guoshichao 676f33687a limits: add _POSIX_PTHREAD_ constant for pthread management
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2026-04-21 01:27:56 +08:00
zhangyuan29 74f78d1371 sem: change sem wait to atomic operation
Add sem_wait fast operations, use atomic to ensure
atomicity of semcount operations, and do not depend
on critical section.

Test with robot:
before modify:
nxmutex_lock cost: 78 ns
nxmutex_unlock cost: 82 ns

after modify:
nxmutex_lock cost: 28 ns
nxmutex_unlock cost: 14 ns

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2026-04-21 01:18:41 +08:00
zhangshoukui 2b683fbdf5 Add LINE_MAX configuration
Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2026-04-21 01:14:54 +08:00
guoshichao 138756e43b limits: add LINE_MAX limits definition
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2026-04-21 01:14:49 +08:00
Alin Jerpelea 1c4ebed9a4 include: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2026-04-21 00:59:40 +08:00
openvela-robot b566da436e sim:support sim elf and dynamic libs package in post build
use the dynamic library .so of the binding compilation environment,
and then modify the dynamic loader of elf at runtime to run sim elf across system versions

1.add post-build for sim build
2.collect dynamic .so and dynamic interpreter
3.add execution script for the entire package sim elf

change text-segment to 0x50000000
because patchelf will modify the .dynamic section in elf,
the upward alignment of elf will be less than 0x3fffffff,
which will cause asan shadow memory overlap error

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2026-04-21 00:59:38 +08:00
Alin Jerpelea 8a3b7f63ca include: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2026-04-21 00:59:19 +08:00
yinshengkai 5db9028d50 clock: replace all up_perf_xx with perf_xx
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 23:22:51 +08:00
openvela-robot a472d617a1 arch: add use_data to g_tcbinfo
to avoid compiler/linker remove it from the final image

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 23:22:49 +08:00
openvela-robot 050a5ec67f Add a stepper generic upperhalf driver
Add a stepper A4988 lowerhalf driver
2026-04-20 23:22:46 +08:00
openvela-robot a95c04067c nuttx/binder:Initialize the ret parameter before allocating buffer.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2026-04-20 23:22:44 +08:00
openvela-robot 42a6239868 arm64: XN should only be set when the attribute MT_EXECUTE_NEVER is set
Only when SCTLR_ELn.WXN is set to 1, regions that are writable at ELn
are treated as non-executable. Therefore, when SCTLR_ELn.WXN is set to
0, regions that are writable at ELn can be executed, so the writable
attribute cannot be used to restrict the executable attribute.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2026-04-20 23:22:41 +08:00
openvela-robot c9be65bbbf mmcsd: fix cmd6 timeout error when repeat calling
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2026-04-20 23:22:38 +08:00
openvela-robot b782d97859 feat(esp32s3-eye): I2C 2026-04-20 23:22:34 +08:00
openvela-robot 2dde44c03e wifi/simdriver: Support the sim wifi.
Add the Sim WiFi function, which can provide the wifi operating on nuttx sim emulator,
and support two modes that simulate wifi, HWSIM and RNC(real network card).

 - In the HWSIM mode, we simulates two wlan interfaces. The wlan0 is STA and
   the wlan1 is AP. The wlan0 can connect to the wlan1 in the nuttx simulator.
 - In the RNC mode, we can use the same wlan interface name on the nuttx simulator
   to control the connection behavior of the real wireless card.

Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2026-04-20 23:22:31 +08:00
openvela-robot ab2eb57660 refine: move BIT Macro to nuttx/bits.h
The BIT macro is widely used in NuttX,
and to achieve a unified strategy,
we have placed the implementation of the BIT macro
in bits.h to simplify code implementation.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2026-04-20 23:22:29 +08:00
openvela-robot 01188bbd23 net: allow icmpv6 and udp to find the dev by the ifindex with s_boundto.
In order to support the dhcpv6c.

Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2026-04-20 23:22:26 +08:00
openvela-robot 0b43578809 ramlog: remove sched_[un]lock and rl_nwaiters
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2026-04-20 23:22:24 +08:00
openvela-robot db00c9d4a7 driver: add pinctrl framework
Signed-off-by: zhanghu5 <zhanghu5@xiaomi.com>
2026-04-20 23:22:19 +08:00
openvela-robot 3f61fecf32 lib_memfd: turn a runtime error into a linker error
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2026-04-20 23:22:15 +08:00
openvela-robot 1f4483c5d0 video/fb: Add fb_register_device
so the user could register fb device directly instead
go through the sequence of up_fbinitialize/up_fbgetvplane

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 23:22:12 +08:00
openvela-robot 536cb28e90 Fix some typos in comments
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2026-04-20 23:22:10 +08:00
openvela-robot 4b16fdc100 Merge remote-tracking branch 'vela/dev-merge-github-20230228' into dev 2026-04-20 23:21:56 +08:00
openvela-robot 8fb55f3091 net/usersock: Return -ENOSUPP directly if domain isn't equal to PF_INET/PF_INET6
regression by https://github.com/apache/nuttx/pull/9647

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 23:21:54 +08:00
openvela-robot 6d589e91ce arch/sim: change SIM_STACKSIZE_ADJUSTMENT to 128KB
Signed-off-by: haopengxiang <haopengxiang@xiaomi.com>
2026-04-20 23:21:48 +08:00
yinshengkai 6d997fdca7 clock: replace all up_perf_xx with perf_xx
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 23:21:41 +08:00
openvela-robot eb10e6593b dns: fix dns failed when ipv4/6 dual stack enable
The ipv6 address filled the cache, and the ipv4 address did not have a
place to store it, causing the resolution to fail. so if IPV6 has already
filled the buffer, rewrite ipv4 DNS results from half of the buffer.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2026-04-20 23:21:26 +08:00
openvela-robot 47b075e783 nuttx: fix nxstyle issues
sync with mainline

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2026-04-20 23:21:21 +08:00
openvela-robot 1b78a8e19a serial: add an option that selects uart rpmsg as console 2026-04-20 23:21:09 +08:00
openvela-robot a06319a423 regulator:sync github code and fix some issues
1.miss regulator_rpmsg_get_reg when kmm_zalloc.
2.regulator_rpmsg_get_client kmm_zalloc len is less due to crash.
3.regulator_rpmsg_client_destroy does not match server cpu name,may destory by stop other rptun dev

Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2026-04-20 23:21:05 +08:00
openvela-robot 167bb9c353 enable O_CLOEXEC explicit
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2026-04-20 23:21:01 +08:00
openvela-robot a56015f507 libs/libc/libc.csv: fix the wcsspn declaration error
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2026-04-20 23:20:57 +08:00
openvela-robot 66b3c1de6a Fix nuttx coding style
Remove TABs
Remove spaces
Fix indentation
2026-04-20 23:20:50 +08:00
openvela-robot 21e1fc44d5 pthread_cleanup: rm sched_[un]lock
Since TLS is only used within a single thread and requires no additional protection.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2026-04-20 23:20:47 +08:00
openvela-robot ad75fbcda6 drivers/modem/alt1250: Fix bug that modem version could not be taken
Fix bug that modem version could not be taken.
2026-04-20 23:20:42 +08:00
openvela-robot 92d696ed3d video/fb: add vsync queue
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2026-04-20 23:20:38 +08:00
openvela-robot f8ad39780a libs/libc/wchar: add wcscpy implementation
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2026-04-20 23:20:33 +08:00
openvela-robot 59e75b7129 tools/minudumpserver: support auto start GDB and execute some commands
like
```bash
./nuttx/tools/minidumpserver.py -l log.log -e vela_ap.elf -a arm --gdb prebuilts/gcc/linux/arm/bin/arm-none-eabi-gdb
```

Signed-off-by: xinbingnan <xinbingnan@xiaomi.com>
2026-04-20 23:20:29 +08:00
openvela-robot f95bdccaf9 arch/arm64: select ARCH_HAVE_IRQTRIGGER for all arm64 chip
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2026-04-20 23:20:23 +08:00
openvela-robot c199997b15 mmcsd: support dump cid and csd with mmc-utils
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2026-04-20 23:20:18 +08:00
openvela-robot 70cb2188db Exec: Support run exec in current task
There is a problem when vfork() calls execv() (or execl()) to start a new application:
When the parent thread calls vfork() it receives and gets the pid of the vforked task,
and not the pid of the desired execv'ed application.
see issue #3334

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
2026-04-20 23:20:13 +08:00
openvela-robot c4d62a9eb5 Revert "bcmf_thread: wait until need load blm"
sync with mainline

This reverts commit 38c2adc14d32d0dc51e0963cbfcb7152f87a5038.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2026-04-20 23:20:08 +08:00
openvela-robot 250c273fd0 wifi: parse channel from IE when ctl_ch is 0
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2026-04-20 23:20:04 +08:00
openvela-robot d1953ba43a tools/testbuild: restore the original toolchain configuration before refresh
Signed-off-by: chao an <anchao@xiaomi.com>
2026-04-20 23:20:00 +08:00