Commit graph

56274 commits

Author SHA1 Message Date
Alin Jerpelea
8d0d56f05a binfmt: 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>
2024-11-05 20:44:29 +08:00
huangcaihua
56f292fcfa Enable DEV_PIPE_NPOLLWAITERS default value 4 for adapte APP
Such as DBus, it maybe more than 1 thread to poll one dev, if that will make poll fail

Signed-off-by: huangcaihua <huangcaihua@xiaomi.com>
2024-11-05 20:10:49 +08:00
Peter van der Perk
faee89b966 net: fix inet #14634 regression
Define wasn't imported by netconfig.h move definitions
2024-11-05 18:36:02 +08:00
YAMAMOTO Takashi
8241a10ebc file_readv_compat/file_writev_compat: Fix partial success handling
The problem has been inherited from the original libc readv/writev
implementation. However, now it's exposed in more situations because
this implemenation is used to back read/write as well.

I expect this fixes the regressions observed on the Espressif CI.
https://github.com/apache/nuttx/pull/13498#issuecomment-2448031197

Note that, even with this fix, these "compat" readv/writev
implementations are still inheritedly broken. (E.g. consider that
a data boundary happens to match one of iovec boundaries) However,
this fix is enough for read/write, where iovcnt is always 1.
2024-11-05 16:57:05 +08:00
Felipe Moura
0fad2ee73f riscv/common/espressif: Fix spi slave driver
Fix defconfigs and documentation
2024-11-05 14:59:37 +08:00
ouyangxiangzhen
5450b50951 net/igc: Support Intel I226V.
This commit supported Intel I226V.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2024-11-05 14:03:02 +08:00
Tiago Medicci Serrano
f6a72ad0f4 libs/modlib: Load data using up_textheap_data_address
Some chips have different memory addressing spaces for the same
region. This is true, for instance, for ESP32-S3: the same memory
region can be accessed using the data bus or the data bus using
different address ranges. The instruction bus, however, requires
word-aligned access. That being said, it is recommended to use the
data bus while copying sections to the text heap to avoid any
illegal access using the instruction bus address which will be
later used to run the program.
2024-11-05 02:42:03 +08:00
Peter van der Perk
c371afc7f4 net: inet.h match inet_sockif.c definition
Fixes psock_socket: ERROR: socket address family unsupported: 2
When using the minimal CONFIG_NET configuration typically used for
SocketCAN

Update net/inet/inet.h

Co-authored-by: Xiang Xiao <xiaoxiang781216@gmail.com>

Update net/inet/inet.h

Co-authored-by: Xiang Xiao <xiaoxiang781216@gmail.com>
2024-11-05 01:58:45 +08:00
simbit18
3c4053a385 macos : fix “sed: -I or -i may not be used with stdin”
tools/Unix.mk
added $(call DELFILE, .config.backup)

tools/process-config.sh
sed-i -> sed -i.backup
2024-11-04 22:40:29 +08:00
wangmingrong1
3e605c1f46 clang/cmake: Fix clang cmake can't find libgcc, align with makefile
makefile:
ifeq ($(CONFIG_BUILTIN_TOOLCHAIN),y)
  COMPILER_RT_LIB = $(shell $(CC) $(ARCHCPUFLAGS) --print-libgcc-file-name)
  ifeq ($(CONFIG_ARCH_TOOLCHAIN_CLANG),y)
    ifeq ($(wildcard $(COMPILER_RT_LIB)),)
      # if "--print-libgcc-file-name" unable to find the correct libgcc PATH
      # then go ahead and try "--print-file-name"
      COMPILER_RT_LIB := $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name $(notdir $(COMPILER_RT_LIB))))
    endif
  endif
endif

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-11-04 22:39:40 +08:00
Alin Jerpelea
fdeaf5318c AUTHORS: add Yamamoto Takashi
Yamamoto Takashi has submitted the ICLA and should be added to
the AUTHORS file

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-11-04 22:29:22 +08:00
Alin Jerpelea
fff55022b2 AUTHORS: add Adam Feuer
Adam Feuer has submitted the ICLA and should be added to
the AUTHORS file

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-11-04 22:29:22 +08:00
Alin Jerpelea
dddff5e21c AUTHORS: add Yanfeng Liu
Yanfeng Liu has submitted the ICLA and should be added to
the AUTHORS file

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-11-04 22:29:22 +08:00
Alin Jerpelea
39a4730293 AUTHORS: add Mohammad Asif Siddiqui
Mohammad Asif Siddiqui has submitted the ICLA and should be added to
the AUTHORS file

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-11-04 22:29:22 +08:00
Alin Jerpelea
1475399437 AUTHORS: add Lup Yuen Lee
Lup Yuen Lee has submitted the ICLA and should be added to
the AUTHORS file

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-11-04 22:29:22 +08:00
Alin Jerpelea
654925fde4 AUTHORS: add Justin Mclean
Justin Mclean has submitted the ICLA and should be added to
the AUTHORS file

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-11-04 22:29:22 +08:00
Alin Jerpelea
b97fb0f66c AUTHORS: add Junping Du
Junping Du has submitted the ICLA and should be added to
the AUTHORS file

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-11-04 22:29:22 +08:00
Alin Jerpelea
1bdd7576b3 AUTHORS: add Flavio Paiva Junqueira
Flavio Paiva Junqueira has submitted the ICLA and should be added to
the AUTHORS file

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-11-04 22:29:22 +08:00
Alin Jerpelea
e24bae6e72 AUTHORS: add Duo Zhang
Duo Zhang has submitted the ICLA and should be added to
the AUTHORS file

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-11-04 22:29:22 +08:00
Alin Jerpelea
a9a4aa1343 AUTHORS: add Tiago Medicci Serrano
Tiago Medicci Serrano has submitted the ICLA and should be added to
the AUTHORS file

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-11-04 22:29:22 +08:00
chenxiaoyi
72f1315189 sched: add header irq.h to exit.c
Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
2024-11-04 11:07:40 -03:00
zhanghongyu
082bc17ab0 netinet/if_ether.h: move #define ETH_XXX into if_ether.h
consistent with other operating systems

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-11-04 21:14:31 +08:00
xuxin19
ba56c6c102 cmake(bugfix):make sure the extra_lib only added once
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-11-04 18:19:15 +08:00
Kian Karas
832a76542f net/netlink: improve comments 2024-11-04 18:18:28 +08:00
Kian Karas
105dd04ee5 net/netlink: fix netlink poll return value on success
Make sure the return value is zero on success - as described in the
documentation of the function.

It doesn't look like the "error" affected any code.
2024-11-04 18:18:28 +08:00
Kian Karas
92f001ee0c sched/wqueue: improve comments 2024-11-04 18:18:04 +08:00
Kian Karas
fa841237dc sched/wqueue: fix work_notifier_setup() false failure
Be consistent with the datatype used for the 'key'. As the API in
in the .h file uses int, I chose to replace uint32_t with int
everywhere.

This change ensures that work_notifier_setup() will not return a
negative value indicating error to the caller, when in fact the
notifier was correctly setup. This would happen when
work_notifier_setup() had been called 0x8000000 times, and that
many keys allocated.
2024-11-04 18:18:04 +08:00
ligd
561e1fc879 x86_64: fix compile warning
In function ‘void* std::__1::__libcpp_operator_new(_Args ...) [with _Args = {long unsigned int}]’,
    inlined from ‘void* std::__1::__libcpp_allocate(size_t, size_t)’ at /home/ligd/platform/trunk/nuttx/include/libcxx/new:294:31,
    inlined from ‘_Tp* std::__1::allocator<_Tp>::allocate(size_t) [with _Tp = char]’ at /home/ligd/platform/trunk/nuttx/include/libcxx/__memory/allocator.h:114:62,
    inlined from ‘constexpr std::__1::__allocation_result<typename std::__1::allocator_traits<_Alloc>::pointer> std::__1::__allocate_at_least(_Alloc&, size_t) [with _Alloc = allocator<char>]’ at /home/ligd/platform/trunk/nuttx/include/libcxx/__memory/allocate_at_least.h:55:27,
    inlined from ‘void std::__1::basic_string<_CharT, _Traits, _Allocator>::__grow_by_and_replace(size_type, size_type, size_type, size_type, size_type, size_type, const value_type*) [with _CharT = char; _Traits = std::__1::char_traits<char>; _Allocator = std::__1::allocator<char>]’ at /home/ligd/platform/trunk/nuttx/include/libcxx/string:2325:49,
    inlined from ‘std::__1::basic_string<_CharT, _Traits, _Allocator>& std::__1::basic_string<_CharT, _Traits, _Allocator>::__assign_external(const value_type*, size_type) [with _CharT = char; _Traits = std::__1::char_traits<char>; _Allocator = std::__1::allocator<char>]’ at /home/ligd/platform/trunk/nuttx/include/libcxx/string:2431:26,
    inlined from ‘std::__1::basic_string<_CharT, _Traits, _Allocator>& std::__1::basic_string<_CharT, _Traits, _Allocator>::assign(const value_type*, size_type) [with _CharT = char; _Traits = std::__1::char_traits<char>; _Allocator = std::__1::allocator<char>]’ at /home/ligd/platform/trunk/nuttx/include/libcxx/string:2444:35:
/home/ligd/platform/trunk/nuttx/include/libcxx/new:270:24: warning: argument 1 value ‘18446744073709551599’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
  270 |   return ::operator new(__args...);

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-11-04 18:06:09 +08:00
hujun5
76d2a9443b sched/sched: change [FIRST|LAST]_ASSIGNED_STATE to [FIRST|LAST]_READY_TO_RUN_STATE in nxsched_set_affinity
reason:
In smp, It's possible that in a scenario where CONFIG_SMP_DEFAULT_CPUSET is set to 1,
when taskA is created with a relatively low priority,
it gets added to the g_readytorun queue with an affinity of 0x1.
Meanwhile, CPUs 1~n are in an idle state.
Subsequently, when we attempt to change the affinity property of taskA using nxsched_set_affinity,
the scheduling mechanism might not be triggered due to the lack of a proper condition check.
This can result in taskA remaining unscheduled and therefore unable to run.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-04 17:19:59 +08:00
Xiang Xiao
a96a4de19a timers: Replace DEBUGASSERT with the error code
fix the issue report here:
https://lists.apache.org/thread/sys37yf63rq501fd1v8y3zyh6vk10v1d
when driver no support for ops, should not panic, prefer errno.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-11-04 10:05:52 +01:00
ligd
91b228fcdd arm64: fix compile failed when build ELF apps
aarch64-none-elf-gcc -c -D_LDBL_EQ_DBL -fno-common -Wall -Wstrict-prototypes -Wshadow -Wundef -Werror -Wno-attributes -Wno-unknown-pragmas -Wno-psabi "-O3" -fno-strict-aliasing -fno-omit-frame-pointer -fno-optimize-sibling-calls -fstack-protector-all -fsanitize=kernel-address --param asan-globals=1 -ffunction-sections -fdata-sections "-g3" -mcpu=cortex-a53 -isystem /home/ligd/platform/trunk/nuttx/include -D__NuttX__  -pipe -I /home/ligd/platform/trunk/apps/crypto/mbedtls/include -I /home/ligd/platform/trunk/apps/crypto/mbedtls/mbedtls/include -I /home/ligd/platform/trunk/apps/crypto/openssl_mbedtls_wrapper/include -I /home/ligd/platform/trunk/apps/external/android/frameworks/native/libs/binder/include_rpc_unstable -I /home/ligd/platform/trunk/apps/external/android/frameworks/native/libs/binder/ndk/include_ndk -I /home/ligd/platform/trunk/apps/external/android/frameworks/native/libs/binder/ndk/include_platform -I /home/ligd/platform/trunk/apps/external/android/system/chre/chre/chre_api/include/chre_api -DCHRE_MESSAGE_TO_HOST_MAX_SIZE=2048 -I /home/ligd/platform/trunk/apps/external/android/system/core/libcutils/include -I /home/ligd/platform/trunk/apps/frameworks/graphics/uikit/include -I /home/ligd/platform/trunk/apps/frameworks/runtimes/feature/include -I /home/ligd/platform/trunk/apps/frameworks/runtimes/feature/src -I /home/ligd/platform/trunk/apps/frameworks/security/include -I /home/ligd/platform/trunk/apps/frameworks/system/dfx/include -I /home/ligd/platform/trunk/apps/frameworks/system/topics/include -I /home/ligd/platform/trunk/apps/frameworks/system/utils/include -I /home/ligd/platform/trunk/apps/graphics/lvgl -I /home/ligd/platform/trunk/apps/graphics/lvgl/lvgl -I "/home/ligd/platform/trunk/apps/system/argtable3/argtable3/src" -I /home/ligd/platform/trunk/apps/system/libuv/libuv/include -DUV_HANDLE_BACKTRACE=CONFIG_LIBUV_HANDLE_BACKTRACE -I /home/ligd/platform/trunk/apps/system/uorb/ -I /home/ligd/platform/trunk/nuttx/arch/arm64/src/board/include -I /home/ligd/platform/trunk/nuttx/arch/arm64/src/chip -I /home/ligd/platform/trunk/apps/vendor/bes/drivers/best1600_ep/miwear_drivers/display -I /home/ligd/platform/trunk/apps/vendor/bes/drivers/best1600_ep/miwear_drivers/boards -I /home/ligd/platform/trunk/apps/vendor/bes/drivers/best1600_ep/miwear_drivers/include -I "/home/ligd/platform/trunk/apps/include" -fvisibility=hidden -mlong-calls    modprint.c -o  modprint.c.home.ligd.platform.trunk.apps.examples.sotest.modprint.o

aarch64-none-elf-gcc: error: unrecognized command-line option '-mlong-calls'

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-11-04 16:24:29 +08:00
Lup Yuen Lee
38fbb4e286 CI: Check out the correct branch of nuttx repo when compiling nuttx-apps
When compiling the Release Branch of `nuttx-apps`, our CI Workflow `build.yml` checks out the Master Branch of `nuttx` repo, which is incorrect. This happens due to a typo in `build.yml`: https://github.com/apache/nuttx/issues/14513

This PR fixes the typo in `build.yml` to checkout the correct branch of `nuttx` repo.
2024-11-04 12:51:56 +08:00
Matteo Golin
f9a2dc50b1 Created documentation page under contribution guidelines about the NuttX release process, copied from Alin Jerpelea's gist documentation. 2024-11-04 12:47:40 +08:00
Matteo Golin
bcebcacd90 rp2040 docs: Updated all RP2040 documentation pages to use the 2.0.0
version of the Pico SDK in their install instructions. All information
in the board README.txt files are now moved into the RST files to help
with the removal of the old READMEs.
2024-11-04 12:44:47 +08:00
hujun5
fa25b2ea4a fix regression caused by remove sync pause
reason:
If we need to handle a tcb that is running on another CPU,
we need to process it through the smpcall method.

This commit fixes the regression from https://github.com/apache/nuttx/pull/13863
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-04 11:05:20 +08:00
Lup Yuen Lee
da4f4e550d CI: Disable the CI Build on push to master branch
Due to the [recent cost-cutting](https://github.com/apache/nuttx/issues/14376), we are no longer running PR Merge Jobs in the `nuttx` and `nuttx-apps` repos. For this to happen, I am now running a script on my computer that will cancel any PR Merge Jobs that appear: [kill-push-master.sh](https://github.com/lupyuen/nuttx-release/blob/main/kill-push-master.sh)

This PR disables PR Merge Jobs permanently, so that we no longer need to run the script. This prevents our CI Charges from over-running, in case the script fails to operate properly.
2024-11-04 09:32:59 +08:00
Xiang Xiao
11960fd8e7 libc/mtdoutstream: Fix the in insufficient erase in byte write case
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-04 08:37:31 +08:00
Xiang Xiao
cccc413cb9 libc/mtdoutstream: Remove the redundant check and compute
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-04 08:37:31 +08:00
Xiang Xiao
1e343a884b libc/mtdoutstream: Replace stream->geo.erasesize with erasesize
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-04 08:37:31 +08:00
Xiang Xiao
fa57289d68 libc/blkoutstream: Zero the cache to avoid random data
and skip zero cache in lib_mtdoutstream_open since it's aleady done ih mtdoutstream_puts

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-04 08:37:31 +08:00
Xiang Xiao
00529f1626 libc/blkoutstream: Remove the redundant check and compute
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-04 08:37:31 +08:00
Xiang Xiao
9f1af300cb libc/blkoutstream: Replace stream->geo.geo_sectorsize with sectorsize
and sblock with sector to make the code more readable.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-04 08:37:31 +08:00
Xiang Xiao
bce5dee0da Fix error: implicit declaration of function 'up_mdelay'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-03 21:08:50 +08:00
Xiang Xiao
9882e0e9c3 fs: Fix mtd/sector512.c:554:19: error: incomplete definition of type 'struct partition_info_s'
by moving geometry and partition_info_s to include/fs/ioctl.h

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-03 21:08:50 +08:00
raiden00pl
6ba8c1e9f9 cmake: don't include syslog files if CONFIG_SYSLOG=n
don't include syslog files if CONFIG_SYSLOG=n
2024-11-03 20:54:49 +08:00
raiden00pl
48a327d0ed .github/labeler.yml: add missing drivers label
add missing drivers label for labeler.yml
2024-11-03 20:54:39 +08:00
raiden00pl
cd4e53c28a sched/misc/assert.c: don't compile dump_task logic if CONFIG_DEBUG_ALERT=n
Don't compile dump_task logic if CONFIG_DEBUG_ALERT=n.
With _alert() disabled this logic does nothing, but the compiler
is not smart enough to optimize this code.

on minimal stm32f3 configuration it saves 396B of flash.
2024-11-03 19:35:36 +08:00
Saurav Pal
4e53ee4486 fs/mnemofs: Fix open and rmdir return value and seek out of bounds.
- Update open return value to ENOTDIR when ancestor is a file.
- Update rmdir return value to ENOTDIR when path is not a directory.
- Better logs for file and dir operations.

Signed-off-by: Saurav Pal <resyfer.dev@gmail.com>
2024-11-03 16:01:58 +08:00
hujun5
a1bb967941 remove nxsched_lock_irq/nxsched_unlock_irq
reason:
nxsched_lock_irq has the same functionality as sched_lock

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-03 16:00:17 +08:00
xuxin19
1bb01d40fd cmake(build):add the specified armclang compiler to the cmake Toolchain file
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-11-03 14:06:40 +08:00