Commit Graph

170 Commits

Author SHA1 Message Date
openvela-robot 5d8ad057b5 romfs:extend romfs to enable write part1
change romfs_cachenode to find all headers

Signed-off-by: guohao15 <guohao15@xiaomi.com>
2026-04-21 01:04:26 +08:00
openvela-robot 3bc4eb831f build.sh:export x86_64 gcc prebuilt toolchain
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2026-04-21 01:04:21 +08:00
openvela-robot ce2995dd23 libc: rename lib_execinfo.c to lib_backtrace.c
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2026-04-21 01:04:12 +08:00
openvela-robot 5b8a74d3c0 sim: fix sim smp boot regression
This commit fixes the regression from https://github.com/apache/nuttx/pull/13716

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2026-04-21 01:04:04 +08:00
openvela-robot 2557f82241 arch/x86_64: Fix up_timer_start
Fix according to up_alarm_start.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2026-04-21 01:03:57 +08:00
openvela-robot b1182a2fc4 fs_truncate: provide inotify call for truncate
IN_MODIFY event should occur on file modification, which includes
truncate. This is consistent with the inotify usage on Linux.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2026-04-21 01:03:52 +08:00
openvela-robot 33d6e10fed arch/x86_64: cache convert all asm() to __asm__()
asm() is not supported by -std=c99, __asm__() is more portable

Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2026-04-21 01:03:45 +08:00
openvela-robot fd862200b2 arch: support customized up_cpu_index() in AMP mode
Some app with same code runs on different cores in AMP mode,
need the physical core on which the function is called.

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2026-04-21 01:03:39 +08:00
openvela-robot 60a4b3ad5e x86_64:Fix ld error.
LD: nuttx.elf
ld:in function `std::__1::ios_base::imbue(std::__1::locale const&)':
nuttx/libs/libxx/libcxx/src/ios.cpp:129: undefined reference to `_Unwind_Resume'

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2026-04-21 01:03:33 +08:00
openvela-robot 89e0d5b890 net/local: release conn using dq_for_every_safe
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2026-04-21 01:03:27 +08:00
openvela-robot 4e4feff38c sched/sem_rw: convert read-lock to write-lock when self already holds a write-lock
If the write lock is already held by oneself and sine the write
lock can be recursively held, so, this operation can be converted to a write
lock to avoid deadlock.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2026-04-21 01:03:22 +08:00
openvela-robot b121655bc2 sched: remove param in nxsched_remove_readytorun
after
   text    data     bss     dec     hex filename
 269732   51065   63335  384132   5dc84 nuttx

before
   text    data     bss     dec     hex filename
269784   51065   63335  384184   5dcb8 nuttx

size -50

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2026-04-21 01:03:16 +08:00
openvela-robot 848ca2ddee arch/arm64: Modify the method for obtaining the CPU frequency
Summary:
1、cntfrq_el0 is used to store the timer frequency, which may
   be different from the CPU frequency.
2、Do not use up_perf interface for SMP.

Signed-off-by: wangming9 <wangming9@xiaomi.com>
2026-04-21 01:03:10 +08:00
openvela-robot fc454b4e95 drivers/sensors/gnss: check invalid nmea statement to avoid parsebuffer overflow
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2026-04-21 01:03:04 +08:00
openvela-robot 30760253ef arch/x86_64:Add allsymbol functionality
Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2026-04-21 01:02:58 +08:00
openvela-robot 21a8428c45 nuttx: support android build of fstest
Signed-off-by: yintao <yintao@xiaomi.com>
2026-04-21 01:02:53 +08:00
openvela-robot 2931eaa8d8 arch/x86_64: idle convert all asm() to __asm__()
Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2026-04-21 01:02:47 +08:00
openvela-robot bc90a2b22e xtensa: sync with github and resolve conflicts
Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
2026-04-21 01:02:41 +08:00
openvela-robot 1c4c94724b arch: adjust gcov configuration name
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2026-04-21 01:02:29 +08:00
openvela-robot 7a29521117 libxx:fix build error when enable LIBCXXTOOLCHAIN
Summary:
  P:➜  nuttx git:(4cec713dbf) LC_ALL=C make
CC:  chip/stm32_gpio.c chip/stm32_gpio.c:41:11: note: '#pragma message: CONFIG_STM32_USE_LEGACY_PINMAP will be deprecated migrate board.h see tools/stm32_pinmap_tool.py'
   41 | #  pragma message "CONFIG_STM32_USE_LEGACY_PINMAP will be deprecated migrate board.h see tools/stm32_pinmap_tool.py"
      |           ^~~~~~~
CXX:  libcxxmini/libxx_new.cxx libcxxmini/libxx_new.cxx:72:11: error: redefinition of 'void* operator new(std::size_t, void*)'
   72 | FAR void *operator new(std::size_t nbytes, FAR void *ptr)
      |           ^~~~~~~~
In file included from /usr/include/newlib/c++/13.2.1/bits/atomic_base.h:36,
                 from /usr/include/newlib/c++/13.2.1/atomic:41,
                 from /home/leduc/wdc_workspace/src/autre/nuttx_dev/nuttx/include/nuttx/atomic.h:32,
                 from /home/leduc/wdc_workspace/src/autre/nuttx_dev/nuttx/include/nuttx/fs/fs.h:38,
                 from /home/leduc/wdc_workspace/src/autre/nuttx_dev/nuttx/include/nuttx/lib/lib.h:30,
                 from libcxxmini/libxx_new.cxx:29:
/usr/include/newlib/c++/13.2.1/new:174:33: note: 'void* operator new(std::size_t, void*)' previously defined here
  174 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
      |                                 ^~~~~~~~
make[1]: *** [Makefile:69: libxx_new.o] Error 1
make: *** [tools/LibTargets.mk:216: libs/libxx/libxx.a] Error 2

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2026-04-21 01:02:24 +08:00
openvela-robot bc3300de60 misc/rpmsgdev: fix block mode read/write bug in rpmsgdev
Rpmsg dev server always open the real char device with nonblock mode,
so let client try to read/wrtie the read device every read/write
operation.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-04-21 01:02:17 +08:00
openvela-robot 69346bfa5e nuttx/fs:Rename node with inode.
In ./fs/inode directory, the variable name FAR struct inode *node is named inconsistently, with some using node and others using inode. To facilitate understanding, we will standardize the naming to FAR struct inode *inode.

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2026-04-21 01:02:11 +08:00
openvela-robot 58ba09ba43 Fix to compile parameters not taking effect When cmake version is greater than 3.18
https://cmake.org/cmake/help/latest/command/set_source_files_properties.html

Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2026-04-21 01:02:05 +08:00
openvela-robot a2d655318a fdt: add additional fdt parsing utilities.
merge fdt from NuttX community

Signed-off-by: ligd <liguiding1@xiaomi.com>
2026-04-21 01:01:59 +08:00
openvela-robot 8de5286641 arch/x86_64: add support for thread_local
Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2026-04-21 01:01:54 +08:00
openvela-robot 5b7538a6c8 add sched note for littlefs/romfs/rpmsgfs/yaffs in cmake build
Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2026-04-21 01:01:48 +08:00
openvela-robot 1482e60cde arch/x86_64: Resolve weak symbol compilation relocation errors
Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2026-04-21 01:01:42 +08:00
openvela-robot e8591d9e23 pthread: delete pthread tls flag
Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2026-04-21 01:01:36 +08:00
openvela-robot 2e05d4a9b9 sched: export sched_getcpu API in AMP mode
Some app with same code runs on different cores in AMP mode,
need known physical core id on which the function is called.

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2026-04-21 01:01:30 +08:00
openvela-robot e44133cd68 rptun: minor nxstyle fix, sync with community
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-04-21 01:01:21 +08:00
openvela-robot 0d22531d60 misc/dev_mem: fix compile error in aarch64
misc/dev_mem.c:203:24: error: comparison between two arrays [-Werror=array-compare]
  203 |   bool merge = (_edata == _sbss);
      |                        ^~
misc/dev_mem.c:203:24: note: use '&_edata[0] == &_sbss[0]' to compare the addresses

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-04-21 01:01:13 +08:00
openvela-robot 200b48bf35 procfs/cpuinfo: Zero copylen in cpuinfo_read
to avoid return the negative number

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-21 01:01:06 +08:00
openvela-robot 1b12410f95 mq: correct inode release in mq_inode_release()
Signed-off-by: ligd <liguiding1@xiaomi.com>
2026-04-21 01:01:01 +08:00
openvela-robot 923523ecec tools/gdb: support string type in offset_of
1. Support any type of value as pointer address in container_of
2. Support string as type in offset_of
3. Make sure type is a pointer in container_of, and not a pointer in
   offset_of

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2026-04-21 01:00:55 +08:00
openvela-robot bba9037914 usensor.c:fix container_of member error.
Signed-off-by: likun17 <likun17@xiaomi.com>
2026-04-21 01:00:47 +08:00
openvela-robot 793cd570f8 tools/gdb: decode backtrace of crashlog
Now crash log can be directly pass to addr2line tool to get all backtraces.

E.g.
(gdb) addr2line -f crash.log -p 485
Address              Symbol                           Source

Backtrace of 485
0x402cc0ac           <up_switch_context+84>           /home/work/ssd1/workspace/MiRTOS-specific product-Stable-Build/nuttx/include/arch/syscall.h:179
0x40291276           <nxsig_timedwait+386>            signal/sig_timedwait.c:365
0x4028fc7e           <nxsig_nanosleep+106>            signal/sig_nanosleep.c:141
0x4028fdba           <clock_nanosleep+26>             signal/sig_nanosleep.c:333
0x402c3736           <usleep+62>                      unistd/lib_usleep.c:108
0x415018c0           <cs2p2p_mSecSleep+24>            Src/PPPP_Common.c:1139
0x414fabde           <cs2p2p_Run_send_DRW+258>        Src/PPPP_API.c:5577
0x414fac62           <cs2p2p_PPPP_thread_send_DRW+18> Src/PPPP_API.c:5616
0x40446f62           <pthread_startup+10>             pthread/pthread_create.c:59
0x41094f4a           <pthread_start+106>              pthread/pthread_create.c:139

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2026-04-21 01:00:41 +08:00
openvela-robot 61f982bb25 fs/semaphore: fix a minor issue with goto label
Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2026-04-21 01:00:29 +08:00
openvela-robot 0dc07fb6b1 tools/gdb: imporve nxgcore speed
Let GDB to read from ELF for readonly data.
Disable this feature by nxgcore --no-trust-readonly.

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2026-04-21 01:00:18 +08:00
openvela-robot d2ce98f28b fs_open:Adjust the definition of the open path
Summary:
  Reference https://man7.org/linux/man-pages/man2/open.2.html
       EISDIR pathname refers to a directory and the access requested
              involved writing (that is, O_WRONLY or O_RDWR is set).

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2026-04-21 01:00:11 +08:00
openvela-robot b09d89a476 risc-v: Support customize idle loop
Support customize idle loop by CONFIG_ARCH_IDLE_CUSTOM
as other architectures.

Then user can provide their own `up_idle()` function
with CONFIG_ARCH_IDLE_CUSTOM enabled.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2026-04-21 01:00:05 +08:00
openvela-robot 8d3b73559f timers: add goldfish timer support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2026-04-21 00:59:57 +08:00
openvela-robot f506bd34c8 sched: synchronize with community code and use nxsched_remove_self.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2026-04-21 00:59:51 +08:00
openvela-robot 5bb8c15749 arch: fix the sched parameter update when exiting
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2026-04-21 00:59:45 +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
openvela-robot 57e00d628f arch/arm64/src/imx9/imx9_usbdev.c: Clean up cache operations, add DEBUGASSERTS
Correct some of the cache operations:

- EP0 request length was handled incorrectly
- Received data cache invalidate was exceeding the received buffer
- writedtd is also called with no data (EP0 ACK/NACK). Don't touch cache in that case.

Fix trip wire handling to conform with the IMX93 reference manual

Also add DEBUGASSERTS for future to check the validity of pointers and sizes

Co-authored-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2026-04-21 00:59:15 +08:00
openvela-robot 2f6c45cb01 arch/intel64: optimise context switch
We save interrupted TCB state on tcb->xcp.regs not interrupt stack now
which allows us to remove x86_64_savestate() from up_switch_context()
and other places.

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2026-04-21 00:59:09 +08:00
openvela-robot 3d928157d7 build.yml: Undo debug print
Undo the unintended changes for debug printing. I edited the wrong repo, I am deeply sorry about this.
2026-04-21 00:59:01 +08:00
openvela-robot f2d0966e9b arch/intel64/intel64_head.S: align XCP region
align XCP region to match regs allocation in up_initial_state()

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2026-04-21 00:58:55 +08:00
Alin Jerpelea e2b1af69be libs/libc: 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:58:50 +08:00
openvela-robot bcd70711f4 pm: pm_idle add support for SMP
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2026-04-21 00:58:46 +08:00