Commit Graph

50197 Commits

Author SHA1 Message Date
Bowen Wang
d24622888f arm64_backtrace: use running_task if arch_get_current_tcb return NULL
In the init phase of the OS, arch_get_current_tcb return NULL. Enable
the memory backatrace default will crash in backtrace function.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2023-07-31 04:52:49 -07:00
dongjiuzhu1
e4c015f0aa fs/nfs: support seek, fsync operation
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-07-31 03:46:13 -07:00
SPRESENSE
4b966aa1e7 drivers/video: Fix returned errno in error cases
When the value that is out of range is specified in ioctl(VIDIOC_S_CTRL) and
ioctl(VIDIOC_S_EXT_CTRLS), returned value should be not EINVAL but ERANGE.
2023-07-31 03:28:54 -07:00
SPRESENSE
f04dce1314 boards: cxd56xx: Fix issue that GPO is not iniitalized by watchdog
Fix an issue that GPO pins is not iniitalized by watchdog reboot.
If the watchdog expires during LTE is in use, it causes the LTE
to remain powered on and fails to launch after reboot.
2023-07-31 03:28:43 -07:00
SPRESENSE
2d2c3eb2cf drivers/video: Initialize flags member of query control APIs
video driver does not support flags member of ioctl(VIDIOC_QUERYCTRL)
and ioctl(VIDIOC_QUERY_EXT_CTRL).
But, ioctl returns with the flags member that has the garbage value.
Add initialization of flags member to avoid return of the garbage value.
2023-07-31 02:56:10 -07:00
zhangyuan21
e50d1211df task_spawnparms: out of loop when ret less than 0
The nxspawn_dup2 function will return a value greater than 0,
so the loop should only exit if ret is less than 0.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-07-31 00:47:42 -07:00
zhangyuan21
c6f32f4363 arm-m: Check the dcache status before enabling dcache
If the cache is already enabled before NuttX starts up,
enabling the cache in NuttX will cause the cache to be
re-invalidated, then resulting in data that is already
in the cache being flushed out.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-07-31 08:49:21 +02:00
Xiang Xiao
427e574bd1 fs/unionfs: Remove unionfs_mount function
since the same function can be achieved by mount:
mount(NULL, "/mnt/unionfs", "unionfs", 0,
      "fspath1=/mnt/path1,prefix1=prefix1,"
      "fspath2=/mnt/path2,prefix2=prefix2");

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-07-30 18:51:26 -03:00
Xiang Xiao
fc5e85da1b drivers: Format pointer through "%p" for kthread_create
to remove the unnecessary cast and unify the usage

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-07-30 23:40:59 +03:00
chenrun1
c267791f06 driver/mtd/ftl: Modify erasure result processing error issue
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-07-30 12:40:30 -07:00
wangjianyu3
0a52dfaa66 TXTABLE: Support backup table
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2023-07-29 20:27:10 -07:00
wangjianyu3
ca08f069a7 partition: Add TXTABLE parser
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2023-07-29 20:27:10 -07:00
simonatoaca
9794dc118f drivers: Added support for BME680
drivers/sensors/bme680.c: The bme680 driver
sensor.h: Added new type of sensor (Gas) to be used for retrieving the bme680 data
esp32/common/src/esp32_bme680.c: bme680 support on esp32
esp32/esp32-sparrow_kit/esp32_bringup.c: added support for the bme680
esp32/esp32-sparrow-kit/configs/nsh/defconfig: fixed defconfig ci problem

Signed-off-by: simonatoaca <simona.alexandra2000@gmail.com>

esp32-sparrow-kit: Fixed defconfig

Signed-off-by: simonatoaca <simona.alexandra2000@gmail.com>

Code is now C89 compatible

Signed-off-by: simonatoaca <simona.alexandra2000@gmail.com>

Reused already defined sensor data structs by registering every sub-sensor separately

Signed-off-by: simonatoaca <simona.alexandra2000@gmail.com>

Implemented suggestions

Signed-off-by: simonatoaca <simona.alexandra2000@gmail.com>
2023-07-29 17:47:23 -03:00
dongjiuzhu1
dcf3f9de75 driver/mtd/ftl: support to skip bad block for earse/bread/bwrite
1.support to use dd commond to burn romfs image to nand flash
2.support bare-write nand flash device without file system

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-07-29 17:46:14 -03:00
dongjiuzhu1
6ff4826492 nuttx/bits.h: support GENMASK and GENMASK_ULL
Ref to https://github.com/torvalds/linux/blob/master/include/linux/bits.h

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-07-29 16:41:31 -03:00
yuexinyi
326cf2bf88 drivers/video: add new video driver register api to support multi instance
Signed-off-by: yuexinyi <yuexinyi@xiaomi.com>
2023-07-29 07:42:29 -07:00
yuexinyi
56be0ab050 drivers/video: add capture arg to support multi instance
Signed-off-by: yuexinyi <yuexinyi@xiaomi.com>
2023-07-29 07:42:29 -07:00
yuexinyi
52859fe10f drivers/video: add unlink api to release driver private data after supporing multi instance
Signed-off-by: yuexinyi <yuexinyi@xiaomi.com>
2023-07-29 07:42:29 -07:00
yuexinyi
96ea877490 drivers/video: video ioctrl api support multi instance
Signed-off-by: yuexinyi <yuexinyi@xiaomi.com>
2023-07-29 07:42:29 -07:00
dongjiuzhu1
5d09b4cbd0 libc/rand_r: support rand_r api
refs to https://pubs.opengroup.org/onlinepubs/7908799/xsh/rand.html

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-07-29 07:28:23 -07:00
hujun5
97a2528de9 graphics: remove sched_[un]lock
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-07-29 07:25:27 -07:00
dongjiuzhu1
44b08d3a67 net/rpmsg: read receiving data after unbind
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-07-29 07:04:43 -07:00
hujun5
618d47570d arm/trustzone: update defconfig
we should add CONFIG_ARCH_TRUSTZONE_NONSECURE=y to ap's defconfig

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-07-29 06:58:24 -07:00
hujun5
e3f481d3b1 arm/trustzone: time interrupt setting failed
we should use a secure clock when the CPU is in secure mode

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-07-29 06:58:24 -07:00
wanggang26
024440663d bch: fix sector buffer invalidation issue 2023-07-29 06:56:28 -07:00
dongjiuzhu1
e3d27444ef boards/sim: remove unnecessary config EXAMPLES_SOTEST_DEVPATH
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-07-29 06:54:52 -07:00
hujun5
9f1cb4135b binfmt/elf: bss section should init to zero
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-07-29 06:54:25 -07:00
dongjiuzhu1
d89e0996f5 sim/usbdev: Add string table as it is needed when USBTRACE is turned on
nuttx/drivers/usbdev/usbdev_trprintf.c:418: undefined reference to `g_usb_trace_strings_intdecode'
/usr/bin/ld: nuttx/drivers/usbdev/usbdev_trprintf.c:496: undefined reference to `g_usb_trace_strings_deverror'

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-07-28 20:58:23 -07:00
dongjiuzhu1
ddc2c62aa8 sim/rawgadget: don't push fifo if ioctl failed because it will cause busy read
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-07-28 20:58:23 -07:00
dongjiuzhu1
14446677d3 arch/arm64: default select ARCH_HAVE_SETJMP
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-07-28 20:57:26 -07:00
dongjiuzhu1
d415b7df54 include/fcntl.h: add O_NOATIME flags
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-07-28 20:56:22 -07:00
dongjiuzhu1
afb473707f libc/pthread: add pthread_attr_set/getscope
refs to https://pubs.opengroup.org/onlinepubs/7908799/xsh/pthread_attr_setscope.html

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-07-28 20:55:22 -07:00
dongjiuzhu1
2221612512 driver/spi_slave: Simplify rx/tx buffer logic
1. send user data directly without memcpy
2. add qpoll check before enqueue

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-07-28 19:11:16 +03:00
dongjiuzhu1
9bf66ba3d5 driver/spi_slave: support spi_slave asynchronous
1. support spi slave device poll
2. support read non-block/block mode

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-07-28 19:11:16 +03:00
wanggang26
abc1cade35 binfmt/elf: Support to load ET_EXEC in flat mode
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2023-07-28 08:35:27 -07:00
fangxinyong
dfa6a43744 fs/mmap: fix wrong return value check
while iterate throuh all mapping memory to munmap and release,
the last entry is NUlL.
We need differentiate the case with invald entry at the first.

The fix is to pass ltp shm related cases.

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2023-07-28 08:05:39 -07:00
dongjiuzhu1
88161bfca5 fs/mmap: add sanity check
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-07-28 08:05:39 -07:00
dongjiuzhu1
e4739ab575 fs/tmpfs: add munmap interface for tmpfs file map
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-07-28 08:05:39 -07:00
wanggang26
9d67c7b6ac binfmt/elf: both regular file and non-regular file (such as /dev/node) should be accessible
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2023-07-28 07:52:37 -07:00
dongjiuzhu1
7d281f46de sim/hostfs: fix issue about access file with size more than 2GB
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-07-28 07:42:12 -07:00
dongjiuzhu1
f8991f7782 vfs/dup: add nonblock flag to avoid happening block when dup
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-07-28 07:41:51 -07:00
dongjiuzhu1
9fdf36c17e drivers/ramdisk: don't free memory for romdisk
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-07-28 07:40:53 -07:00
dongjiuzhu1
9a22741e32 net/rpmsg: get credentials between client and server
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-07-28 07:40:00 -07:00
yangjiao
c2e1aa281d fs/semaphore/sem_open: update the logic when the semaphore name length is greater than PATH_MAX or a component length is greater than NAME_MAX.
Follow the POSIX specification in https://pubs.opengroup.org/onlinepubs/9699919799/functions/sem_open.html, update the logic for condition that the semaphore name length is greater than PATH_MAX or a component length is greater than NAME_MAX.

Signed-off-by: yangjiao <yangjiao@xiaomi.com>
2023-07-28 07:38:41 -07:00
dongjiuzhu1
afec562fbb drivers/clk: support using clk function at interrupt and idle
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-07-28 07:12:51 -07:00
liaoao
9ef19af5bb rpmsgblk: correct args of read operations
Signed-off-by: liaoao <liaoao@xiaomi.com>
2023-07-28 07:10:47 -07:00
liaoao
bc0af1e531 rpmsgblk: add support for mmc_ioc_cmd/mmc_multi_ioc_cmd
Signed-off-by: liaoao <liaoao@xiaomi.com>
2023-07-28 07:10:47 -07:00
liaoao
a44f498842 rpmsgclk: allow client to disable clk of server
Signed-off-by: liaoao <liaoao@xiaomi.com>
2023-07-28 06:57:29 -07:00
xucheng5
872913e67b netdev_upperhalf: reply logic only for ipv4/ipv6/arp input
VELAPLATFO-12228

Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
2023-07-28 06:56:35 -07:00
xucheng5
04c4207dee driver/net : net_upperhalf support NET_LL_CAN
VELAPLATFO-9099

Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
2023-07-28 06:56:35 -07:00