Commit Graph

56230 Commits

Author SHA1 Message Date
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
Xiang Xiao e777234714 Fix Error: implicit declaration of function 'enter_critical_section'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-03 11:26:44 +08:00
Xiang Xiao c5381c3eb2 Replace __attribute__((packed)) with [begin|end]_packed_struct
since the different compiler express the packed structure in the different way
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-03 10:20:38 +08:00
xuxin19 299ef6234f cmake(bugfix):add xtensa libc machine function build
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-11-03 09:16:24 +08:00
wangchen 90e2395d6c netlink:add tls cleanup protection to protect waitsem in netlink_get_response
Signed-off-by: wangchen <wangchen41@xiaomi.com>
2024-11-03 02:55:43 +08:00
wangchen 807c3a16e3 tcp:set NET_TCP_NPOLLWAITERS default value to 2 & add warning of different events having same event bit
Signed-off-by: wangchen <wangchen41@xiaomi.com>
2024-11-03 02:55:02 +08:00
chenrun1 1fce345481 libc/machine/CMakeLists: should alaways build arch_atomic.c
Summary:
  This issue comes from https://github.com/apache/nuttx/pull/14570. In the previous Atomic implementation https://github.com/apache/nuttx/pull/13044, we have removed the CONFIG_LIBC_ARCH_ATOMIC macro, so arch_atomic.c should always be compiled.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-11-03 02:33:03 +08:00
hujun5 2c0e5e872b pthread_cond remove csection
reason:
We decouple semcount from business logic by using an independent counting variable,
which allows us to remove critical sections in many cases.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-02 09:40:19 -03:00
Lup Yuen Lee 7f84a64109 CI: Enable builds for msys2, msvc, arm-08, arm-10, arm-13 for Complex PRs
This PR enables the CI Builds for msys2, msvc, arm-08, arm-10, arm-13 for Complex PRs. We disable the CI Builds for arm-01, arm-09, arm-11.

This will help to fix the recent breakage of builds: https://github.com/apache/nuttx/issues/14598
2024-11-02 09:25:12 -03:00
ouyangxiangzhen@xiaomi.com b5a215879c drivers: Fix the missing headers.
This commit added the missing headers for some drivers.

Signed-off-by: ouyangxiangzhen@xiaomi.com <ouyangxiangzhen@xiaomi.com>
2024-11-02 09:23:46 -03:00
xuxin19 6e81b1ed91 cmake:implement CMake build of xtensa arch
configure:cmake -B build -DBOARD_CONFIG=iss-hifi4:nsh
build:cmake --build build
run:xt-run build/nuttx

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-11-02 18:08:38 +08:00
zhangyuan29 b294fd3c8a libc/unistd: fixed tasking build issue
CC:  pthread/pthread_mutexattr_getrobust.c artc I800: creating archive libsched.a
CC:  unistd/lib_getopterrp.c ctc W505: ["unistd/lib_getoptargp.c" 48/29] implicit declaration of function "getoptvars"
ctc W577: ["unistd/lib_getoptargp.c" 48/39] calling a function without a prototype
ctc W524: ["unistd/lib_getoptargp.c" 48/27] conversion of integer to pointer at assignment
ctc E212: ["unistd/lib_getoptargp.c" 49/13] access to incomplete type
ctc W523: ["unistd/lib_getoptargp.c" 49/13] pointers to different types at return

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2024-11-01 23:03:23 +08:00
wangmingrong1 d13dc86f16 libxx/patch: Remove jira information and change-id
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-11-01 23:01:16 +08:00
yinshengkai e04853536d mm: fix tlsf compiler error
error: ‘nodesize’ undeclared (first use in this function)
  518 |       memset(mem, MM_FREE_MAGIC, nodesize);
tlsf/mm_tlsf.c:1288:10: warning: unused variable ‘newsize’ [-Wunused-variable]
 1288 |   size_t newsize;

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-11-01 11:44:14 -03:00
Eren Terzioglu 3796f56748 esp32[s2|s3]: Add I2C bitbang support 2024-11-01 11:41:46 -03:00
Eren Terzioglu 4afaef1a30 esp32[c3|c6|h2]: Add I2C bitbang supoort 2024-11-01 11:41:46 -03:00
Michal Lenc 9930a64de7 docs: add nxboot documentation entry
This commit adds documentation entry for NuttX based bootloader nxboot.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2024-11-01 11:32:44 -03:00
nuttxs 3818ce8268 sys/socket: use __attribute__((packed)) to avoid changes in
the size of struct sockaddr_storage due to struct alignment
2024-11-01 11:15:54 -03:00
yinshengkai a14b97b98b sim: add note related configuration
Ensure that CI can cover all note code

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-11-01 17:00:11 +08:00
ouyangxiangzhen 17c51c0667 userspace: Exclude nuttx/arch.h
This patch fixed userspace headers conflict. Architecture-related definition and API should not be exposed to users.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2024-11-01 16:59:37 +08:00
Alin Jerpelea b271507c9f AUTHORS: add Felipe Moura Oliveira
Felipe Moura Oliveira has submitted the ICLA and should be added to
the AUTHORS file

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-11-01 11:52:07 +08:00
dongjiuzhu1 47478e543d fs/shm: support shm_open with flags O_TRUNC
testcase:
https://fossies.org/linux/posixtestsuite/conformance/interfaces/shm_open/25-1.c

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-31 18:47:51 -03:00
cuiziwei d1e5b38b9b nuttx/semaphore: Move define CONFIG_SEM_PREALLOCHOLDERS to include/semaphore.h.
Move CONFIG_SEM_PREALLOCHOLDERS to include/semaphore.h to avoid undefined issues from occurring in other places as well.

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-31 18:37:53 +08:00
wangmingrong1 fbaace01d0 libc/arch_libc: replace all arch define to ARCH_LIBCFUN(x) style
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-31 18:11:16 +08:00
wangmingrong1 b22e8c7c1c libc: Modify the check length
We should not check the length of both strings at the same time.

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-31 18:11:16 +08:00
wangmingrong1 e466c637fc arch_lib.c: close kasan readcheck no return
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-31 18:11:16 +08:00
anjiahao 22e5c88479 libs/machine:strnlen need check return
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-31 18:11:16 +08:00
anjiahao 603c87977f libc/machine:Add prefixes to libc functions implemented by arch
kasan does not instrument the assembly function,
so it is checked in advance before calling.
If Kasan is not turned on, the speed and space will
be almost unchanged under compiler optimization.

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-31 18:11:16 +08:00
xuxin19 6ee73bc199 cmake(bugfix):fix libc sysclog CMake build typo
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-10-31 17:55:13 +08:00
xuxin19 1fb8a64299 cmake:add cmake host tool mkdeps incdir
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-10-31 17:55:13 +08:00
xuxin19 b8523280c2 cmake(bugfix):fix cxx build error on fastDDS X86_64
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-10-31 17:55:13 +08:00
xuxin19 8da0206a40 cmake:fix sim gc-section option build failed
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-10-31 17:55:13 +08:00
Jukka Laitinen da19d79656 arch/arm64/src/imx9/imx9_lpuart.c: Fix parity get in TCGETS
This is a partial revert / fix for regression from 44d1811ebb

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-10-31 17:54:22 +08:00
YAMAMOTO Takashi 94a13982eb DNS: Implement TCP fallback
* Implement DNS query over TCP

* Implement TCP fallback on responses with the TC bit set

References:

* https://www.ietf.org/rfc/rfc2181.txt

* http://www.dnsflagday.net/2020/

* https://www.netmeister.org/blog/dns-size.html
2024-10-31 17:18:20 +08:00
chenrun1 9a75519edc timer_create:Checks whether the signo provided by the user is valid
Summary:
  When the user sets an illegal signo, the error will only be known when timer_signotify is triggered during timeout.
By intercepting timer_create, we can directly locate the problem

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-10-31 17:16:12 +08:00
hujun5 9b1800d043 irq: force inline up_interrupt_context
reason:
Replace "inline" with "inline_function" for "up_interrupt_context" to ensure consistency with other arch

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-31 15:43:41 +08:00
wangmingrong1 2b2f530e7c mm: Complete remaining unused macros instead of memory to fill tags
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-31 15:35:26 +08:00
yintao 265978d16a net/rpmsg: Don't set POLLHUP if rpmsg channel has not been established
Signed-off-by: yintao <yintao@xiaomi.com>
2024-10-31 15:35:03 +08:00
zhanghongyu d5d9c501fa tcp_input: if tcp->req > recvreq, send ack only when state is TCP_ESTABLISHED
we will drop packet when tcp_close_eventhandler
is register and invoke by tcp_input. then we will always early return and
never stop, the peer will only close the connection if we send reset packet.

precondition:
close -> register tcp_close_eventhandler;

tcp_input -> tcp_callback(TCP_NEWDATA) -> devif_conn_event -> tcp_close_eventhandler
-> flags &= ~TCP_NEWDATA -> NOT entry tcp_data_event -> conn->recvreq NOT increase

old flow:
tcp_input -> tcp->seqno greater than conn->rcvseq -> tcp_send(TCP_ACK)

with this patch:
tcp_input -> tcp->seqno greater than conn->rcvseq -> !TCP_ESTABLISHED
-> case TCP_FIN_WAIT_1 -> dev->d_len greater than 0 -> tcp_reset

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-10-31 15:31:01 +08:00
haopengxiang 417f5f425b tools/mkdeps: increase MAX_BUFFER from 16384 to 65536
Signed-off-by: haopengxiang <haopengxiang@xiaomi.com>
2024-10-31 08:55:07 +08:00
Filipe Cavalcanti a15b82defa risc-v/esp32c3: add brownout to flash section 2024-10-31 08:53:12 +08:00
Filipe Cavalcanti 59a03d7ec3 risc-v/esp32c3: linker script fix for mcuboot + wifi usage
Revert "risc-v/esp32c3: linker script fix for mcuboot + wifi usage"

This reverts commit 3de5d2021b3a4c5fb506863f7b4763b57f038432.

Testing no brownout detector

Reenabled brownout
2024-10-31 08:53:12 +08:00
Ville Juven f36dff8105 riscv/syscall: Fix sched_note instrumentation for BUILD_KERNEL
The sched_note calls were missing from riscv_perform_syscall().
2024-10-30 23:18:07 +08:00
Karel Kočí b851916d76 libs/libc/obstack: fix allocated chunk overrun due to invalid limit
This primarily fixes allocated memory overrun due to invalidly
calculated limit of the chunk. The function here allocates chunk of size
that includes required header. The error was that size of the chunk was
invalidly again added when limit was being calculated. This was causing
memory overrun and issues especially with object growing (reallocation).

The secondary fix here is to the algorithm that rounds the required size
to the multiple of chunk size. In short chunk size must be reduced by
one to get the correct mask. The condition that was generating the mask
was also invalid because it must perform shift with at most one less
than number of bits (not bytes).
2024-10-30 11:53:18 -03:00
xuxin19 36b891c1e1 cmake(bugfix):fix fs cmake typo
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-10-30 22:14:40 +08:00