Commit Graph

47689 Commits

Author SHA1 Message Date
yinshengkai
05f8c588fd libc/syslog: improve streamsyslog, add puts funtions
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-01-05 02:00:43 +08:00
Xiang Xiao
7179d57026 fs: Check offset and length more carefully in mmap callback
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-04 17:43:59 +02:00
Xiang Xiao
b0a0ba3ad7 fs: Move mmap callback before truncate in [file|mountpt]_operations
since mmap may exist in block_operations, but truncate may not,
moving mmap beforee truncate could make three struct more compatible

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-04 17:43:59 +02:00
Jiuzhu Dong
c623ee20f1 stdlib: generate uniformly distributed pseudo-random numbers
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-01-04 20:53:05 +08:00
dongjiuzhu1
31134719e7 net/local: rename NET_LOCAL_VFS_PATH to follow linux
And skip same prefix for unix path

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-01-04 20:50:38 +08:00
Xiang Xiao
779a610ca3 Remove the unnecessary NULL fields in global instance definition of file_operations
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-04 00:32:13 +02:00
Xiang Xiao
1815f8b731 drivers/note: Add const to g_notelog_ops
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-04 00:21:18 +02:00
Xiang Xiao
98ab55ef68 drivers/note: Replace the scritical section with spin_xxx_wo_note
to avoid to generate the unexpected schedule information

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-04 00:21:18 +02:00
liucheng5
abf5ea24b4 fix: sensor: new member into ECG sensor type
ECG sensors usually output some status info besides ECG data, such as lead and fast-recovery status. Thus a new member "status" is added into sensor_ecg struct.

Signed-off-by: liucheng5 <liucheng5@xiaomi.com>
2023-01-03 19:23:30 +08:00
Xiang Xiao
b7febf4e19 libc: Move tree.h from include/nuttx to include/sys
to match freebsd layout

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-03 10:34:57 +02:00
chao an
1510dbee68 net/tcp: Do not trigger retransmission if the new data has not been consumed.
Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-03 16:28:30 +08:00
zouboan
56c6943311 sensors/mpu60x0: fix build warning about data type 2023-01-03 01:45:56 +08:00
zouboan
8d7c1541c5 boards/pinephone: add support of MPU6050 2023-01-03 01:45:56 +08:00
zouboan
7e81dce71c arm64/a64: add driver for Allwinner A64 I2C bus
arm64/a64: add driver for Allwinner A64 I2C bus

arm64/a64: add driver for Allwinner A64 I2C bus

arm64/a64: add driver for Allwinner A64 I2C bus
2023-01-03 01:45:56 +08:00
yinshengkai
1cee890aa7 drivers/note: unify the spinlock operation in noteram
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-01-02 22:29:01 +08:00
yinshengkai
81448b5021 sched/irq: add spin_unlock_irqsave/irqrestore_wo_note
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-01-02 22:29:01 +08:00
Jukka Laitinen
f33dc4df3f Change FIOC_MMAP into file operation call
- Add mmap into file_operations and remove it from ioctl definitions.
- Add mm_map structure definitions to support future unmapping
- Modify all drivers to initialize the operations struct accordingly

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-02 11:23:20 -03:00
Jukka Laitinen
41e9df2f3e Add ftruncate into file operation calls
- Add truncate into file_operations
- Move truncate to be common for mountpt_operations and file_operations
- Modify all drivers to initialize the operations struct accordingly

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-02 11:23:20 -03:00
Jukka Laitinen
36528eed64 Revert "fs/vfs/fs_truncate.c: Use ioctl to truncate on non-mountpoint inode"
This reverts commit dbc163f1b0.
2023-01-02 11:23:20 -03:00
yinshengkai
275b2e70a4 syslog: fix extra line breaks in syslog when SYSLOG_COLOR_OUTPUT is enabled
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-01-02 21:22:46 +08:00
Brennan Ashton
a4ca15aa3e CI/Documentation: livereload hash missmatch due to new wheel package upload. 2023-01-02 14:56:51 +08:00
pengyiqiang
1c62181b0d boards: adapt LVGL v8 defconfig
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2023-01-01 10:15:08 -03:00
Xiang Xiao
d3872e0479 arch/esp32c3: Fix the compiler error in esp32c3_spi.c
which is made by:
commit 87a1f69a3c
Author: Alan Carvalho de Assis <acassis@gmail.com>
Date:   Fri Dec 16 15:23:39 2022 -0300

    Modify the IRQ APIs to be compatible with ESP32/S2/S3

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-31 14:57:47 +02:00
Xiang Xiao
cc9166274a drivers/note: Fix the mismatch of va_end call
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-31 14:57:47 +02:00
Alan Carvalho de Assis
87a1f69a3c Modify the IRQ APIs to be compatible with ESP32/S2/S3 2022-12-31 12:47:41 +08:00
yinshengkai
f85102d81b drivers/note: adjust note kconfig order
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-12-30 15:50:30 -03:00
yinshengkai
ca5fcc58c2 sched: move SCHED_INSTRUMENTATION_xxx to note Kconfig
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-12-30 15:50:30 -03:00
zhanghongyu
43cc4bd7bf net_local: fix error when work with epoll
epoll_wait collects revent by checking fds->revent,
but local_socket will copy fds to the other two private pollfd shandow struct,
then the pipe_poll will not be able to update fds->revent directly,
so need local_socket save fds and implement a private poll_notify function
to passing revent to original fds->revent.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-12-31 02:23:50 +08:00
dongjiuzhu1
6e0d76f528 signal: add sigisemptyset, sigandset, sigorset api
refs:https://man7.org/linux/man-pages/man3/sigorset.3.html

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2022-12-31 00:59:28 +08:00
dongjiuzhu1
191d453063 string/strdupa: support strdupa strndupa
refs:https://sites.uclouvain.be/SystInfo/manpages/man3/strdup.3.html

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2022-12-31 00:59:28 +08:00
Alan Carvalho de Assis
7660ece921 Doc: Add documentation about using BLE on ESP32-C3 2022-12-30 18:11:51 +02:00
yinshengkai
64b6df42a4 drivers/note: register notelog device
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-12-30 22:21:12 +08:00
yinshengkai
376e30193b drivers/note: remove sched_note_syscall_xxx in notelog
syslog is a system call, which will cause recursion after turning on SCHED_INSTRUMENTATION_SYSCALL

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-12-30 22:21:12 +08:00
yinshengkai
a86684574f syscall: export UP_WRAPSYM/UP_REALSYM macro
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-12-30 22:13:34 +08:00
Zhe Weng
34ade7a0b6 net/devif: fix devif_poll loop logic
Previously, the devif_poll works in this flow:
devif_poll_xx -> bstop = callback -> continue if !bstop -> poll another

Now we split the polling and callback, so it should work like:
devif_poll_connections -> return true if callback need to be called
   -> bstop = callback -> loop if !bstop -> poll again

Conditions:
poll_connections == 0, d_len == 0, break, return 0
poll_connections == 1, d_len == 0, break, return 1 (other stop case,
                                                    don't callback)
poll_connections == 1, d_len > 0, callback == 1, break, return 1
poll_connections == 1, d_len > 0, callback == 0, loop

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-12-30 21:25:59 +08:00
Lee Lup Yuen
991fd3d887 arm64/pinephone: Fix missing pixels in Frame Buffer Driver
This PR fixes the missing pixels in the rendered output of the Frame Buffer Driver for PINE64 PinePhone.

We fix this by copying the RAM Frame Buffer to itself on Frame Buffer Update `FBIO_UPDATE`, which will refresh the display correctly over DMA / Display Engine / Timing Controller TCON0.

### Modified Files

`boards/arm64/a64/pinephone/Kconfig`: Add requirement for Frame Buffer Update `FB_UPDATE` for PinePhone LCD Display

`boards/arm64/a64/pinephone/src/pinephone_display.c`: Implement Frame Buffer Update `FBIO_UPDATE` by copying the RAM Frame Buffer to itself
2022-12-30 11:05:27 +08:00
Peter van der Perk
75631e6169 S32K3XX Progmem fixes and size config 2022-12-29 22:12:19 +02:00
dongjiuzhu1
5826e8eeb1 libc/passwd: add pw_gecos field(userinfo)
The pw_gecos field is not specified in POSIX, but is
present on most implementations.
passwd file format:
name:uid:gid:gecos:dir:shell
ex: gdm127:133:Gnome Display Manager:/var/lib/gdm3:/bin/false

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2022-12-30 00:21:15 +08:00
dongjiuzhu1
8f05661a53 syslog: A trailing newline is added if none is present.
refs:
https://www.manpagez.com/man/3/syslog/

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2022-12-30 00:20:33 +08:00
Zhe Weng
d549333511 script: enable forward in simhostroute.sh
We found that some people don't know / forget to enable forward in linux, which keeps nat not working.

Because we don't know the previous state before 'on', and forward seldom has side effect, we don't disable it in 'off'.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-12-29 09:32:25 -03:00
yinshengkai
bc7c520eca drivers/note: add note_syscall_enter parameter list
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-12-29 09:25:54 -03:00
田昕
96a45e2c75 sched/misc:add linux-like reboot notifier list
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-12-29 19:18:42 +08:00
dongjiuzhu1
5d643b3bef sys/socket/scm: return NULL when cmsg_len is zero
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2022-12-29 13:25:24 +08:00
Xiang Xiao
d5f729ed25 sched/assert: Dump the global state only when it's a fatal error
and merge assert_end into _assert

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-29 11:50:31 +09:00
Xiang Xiao
d1497a8d08 sched/assert: Don't call up_check_tcbstack for the kernel stack
since up_check_tcbstack only check the userspace stack color

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-29 11:50:31 +09:00
Xiang Xiao
5f99e482b5 sched/assert: Don't call running_task more than once
and fix some minor style issue

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-29 11:50:31 +09:00
Masayuki Ishikawa
6992a8f4cc sched: group: Fix memory corruption in group_leave.c
Summary:
- I noticed that nxplayer (HTTP audio streaming) + command execution
  via telnet sometimes causes memory corruption.
  See https://github.com/apache/nuttx/pull/7947 for the detail.
- This commit fixes this issue by calling lib_stream_release() before
  lib_stream_release() in group_leave.c

Impact:
- Should be none

Testing:
- Tested with spresense:wifi_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-12-29 10:33:47 +08:00
Xiang Xiao
2e59d832fc sched/misc: Rename panic.c to panic_notifier.c
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-28 21:42:38 +02:00
Lee Lup Yuen
f9bd04ff19 arm64/pinephone: Add driver for Frame Buffer
This PR adds the Frame Buffer Driver for PINE64 PinePhone. With this driver, NuttX Apps will be able to use the standard Frame Buffer API to render graphics on PinePhone.

`boards/arm64/a64/pinephone/src/pinephone_bringup.c`: Render Test Pattern after calling `up_fbinitialize()` to start the Frame Buffer Driver

`boards/arm64/a64/pinephone/src/pinephone_display.c`: Add Frame Buffer Driver

`boards/arm64/a64/pinephone/src/pinephone_display.h`: Declare new function for rendering Test Pattern

`platforms/arm/a64/boards/pinephone/index.rst`: Add Frame Buffer as supported driver for PinePhone
2022-12-28 23:06:45 +08:00
dongjiuzhu1
f85d9a9332 fs/signalfd: using file descriptor to accept signal
Reference here:
https://man7.org/linux/man-pages/man2/signalfd.2.html

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2022-12-28 23:05:58 +08:00