4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-19 19:23:30 +08:00

4840 Commits

Author SHA1 Message Date
kurisaw
1b76eccb37 [drivers] merge the software i2c driver 2025-01-08 22:07:03 -05:00
Meco Man
97b9cc5000 fix: add \n for addr2line hint 2025-01-08 17:54:46 -05:00
Meco Man
88920fd814 [utest] 修复UTEST_UNIT_RUN嵌套宏时将宏直接输出的问题 2025-01-07 20:44:29 -05:00
Meco Man
0a25fcffab [utest] add float operators
uassert_float_equal and uassert_float_not_equal
2025-01-07 20:44:29 -05:00
Shell
6c6c5f5d35 feat: Kconfig: collecting some config to sub-menu
To improve the readability of the menuconfig.

Signed-off-by: Shell <smokewood@qq.com>
2025-01-06 19:34:16 +08:00
Shell
8507c38222 fixup: umount: set errno according to POSIX
According to the POSIX.1, we should give a EBUSY on umount(2) of busy
filesystem.

Signed-off-by: Shell <smokewood@qq.com>
2025-01-06 19:34:16 +08:00
Shell
b63b388d1f feat: add support for dfs remount functionality
This patch introduces a remount feature for the DFS, allowing for the
modification of mount parameters without unmounting the filesystem,
the remount functionality helps modify certain mount flags (like `MS_RDONLY`) without
requiring an unmount, providing more control over mounted filesystems in the system.

The updates is essential for user space init proc to cleanup the runtime
resource, ensuring clean handling of cached data and enhancing system
robustness during power down processing.

Changes:
- Defined new constants for remount flags in `dfs_fs.h`.
- Added the `dfs_remount()` function in `dfs_fs.c` to handle remount operations.
- Introduced a check for unsupported flags and handle error conditions such as invalid paths
  or non-directory targets.
- Updated the `dfs_mnt` structure in `dfs_mnt.h` to include a read-only flag (`MNT_RDONLY`).
- The `dfs_remount()` function allows changing the read-only status of a mounted filesystem.
- Added `MNT_LAZY_UMNT` and `MNT_RDONLY` flags to `dfs_mnt` structure.
- Introduced `dfs_mnt_setflags` function for dynamic flag management.
- Updated `dfs_remount` to utilize `dfs_mnt_setflags` for flag setting.
- Enhanced unmount operations with `dfs_mnt_umount_iter` and lazy unmounting.
- Added `dfs_pcache_clean` to handle cache cleanup for read-only mounts.
- Improved error reporting in `dfs_umount` for better user feedback.
- Refactored `sys_mount` to streamline parameter handling and support remounts.
- Introduced `_cp_from_usr_string` helper for user-space string operations.
- Updated internal APIs to ensure consistency in reference count management.

Signed-off-by: Shell <smokewood@qq.com>
2025-01-06 19:34:16 +08:00
Shell
944f3d05b5 feat: add system reboot and process teardown support
The patch introduces support for system reboot functionality and process teardown,
allowing for a clean shutdown and unmounting of the root filesystem. This is
necessary for ensuring a proper system shutdown process, especially when dealing
with resource cleanup and ensuring that all processes have exited before system
shutdown.

Changes:
- Added `lwp_teardown()` function to handle process cleanup and system teardown.
- Introduced `lwp_pid_wait_for_empty()` to wait for process ID table emptiness
  before proceeding with shutdown.
- Updated `dfs_mnt_unref()` to trigger callbacks when unmounting a filesystem.
- Added new reboot types (`RB_AUTOBOOT`, `RB_POWER_OFF`) and implemented their
  corresponding actions, including cleanup of processes and unmounting root
  filesystem.
- Extended `sys_reboot()` to handle reboot and power off types with appropriate
  callbacks for process and filesystem teardown.
- Introduced callback mechanism for root filesystem unmount notifications.

Signed-off-by: Shell <smokewood@qq.com>
2025-01-06 19:34:16 +08:00
Shell
972931c991 feat: add universal process runtime service
This change introduces the `lwp_runtime.c` component, which provides the
necessary runtime environment for the init process, including boot scripts,
shutdown, and poweroff functionalities. The initialization logic has been
moved from `lwp.c` to this new file, enhancing modularity and flexibility
in handling LWP runtime tasks.

Changes:
- Moved the `lwp_startup` function from `lwp.c` to `lwp_runtime.c` to handle
  system initialization and runtime environment setup.
- Added `lwp_teardown` placeholder for system shutdown and cleanup tasks in
  the future (though not yet implemented).
- Introduced the `LWP_USING_RUNTIME` configuration option in `Kconfig` to
  conditionally enable the runtime environment.
- Updated the `SConscript` to conditionally include `lwp_runtime.c` based on
  the `LWP_USING_RUNTIME` configuration.
- Removed the old `lwp_startup` code from `lwp.c`, simplifying the file.

Signed-off-by: Shell <smokewood@qq.com>
2025-01-06 19:34:16 +08:00
Shell
dc3270f14e feat: add signal kill all functionality
This change introduces the `lwp_signal_kill_all` function, which allows a
signal to be sent to all processes in the system. The function iterates
over all PIDs and sends the specified signal to each process, except those
that are protected from signals. This enhancement provides a convenient way
to broadcast signals across all processes in the system.

Changes:
- Added `lwp_signal_kill_all` function in `lwp_signal.c` to broadcast a
  signal to all processes by iterating over all PIDs using the existing
  `lwp_pid_for_each` function.
- Introduced a new `kill_all_param` structure to encapsulate the signal
  information needed for killing processes.
- Added internal `_kill_each` helper function for sending the signal to each
  PID.
- Updated `lwp_signal.h` with the new function prototype for `lwp_signal_kill_all`.
- Modified `sys_kill` in `lwp_syscall.c` to call `lwp_signal_kill_all` when
  a process is not specified.

Signed-off-by: Shell <smokewood@qq.com>
2025-01-06 19:34:16 +08:00
Shell
c0b0838892 feat: support PID iteration
This change introduces the `lwp_pid_for_each` function, which provides a
convenient and thread-safe method for iterating over PIDs with a user-
defined callback. This addition is necessary to support cases where
operations must be performed on each PID in the balanced tree, enhancing
flexibility and modularity for PID management.

Changes:
- Added `lwp_pid_for_each` function in `lwp_pid.c` to allow iteration
  over PIDs using a callback function and optional data parameter.
- Defined a new internal `pid_foreach_param` structure to encapsulate
  the callback and data for the iteration.
- Added `_before_cb` helper function for executing the callback on each
  PID node during AVL traversal.
- Ensured thread safety by acquiring and releasing the PID lock around
  the AVL traversal within `lwp_pid_for_each`.
- Updated `lwp_pid.h` with the `lwp_pid_for_each` function prototype and
  included `rtthread.h` for necessary types.

Signed-off-by: Shell <smokewood@qq.com>
2025-01-06 19:34:16 +08:00
Rbb666
2ab5827704 [wq][fix]工作队列默认使用C99标准实现遍历 2025-01-05 08:03:05 -05:00
Evlers
c8b0a9dbd9 [wlan] add ap_get_info api for more ap information 2025-01-05 19:29:18 +08:00
Meco Man
d583615afe [utest] add rt_memset test case 2025-01-03 13:42:21 +08:00
yuqingli
a343e1d7a0 [romfs/dfs_romfs.c] _rom_fops add ioctl 2025-01-03 00:39:54 -05:00
b81a44bf74
[AT] AT_Device 适配 SERIAL_V2 (#9860)
AT_Device 适配 SERIAL_V2
2025-01-03 13:00:33 +08:00
yuqingli
73ea6dab02 删除 RT_EBUSY 返回值注释 2025-01-02 14:54:53 +08:00
yuqingli
2a4e9e902d [ipc/workqueue.c] 删除无用的判断 2025-01-02 14:54:53 +08:00
yuqingli
8a1e6b2df5 [ipc/workqueue.c] delete timer, using list. 2025-01-02 14:54:53 +08:00
yuqingli05
d57b7cb40a
修复编译过程中的 DFS_V2报错、FAL警告 2025-01-01 19:02:50 -05:00
sakumisu
243854a353 update(cherryusb): update to v1.4.2
Signed-off-by: sakumisu <1203593632@qq.com>
2025-01-01 18:29:38 -05:00
Chen Wang
724b2f1297 components: drivers: add RT_USING_SMP judgement inside smp_call.h
smp_call.h defines SMP-related structures and declares
SMP-related functions. These codes are only valid when
RT_USING_SMP is defined in the bsp, which means we have
to use RT_USING_SMP for judgment in every place where
this file is included, such as following:

```c
```

Now move the judgment of RT_USING_SMP directly into
smp_call.h, so that it's simpler to include the header
file as:

```c
```

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2024-12-30 11:32:10 +08:00
godmial
24cf724899
[include] RT_USING_MUSLLIBC结构体报错的bug (#9834)
解决了gd32470z-lckfb libc_dirent结构体报错的bug
2024-12-27 15:22:08 +08:00
GuEe-GUI
825e87d2cf [DM/BLOCK] Fixup DFS partition memory leak
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-12-27 11:58:02 +08:00
Evlers
c75e095a27 [wlan] add get_info api for more new sta information 2024-12-26 11:00:26 +08:00
Evlers
0932e31ca3 add support for independent dns services for multiple network devices 2024-12-25 18:22:00 +08:00
Meco Man
26828a175e [utest] implement uassert_ptr_equal and uassert_ptr_not_equal 2024-12-24 13:42:04 +08:00
Meco Man
a992226863 [libc] uncomment wcwidth for win32 2024-12-24 13:42:04 +08:00
kurisaw
b23d667ba4 Specification of rtc synchronization functions 2024-12-23 19:40:11 -05:00
zhujiale
2d78d8cad1 [dm2.0] add general sdhci driver it support pio&&sdma 2024-12-22 19:35:34 +08:00
Meco Man
a9746edc08 [utest] optimize the utest to support new CI 2024-12-21 14:57:17 -05:00
Meco Man
7772d4619a [klibc] format code 2024-12-21 14:57:17 -05:00
Chen Wang
7c7ff6e532 kernel: cleanup debug APIs
- `dbg_log` is a “NOT RECOMMENDED API”, convert the calling of this
  API to LOG_x and remove this API.

- `dbg_here`/`dbg_enter`/`dbg_exit`: no one use these APIs, remove
  them directly.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2024-12-20 17:50:00 -05:00
ligr
1499dbda00 [components][libc/io]add comments for timer fd APIs. 2024-12-18 21:07:42 -05:00
GuEe-GUI
b294fba565 [DM/PIC] Support AMP mode
Only support on >= ARM GICv2

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-12-18 21:42:12 +08:00
GuEe-GUI
c9ab55f7a5 [DM/MAILBOX] Support PIC mailbox in AMP
Should registers clean by master in AMP.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-12-18 21:42:12 +08:00
GuEe-GUI
07b114ae73 [DFS/FIXUP] Fixup ISO9660 build
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-12-18 21:37:51 +08:00
zhujiale
e4760364f1 [serial] add bypass testcase in utest 2024-12-17 11:08:14 +08:00
zhujiale
27cf024585 [serial] add bypass hook to direct processing char when uart irq coming 2024-12-17 11:08:14 +08:00
wumingzi
c1166e0bf1 [OFW] Delete redundant strcasecmp function 2024-12-14 12:40:39 -05:00
kurisaw
23256d35bc [drivers][rtc] Fixed software and hardware rtc device naming as rtc 2024-12-13 17:41:44 -05:00
GuEe-GUI
1c54ff4de6 [DM/FIXUP] Fixup block value init
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-12-13 10:39:20 +08:00
GuEe-GUI
ec4f375bbc [DM/FIXUP] Fixup PIC ktime depends
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-12-13 10:39:20 +08:00
GuEe-GUI
a729a82706 [BSP/FIXUP] remove old reset drivers for RK3500
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-12-13 10:39:20 +08:00
GuEe-GUI
0ede1d6c65 [DM/FIXUP] Fixup NVME build
1. Fixup Kconfig show order.
2. Fix `RT_DECLARE_IRQ_AFFINITY` to `RT_IRQ_AFFINITY_DECLARE`
3. Remove warning.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-12-13 10:39:20 +08:00
GuEe-GUI
d248a3a288 [DM/FIXUP] Fixup PCI build
1. Add PCI include in rtdevice.h
2. Fixup `RT_KEY_ENABLED` loss.
3. remove waring type of `dw_pcie_ep_get_func_from_ep` return.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-12-13 10:39:20 +08:00
GuEe-GUI
76d3cf3b86 [DM/FIXUP] Fixup bitmap to new type
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-12-13 10:39:20 +08:00
GuEe-GUI
63bbce1c1f [DM/FIXUP] include name default
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-12-13 10:39:20 +08:00
zhujiale
ee5b7f1de9 [lwp] fix TTYSUP_CFLAG did not include CBAUD flag 2024-12-12 18:54:30 -05:00
zhujiale
e7b30ed2cc [componets] fix when printf 0 addr by %p will return nil 2024-12-09 19:45:40 -05:00