Commit Graph

199 Commits

Author SHA1 Message Date
dongjiuzhu1 fe1d8f5260 timerfd: notify application of system relatime changes
refs : https://man7.org/linux/man-pages/man2/timerfd_create.2.html

If the associated clock is either CLOCK_REALTIME or
CLOCK_REALTIME_ALARM, the timer is absolute
(TFD_TIMER_ABSTIME), and the flag TFD_TIMER_CANCEL_ON_SET
was specified when calling timerfd_settime(), then read(2)
fails with the error ECANCELED if the real-time clock
undergoes a discontinuous change.  (This allows the
reading application to discover such discontinuous changes
to the clock.)

examples code:
{
    int nevents = epoll_wait(epollfd, events, N_ANDROID_TIMERFDS, -1);
    if (nevents < 0) {
        return nevents;
    }

    int result = 0;
    for (int i = 0; i < nevents; i++) {
        uint32_t alarm_idx = events[i].data.u32;
        uint64_t unused;
        ssize_t err = read(fds[alarm_idx], &unused, sizeof(unused));
        if (err < 0 && errno != EAGAIN) {
            if (errno == ECANCELED) {
                //get time changed
            } else {
                return err;
            }
        } else {
           //....
        }
    }
}

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2026-04-21 01:29:32 +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
openvela-robot 429c0c0eec arch/armv7-a: unify switch context from software interrupt
Signed-off-by: chao.an <anchao@xiaomi.com>
2026-04-20 21:38:16 +08:00
openvela-robot 67d9073d3a Revert "mm_initialize.c: make sure the heapsize aligned with MM_MIN_CHUNK."
This reverts commit 0e226b3ecd6d8f9ef7daf9c7b1edff026cb28502.
2026-04-20 21:38:13 +08:00
openvela-robot f496aa9c53 ci: harmonize rust installation paths. 2026-04-20 21:38:10 +08:00
openvela-robot ad2068685f libc/machine: Implement ARM aeabi_xxx API called by clang
specified here:
https://developer.arm.com/documentation/ihi0043/latest

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:38:07 +08:00
openvela-robot d0e1329063 arch:xtensa: modify svcall to swint
Reason: xtensa svcall only have level-1 interrupt level.
Sush do not generate interrupt when up_irq_save.
Software int can generate interrupt when up_irq_save.

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2026-04-20 21:38:03 +08:00
openvela-robot a774f3c1ff fs/fatfs: support O_APPEND mode
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2026-04-20 21:37:57 +08:00
openvela-robot f361469a9d nuttx/pty:pty FIONBIO pass to pipe control
1. pass FIONBIO ioctl to pipe
2. resolve the return value error

Signed-off-by: fangzhenwei <fangzhenwei@xiaomi.com>
2026-04-20 21:37:54 +08:00
openvela-robot 157b51666a driver/uinput: add fix uinput Spelling mistakes
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2026-04-20 21:37:50 +08:00
openvela-robot c903eff772 arch/ceva: Replace OUTDIR with TOPDIR
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:37:45 +08:00
openvela-robot 93f45fe834 serial/pty: Remove the unused code related to CONFIG_PSEUDOTERM_FULLBLOCKS
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:37:42 +08:00
openvela-robot c62f0e4458 Remove the double blank line from source files
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:37:39 +08:00
openvela-robot e446cd6b4c boards/sim: Rename ARCHCPUFLAGS[XX] to ARCHC[XX]FLAGS
follow other board files usage

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:37:36 +08:00
openvela-robot 6c35bd7bb7 ci: add Rust compiler suite 2026-04-20 21:37:31 +08:00
openvela-robot 3b652139a8 Add CONFIG_NDEBUG Kconfig to control NDEBUG definition
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:37:27 +08:00
openvela-robot b7dd67bb75 LICENSE: document code found in arch: arm: am335x
Document the licenses for non Apache code found in the mentioned folder

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2026-04-20 21:37:23 +08:00
openvela-robot aa9ab7614b driver/uinput: Add cross core control function
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2026-04-20 21:37:17 +08:00
openvela-robot 95f815b97c risc-v: Rename up_fault to riscv_fault
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2026-04-20 21:37:06 +08:00
openvela-robot 048adf8784 board/sim: update uinput init & Kconfig
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2026-04-20 21:37:02 +08:00
openvela-robot 73ec3b6109 drivers/pipe: Don't use sched_[lock|unlock] to do protection
since the sched lock can't work in SMP context

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:36:58 +08:00
openvela-robot 82a0c0c7fb add cs35l41b power hibernate mode
update cs35l41b power hibernate and wake up

Signed-off-by: genghuihui <genghuihui@xiaomi.com>
2026-04-20 21:36:55 +08:00
openvela-robot f7367906c0 Remove duplicate linker script definitions
## Summary
A lot of linker scripts were listed twice, once for unix, once for windows.

This PR cleans up the logic so they're only listed once.

 ## Impact
Any opportunity to use a single source of truth and reduce lines of code is a win!

 ## Testing
CI will test all build
2026-04-20 21:36:50 +08:00
openvela-robot b4e07c389e libc/sim: Rename arch_setjmp[64].S to arch_setjmp_x86[_64].S
to follow other arch/x86 arch/x86_64 convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:36:46 +08:00
openvela-robot b4a69b8bd6 libdsp/lib_observer.c: separate angle observer from speed observer
They can be used completely independently, so they should'n be coupled.
For example, a sensored motor controller in speed control mode doesn't need an angle estimator.
2026-04-20 21:36:41 +08:00
openvela-robot 85bc97cec5 rpmsg_socket: fix kasan report error
==1598322==ERROR: AddressSanitizer: heap-use-after-free on address 0xf514f8a8 at pc 0x58ac3898 bp 0xd0b4d488 sp 0xd0b4d478
READ of size 4 at 0xf514f8a8 thread T0
    #0 0x58ac3897 in rpmsg_socket_pollnotify rpmsg/rpmsg_sockif.c:211
    #1 0x58ac512f in rpmsg_socket_ept_cb rpmsg/rpmsg_sockif.c:312
    #2 0x5787881c in rpmsg_virtio_rx_callback open-amp/lib/rpmsg/rpmsg_virtio.c:331
    #3 0x57886a67 in virtqueue_notification open-amp/lib/virtio/virtqueue.c:623
    #4 0x5786fb89 in rproc_virtio_notified open-amp/lib/remoteproc/remoteproc_virtio.c:340
    #5 0x5786bde3 in remoteproc_get_notification open-amp/lib/remoteproc/remoteproc.c:985
    #6 0x57755a50 in rptun_worker rptun/rptun.c:303
    #7 0x57755e51 in rptun_thread rptun/rptun.c:352
    #8 0x57730d4a in nxtask_start task/task_start.c:128
    #9 0xdeadbeee  (/memfd:pulseaudio (deleted)+0x15dbeee)

Signed-off-by: ligd <liguiding1@xiaomi.com>
2026-04-20 21:36:38 +08:00
openvela-robot 127912c674 Fix jlink-nuttx build with GCC 10.2
The packed-attribute on the tcb_info_s type was misplaced, which caused
incompatible memory layout between host and target.  According to
current GCC documentation:

> You may specify type attributes in an enum, struct or union type
> declaration or definition by placing them immediately after the struct,
> union or enum keyword.  You can also place them just past the closing
> curly brace of the definition, but this is less preferred because
> logically the type should be fully defined at the closing brace.

I also added jlink-nuttx.so to the .gitignore list and updated nxstyle
to ignore the camel case function names required by JLinkGDBServer.

Signed-off-by: Michael Jung <mijung@gmx.net>
2026-04-20 21:36:34 +08:00
openvela-robot 2a63566b24 power:governor: move governor declaration to include/nuttx/power
And add static const to g_pmgovernor

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2026-04-20 21:36:30 +08:00
openvela-robot cfa09ec134 arm/backtrace: fix the compile warning
Signed-off-by: chao.an <anchao@xiaomi.com>
2026-04-20 21:36:25 +08:00
openvela-robot 3ff5489e83 fatfs: fix hang becauseof errout without release lock
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2026-04-20 21:36:22 +08:00
openvela-robot 52498ed58d boards/k210: Add -mstrict-align to arch level flags since it don't support unaligned memory access
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2026-04-20 21:36:18 +08:00
openvela-robot 7ae5df6513 mm_memdump: fix messy code beacuse of backtrace is null
ap> memdump
[49631.086445] [ 9] [  INFO] [ap] Dump all used memory node info:
[49631.087043] [ 9] [  INFO] [ap]    PID        Size    Address Backtrace
[49631.087913] [ 9] [  INFO] [ap]      0          44 0x3c58db2c�he,TRU<w�g,Ԕ�[<$RU<0RU<�ĩ[<s'<'�f,J
[49631.089055] [ 9] [  INFO] [ap]      3          64 0x3c58db58 0x2c683ea6 0x2c67cb00 0x2c655ef4 0x2c65aa9c 0x2c65a9f8 0x2c669a22 0x2c67f7dc 0x000514a8
[49631.090686] [ 9] [  INFO] [ap]      0         448 0x3c58db98 0x2c683ea6
[49631.091502] [ 9] [  INFO] [ap]      0         256 0x3c58dd58 0x2c683ea6
[49631.092372] [ 9] [  INFO] [ap]      0          64 0x3c58de58 0x2c683ea6 0x2c67cb00 0x2c655ef4 0x000512a8 0x2c927062 0x2c300056

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2026-04-20 21:36:15 +08:00
openvela-robot a0e0cd8780 stm32/fdcan: use array indexes when accessing RX/TX FIFO 2026-04-20 21:36:10 +08:00
openvela-robot 0f15569412 libc/chdir:PWD should save absolute path
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2026-04-20 21:36:07 +08:00
openvela-robot 4aaddc729f arch: Add xxx_tcbinfo.c to SoC level Make.defs
Fix build break with CONFIG_DEBUG_TCBINFO enabled.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2026-04-20 21:36:03 +08:00
openvela-robot bebe7eb2bb rptun: add rptun dump support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2026-04-20 21:36:00 +08:00
openvela-robot a4c3bef50e net/rpmsg: fix the NULL pointer reference on nonblock accept
Signed-off-by: chao.an <anchao@xiaomi.com>
2026-04-20 21:35:56 +08:00
openvela-robot 69701f1964 fix: button : fix the bug of waking up poll waiting
during btn poll, check button state, if press event not taken, post it

Signed-off-by: xueyanhong <xueyanhong@xiaomi.com>
2026-04-20 21:35:53 +08:00
openvela-robot 0a0598fd98 net/tcp/monitor: do not migrate the state to close
1. remove the unnecessary interfaces tcp_close_monitor()

socket flags(s_flags) is a global state for net connection
remove the incorrect update for stop monitor

2. do not start the tcp monitor from duplicated psock

the tcp monitor has already registered in connect callback

------------------------------------------------------------
This patch also fix the telnet issue reported by:
https://github.com/apache/incubator-nuttx/pull/5434#issuecomment-1035600651

the orignal session fd is closed after dup, the connect state
has incorrectly migrated to close:

drivers/net/telnet.c:
 977 static int telnet_session(FAR struct telnet_session_s *session)
 ...
 1031   ret = psock_dup2(psock, &priv->td_psock);
 ...
 1082   nx_close(session->ts_sd);

Signed-off-by: chao.an <anchao@xiaomi.com>
2026-04-20 21:35:49 +08:00
openvela-robot c5d41885c4 fatfs: remove whitespace
fs/fatfs/fatfs_vfs.c:1366:1: error: Blank line contains whitespace

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2026-04-20 21:35:46 +08:00
openvela-robot d2d35c987f risc-v: Fix style issue in SoC's Make.defs
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2026-04-20 21:35:43 +08:00
openvela-robot e02bba6aaf modify smart pa gain:16.5dB
modify cs35l41b gain

Signed-off-by: genghuihui <genghuihui@xiaomi.com>
2026-04-20 21:35:40 +08:00
openvela-robot 54e186392a romfs: add FAR for all pointer and optimize some code
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2026-04-20 21:35:36 +08:00
openvela-robot 5794a618ac fatfs/rmdir: don't remove file
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2026-04-20 21:35:33 +08:00
openvela-robot 3b68a310c5 feature:audio: add return value in initialize function of the audio_comp
add return value in audio component driver
2026-04-20 21:35:30 +08:00
openvela-robot 2c5bc3fffb armv7-a/r: use flush/clean_all if size large than cache size
For cache flush/clean performance

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2026-04-20 21:35:27 +08:00
openvela-robot 4b18bd303c net/icmp: replace the common connect prologue
Signed-off-by: chao.an <anchao@xiaomi.com>
2026-04-20 21:35:22 +08:00
openvela-robot d53a75741a serial/pty:Don't assert EBUSY when pty unregister driver
Signed-off-by: fangzhenwei <fangzhenwei@xiaomi.com>
2026-04-20 21:35:18 +08:00