Commit Graph

59729 Commits

Author SHA1 Message Date
zhanghongyu e2525f61b1 net/pkt: add nonblock mode and send buffered support
Supports more flexible configuration of sending methods

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2025-12-10 23:44:14 +08:00
Zhe Weng 6fd74f817d net/pkt: Support filtering protocol in AF_PACKET
Ref: https://man7.org/linux/man-pages/man7/packet.7.html

1. For `socket(AF_PACKET, int socket_type, int protocol)`: When `protocol` is set to `htons(ETH_P_ALL)`, then all protocols are received. If `protocol` is set to zero, no packets are received.
2. For `bind`: `bind` can optionally be called with a nonzero `sll_protocol` to start receiving packets for the protocols specified.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2025-12-10 23:44:14 +08:00
daichuan ba54829239 include: modify for support socat, so need add some macro same as linux
add the necessary definitions to the Header File

Signed-off-by: daichuan<daichuan@xiaomi.com>
2025-12-10 23:44:14 +08:00
gaohedong 09e12a58d3 net/pkt: add poll function for pkt socket
add poll function for pkt socket

Signed-off-by: gaohedong <gaohedong@xiaomi.com>
2025-12-10 23:44:14 +08:00
gaohedong 9e0852c6a4 net/pkt: delete the read-back mechanism in pkt stack
When app send a pkt-packet, then it will read back it and case some problem. Connection should not read back the message sent by itself.

Signed-off-by: gaohedong <gaohedong@xiaomi.com>
2025-12-10 23:44:14 +08:00
gaohedong 81f42cb2cf net/ethernet: add timestamp for socket packet
add timestamp for socket packet

Signed-off-by: gaohedong <gaohedong@xiaomi.com>
2025-12-10 23:44:14 +08:00
yangsong8 3949a87d36 boards/defconfig: enable CONFIG_SCHED_CHILD_STATUS
ADBD_SHELL_SERVICE depends on SCHED_CHILD_STATUS

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-12-10 23:42:07 +08:00
dependabot[bot] dd5f562b58 build(deps): bump fonttools from 4.54.1 to 4.60.2 in /tools/pynuttx
Bumps [fonttools](https://github.com/fonttools/fonttools) from 4.54.1 to 4.60.2.
- [Release notes](https://github.com/fonttools/fonttools/releases)
- [Changelog](https://github.com/fonttools/fonttools/blob/main/NEWS.rst)
- [Commits](https://github.com/fonttools/fonttools/compare/4.54.1...4.60.2)

---
updated-dependencies:
- dependency-name: fonttools
  dependency-version: 4.60.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-10 22:43:44 +08:00
simbit18 5dfc4559a5 Documentation/Pipfile.lock: bump urllib3 from 2.2.3 to 2.6.0
Build Documentation / build-html (push) Has been cancelled
- bump urllib3 from 2.2.3 to 2.6.0

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-12-10 19:23:50 +08:00
simbit18 145db20bf4 workflows/doc.yml: bump python from 3.8 to 3.10
- bump python from 3.8 to 3.10

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-12-10 19:23:50 +08:00
Yanfeng Liu c38042941f arch/crt0.c: revert entry _start
This reverts crt0.c entry name to _start to fix LTO issue/17443,
needs apps/ side pull/3235.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2025-12-10 19:06:04 +08:00
Jiri Vlasak af205ebd39 arm/kinetis: Fix warning
8th bit of SCGC3 is NFC, see K60 Reference Manual
(K60P144M150SF3RM.pdf, 12.2.11).

Signed-off-by: Jiri Vlasak <jiri.vlasak@posteo.net>
2025-12-10 11:40:36 +01:00
Jiri Vlasak 5090572b2a arm/kinetis: K60 has SPI1, SPI2, improve errors
K60 family has support for SPI1 and SPI2.

Signed-off-by: Jiri Vlasak <jiri.vlasak@posteo.net>
2025-12-10 11:40:36 +01:00
Jiri Vlasak 207767d0d6 arm/kinetis: Add FTM3 PIN defines, K60 has FTM3
Found in K60P144M150SF3RM.pdf, used for MK60FN1M0VLQ12.

Signed-off-by: Jiri Vlasak <jiri.vlasak@posteo.net>
2025-12-10 11:40:36 +01:00
Miloš Pokorný b404e30332 arch/arm/kinetis: Add option to use RTS as RS-485 transmit enable
Support RS-485 on UART peripheral.

Signed-off-by: Jiri Vlasak <jiri.vlasak@posteo.net>
2025-12-10 11:40:36 +01:00
wangzhi16 ddad4fa16e drivers/note: Optimize code logic.
Remove duplicate code

Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
2025-12-10 14:58:29 +08:00
liwenxiang1 0750e417c9 drivers/note:Fix the crash issue when enabling trace dump
fix dereference of null pointer.

Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2025-12-10 14:58:29 +08:00
wangzhi16 a340cb59d9 drivers/note: fix compile error.
note/note_driver.c:2440:45: error: implicit declaration of function 'note_find_taskname'; did you mean 'note_get_taskname'? [-Werror=implicit-function-declaration]
 2440 |       FAR struct note_taskname_info_s *ti = note_find_taskname(pid);
      |                                             ^~~~~~~~~~~~~~~~~~
      |                                             note_get_taskname
note/note_driver.c:2440:45: error: initialization of 'struct note_taskname_info_s *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
note/note_driver.c:2444:26: error: invalid use of undefined type 'struct note_taskname_info_s'
 2444 |           strlcpy(buf, ti->name, len);
      |                          ^~

Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
2025-12-10 14:58:29 +08:00
yukangzhi d5b254fabb drivers/note/note_driver: Modify the macro control scope
The function sched_note_add should not be in the code
section of #ifdef CONFIG_SCHED_INSTRUMENTATION_SWITCH

Signed-off-by: yukangzhi <yukangzhi@xiaomi.com>
2025-12-10 14:58:29 +08:00
wangzhi16 9e20b41f19 note/drivers: Get taskname more safely.
When tcb may has been released in caller, the return pointer to tcb->name is dangling pointer. So add a buffer in caller, even if tcb is released, buffer is still valid.

Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
2025-12-10 14:58:29 +08:00
simbit18 86a07ffac1 drivers/mmcsd: Aligned Cmake with Make
Add:
- sdio.c #5155

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-12-09 14:25:40 -03:00
yangsong8 130b2154aa binfmt/elf: fix issue of file not closing after being opened.
When opening the file succeeds but reading the file fails in
modlib_initialize, this will result in the open file not be closed.

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-12-09 22:24:57 +08:00
yangsong8 7907a5b1c3 driver/usbhost: Support obtaining USB3.0 device descriptors
usbhost supports USB 3.0 device descriptors.

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-12-09 08:57:28 -05:00
lipengfei28 84d99b7329 arch/arm64: fix create page table err
arm64 only PA_BITS=52 level 0 can be used as BlockDescriptors

Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2025-12-09 20:25:02 +08:00
zhang hu 1e63cf1c30 Revert: "drivers/i3c: remove extra i3c_dev_register, do_daa has created them"
Build Documentation / build-html (push) Has been cancelled
This reverts commit 694750e8af.

Signed-off-by: octopushu <octopushu@163.com>
2025-12-09 08:23:46 -03:00
chenxiaoyi f107b3f5d5 stdio: disable fortify of snprintf/sprintf for clang
clang does not have builtin function `__builtin_va_arg_pack`

Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
2025-12-09 08:23:14 -03:00
chenxiaoyi c07d9dc900 compiler: fix fortify for clang
The clang compiler has also defined `__GNUC__`, which can't be used to
decide the compiler version.

And the version used to decide whether the builtin function
`__builtin_dynamic_object_size` exist is not correct.

Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
2025-12-09 08:23:14 -03:00
zhangkai25 ad422684d4 drivers/net: Ethernet protocol stack key abnormal point pile for DFX
add log output for error flow

Signed-off-by: zhangkai25 <zhangkai25@xiaomi.com>
2025-12-09 07:56:20 -03:00
zhanghongyu 4f7e03db2e netdev_upperhalf.c: add net_lock when vlan_foreach
avoid illegal address access caused by removing vlan
network cards during the traversal of vlan network cards

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2025-12-09 07:56:20 -03:00
gaohedong 00dfb5d1f3 ethernet: Release iob when dropping ethernet packets
Release iob when dropping ethernet packets

Signed-off-by: gaohedong <gaohedong@xiaomi.com>
2025-12-09 07:56:20 -03:00
Zhe Weng 8d7799d6c1 net/vlan: Allow setting default priority (PCP)
1. We add default PCP because some of our apps may not want to set PCP
   manually (e.g. Our user may just ping with pre-set PCP)
2. The `vlan_qos` is used as PCP when setting Linux's priority mapping:
   https://github.com/torvalds/linux/blob/v6.12/net/8021q/vlan.c#L590
   Although `vlan_qos` is not used when creating VLAN on Linux, we can
   use it as PCP on creating VLAN (without changing its meaning), and
   keep compatible with Linux's creating (Exactly the same when
   `vlan_qos` is 0).

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2025-12-09 07:56:20 -03:00
Zhe Weng 2b34bcfcb1 netdev/ioctl: Add support for simple VLAN ioctl
Supporting ADD_VLAN_CMD and DEL_VLAN_CMD of SIOCSIFVLAN
Ref: https://github.com/torvalds/linux/blob/v6.12/net/8021q/vlan.c#L621

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2025-12-09 07:56:20 -03:00
Zhe Weng 242c253178 net: Add VLAN device support
Inspired by Linux's way, we also create VLAN devices for managing VLAN,
which will become interfaces like `eth0.58`.

QinQ is also supported, we can create VLAN devices above another VLAN
devices, like `eth0.100.101` (or even `eth0.1.2.3.4`, also supported on
Linux).

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2025-12-09 07:56:20 -03:00
Zhe Weng 750fae4cca netdev/lower: Support share quota between devices
To prepare for VLAN device support, a VLAN device will share quota with
its real device.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2025-12-09 07:56:20 -03:00
daichuan afc210667d netdev_upperhalf.c: modify for maybe use after free with upper pointer
avoid continuing to access the released memory after the netdev_register
error occurs.

Signed-off-by: daichuan <daichuan@xiaomi.com>
2025-12-09 07:56:20 -03:00
Zhe Weng b2db3a6430 net/netdev: Add netdev_iob_replace_l2 for netdev to avoid misuse
And fix wrong `d_len` for IOBs from `upper->txq` in TX.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2025-12-09 07:56:20 -03:00
Petro Karashchenko 3c0309e0ed arch/arm/samv7: optimize MCUboot loader configuration
Disable configuration options that are not needed for MCUboot loader
 - Disable floating point and long long support in libc
 - Disable libm
 - Disable POSIX features: environment variables, message queues, timers
   and pthreads
 - Disable RAMTEST app to save code space

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2025-12-09 18:04:01 +08:00
Petro Karashchenko 535b08514d cxx/cstddef: expose 'max_align_t'
expose 'max_align_t'

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2025-12-09 18:03:10 +08:00
Petro Karashchenko 9c38276249 cxx/cmath: expose 'nextafter'
expose 'nextafter'

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2025-12-09 18:03:10 +08:00
Petro Karashchenko 8c3106e2a4 libs/libm: fix typo in Kconfig
fix typo in Kconfig

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2025-12-09 18:03:10 +08:00
zhanghongyu 521e319aa3 drivers/net: replace critical_section with spinlock
so as to better support multi-core scenarios

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2025-12-09 14:43:59 +08:00
wangchen fe822145a3 tun:modify issue of repeatly tun_close failed
after the network card is turned off, read and write operations need
to return -ENETDOWN, and it is necessary to wake up the waiting read
and write operations.

Signed-off-by: wangchen <wangchen41@xiaomi.com>
2025-12-09 14:43:59 +08:00
zhanghongyu d02ac985dc wireless/ieee802154/: remove the use of critical_section
so as to better support multi-core scenarios

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2025-12-09 14:43:59 +08:00
zhanghongyu 9dab103fa0 net: replace critical_section with spin lock
so as to better support multi-core scenarios

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2025-12-09 14:43:59 +08:00
xiezhanpeng3 fc0647491b arch/armv8-r: use -mfpu=fpv5-sp-d16 for SP-only Cortex-R52 targets
The specific Cortex-R52 implementation could be configured with
a Single-Precision-only FPU (SP-only) and no Neon unit.
Executing double-precision instructions (e.g., `vadd.f64`) triggers
an Undefined Instruction exception.

The standard `-mfpu=fp-armv8` implicitly enables double-precision,
which is unsafe for this hardware.

`-mfpu=fpv5-sp-d16` is selected as the closest architectural match.
  - It enforces Single Precision code generation (preventing crashes).
  - It enables VFPv4/FPv5 features like FMA (Fused Multiply-Add) supported by the CR52 FPU.
  - It restricts the register set to d0-d15, matching the hardware constraints.

This ensures the compiler utilizes hardware FPU and FMA acceleration
without emitting illegal double-precision instructions.

Signed-off-by: xiezhanpeng3 <xiezhanpeng3@lixiang.com>
2025-12-08 21:09:05 +08:00
Alan Carvalho de Assis a51e45d5b3 drivers/lpwan: Fix Kconfig SX1276 and SX1262 position
When user was selecting SX1276 the configuration options to this
device was appear below SX1262.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-12-08 10:39:11 +08:00
zhanghongyu e87082b195 net/utils/net_bufpool: add lock to struct net_bufpool_s and bufpool_navail
Add a lock to net_bufpool to simplify the protocol stack code.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2025-12-07 11:11:21 +08:00
kywwilson11 2c0e105cad arch/arm/stm32h5: Add RS-485 support to serial driver
Initial commit for adding rs-485 support to serial driver. More is needed as well as testing.

Style fixes.

Added unconfigure functionality.

Added Unconfigure configs to CONFIG.

More style fixes.

Changed depend spacing from 4 spaces to tab.

Fixed priv types, changed serialin to getreg.

Do not unconfigure tx/rx/dir pins by default.

Signed-off-by: kywwilson11 <kwilson@2g-eng.com>
2025-12-06 11:35:53 -03:00
zhanghongyu f5741c0ea1 net/netdev/netdev_register.c: skip mld_devinit if Nic can not support mld
avoid unnecessary operations

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2025-12-06 18:13:26 +08:00
zhanghongyu f7526522a1 icmp/icmpv6: fix the level parameter type
use a more standard definition

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2025-12-06 17:55:40 +08:00