Commit Graph

51865 Commits

Author SHA1 Message Date
TimJTi
896727b576 Add new ioctls 2023-10-27 13:52:28 -03:00
raiden00pl
c2863f90f6 bluetooth rpmsg depends on RPTUN 2023-10-27 13:27:05 -03:00
raiden00pl
8f7be6ce27 Documentation: move nxwidgets to applications as it is apps-side lib 2023-10-27 13:21:40 -03:00
raiden00pl
579a35dc68 Documentation: fix ugly formating around some inline literals 2023-10-27 13:21:40 -03:00
raiden00pl
770df6d820 Documentation: remove readme references 2023-10-27 13:21:40 -03:00
raiden00pl
d72c6802c1 Documentation: add dummy pages for missing filesystems and drivers 2023-10-27 13:21:40 -03:00
raiden00pl
870139e45f Documentation: move socketcan.rst to net/ 2023-10-27 13:21:40 -03:00
raiden00pl
8090fb9d5c Documentation: add dummy pages for missing top directories
crypto, openamp, video and wireless
2023-10-27 13:21:40 -03:00
raiden00pl
9c4f042c57 Documentation: add missing directories in net 2023-10-27 13:21:40 -03:00
raiden00pl
408441bf15 Documentation: initialize cmake doc 2023-10-27 13:21:40 -03:00
raiden00pl
a2bb55d8b7 Documentation: update copyright year 2023-10-27 13:21:40 -03:00
raiden00pl
82e260740a Documentation: cosmetics for unionfs.rst 2023-10-27 13:21:40 -03:00
liqinhui
41762eb187 simwifi: host wlan0 obtains ip and set dns for wlan0 in the defwan wlan0
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2023-10-27 22:28:01 +08:00
ligd
fe03ce5fbe mm: both use spin_lock_irqxx() when operated delaylist
align with free_delaylist()

Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-10-27 22:27:15 +08:00
SPRESENSE
f3fabc5d32 Revert "make/archive: Use the full path name when matching or storing names in the archive"
This reverts commit 563125fde3.
2023-10-27 22:26:18 +08:00
liqinhui
1560db9f9b simwifi: Fix the error of the need length for scanning.
The error of estimating the buffer space may cause an out-of-bounds in filling scan results.

Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2023-10-27 22:25:58 +08:00
David Sidrane
881d67272c s32k3xx:Serial overcome race where DMA has not fetched TCD again"
With TCD set to loop, there is a window where the
   DMA has raised Done, but not reloaded the TCD, resetting
   count and clearing Done.

   In this window  imxrt_dmach_getcount could then return 0.
   Resulting in imxrt_dma_nextrx returning RXDMA_BUFFER_SIZE.
   Which is not a valid index in the FIFO.

   Since the count will be set to RXDMA_BUFFER_SIZE. When the DMA
   engine completes the TCD reload. The imxrt_dma_nextrx would
   return 0. Therefore:

    (RXDMA_BUFFER_SIZE - dmaresidual) % RXDMA_BUFFER_SIZE

   accomplishes this.
2023-10-27 22:24:27 +08:00
David Sidrane
8b9d05d0f7 s32k1xx:Serial overcome race where DMA has not fetched TCD again"
With TCD set to loop, there is a window where the
   DMA has raised Done, but not reloaded the TCD, resetting
   count and clearing Done.

   In this window  imxrt_dmach_getcount could then return 0.
   Resulting in imxrt_dma_nextrx returning RXDMA_BUFFER_SIZE.
   Which is not a valid index in the FIFO.

   Since the count will be set to RXDMA_BUFFER_SIZE. When the DMA
   engine completes the TCD reload. The imxrt_dma_nextrx would
   return 0. Therefore:

    (RXDMA_BUFFER_SIZE - dmaresidual) % RXDMA_BUFFER_SIZE

   accomplishes this.
2023-10-27 22:24:27 +08:00
David Sidrane
892fe45900 imxrt:Serial overcome race where DMA has not fetched TCD again"
With TCD set to loop, there is a window where the
   DMA has raised Done, but not reloaded the TCD, resetting
   count and clearing Done.

   In this window  imxrt_dmach_getcount could then return 0.
   Resulting in imxrt_dma_nextrx returning RXDMA_BUFFER_SIZE.
   Which is not a valid index in the FIFO.

   Since the count will be set to RXDMA_BUFFER_SIZE. When the DMA
   engine completes the TCD reload. The imxrt_dma_nextrx would
   return 0. Therefore:

    (RXDMA_BUFFER_SIZE - dmaresidual) % RXDMA_BUFFER_SIZE

   accomplishes this.
2023-10-27 22:24:27 +08:00
dongjiuzhu1
18819b6b24 sched/task: close file descriptor with O_CLOEXEC before active task or exec
VELAPLATFO-18473

refs:
https://man7.org/linux/man-pages/man2/fcntl.2.html
If the FD_CLOEXEC bit is set, the file descriptor will automatically
be closed during a successful execve(2).
(If the execve(2) fails, the file descriptor is left open.)

modify:
1. Ensure that the child task copies all fds of the parent task,
   including those with O_CLOEXE.
2. Make sure spawn_file_action is executed under fd with O_CLOEXEC,
   otherwise it will fail.
3. When a new task is activated or exec is called, close all fds
   with O_CLOEXEC flags.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-10-27 21:15:07 +08:00
dongjiuzhu1
73dc8f84cc fs/dup3: impletement dup3/nx_dup3_from_tcb function
refs: https://man7.org/linux/man-pages/man2/dup.2.html

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-10-27 21:15:07 +08:00
dongjiuzhu1
dc2dac2377 fs/dup/dup2: don't add O_CLOEXEC for new file descriptor
refs: https://man7.org/linux/man-pages/man2/dup.2.html

The two file descriptors do not share file descriptor flags (the
close-on-exec flag).  The close-on-exec flag (FD_CLOEXEC; see
fcntl(2)) for the duplicate descriptor is off.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-10-27 21:15:07 +08:00
dongjiuzhu1
5c98649a7a libs/lib_psfa_adddup2.c: remove workaround aboud dup2
Because popen no longer needs to rely on intermediate
tasks to start command tasks.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-10-27 21:15:07 +08:00
dongjiuzhu1
4068f11129 binfmt/elf: Select ARCH_USE_TEXT_HEAP if ARCH_HAVE_TEXT_HEAP
Using up_textheap_memalign to allocate memory if arch support textheap
for loading section.

The default system heap does not support execution permissions,
so up_textheap_memalign allocation is required.

this patch can fix issue about #11043

update esp32 elf config:
remove -CONFIG_ARCH_USE_TEXT_HEAP=y becuase ARCH_CHIP_ESP32 select
ARCH_HAVE_TEXT_HEAP

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-10-27 15:42:02 +09:00
Robert Middleton
c50d47136c Fix #11005 2023-10-27 11:44:44 +08:00
Michal Lenc
51bae917b7 ci: add fmemopen test and merge fopencookie and fmemopen to stdio test
CI test for fmemopen() function was added. The test was merged with
fopencookie interface test and merged into single test_stdio.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-10-27 08:55:24 +08:00
Michal Lenc
65ae8a545c libc: add support for memory buffer stream with fmemopen()
Add support for POSIX interface fmemopen(). This interface open a memory
buffer as a stream and permits access to this buffer specified by mode.
This allows I/O operations to be performed on the memory buffer.

The implementation uses fopencookie() for custom stream operations and
callbacks.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-10-27 08:55:24 +08:00
raiden00pl
01500f8b20 Documentation: fix latexpdf build 2023-10-26 18:13:34 -03:00
raiden00pl
56529d2944 Documentation: migrate the rest boards
- migrated /README are removed from /boards

- there are a lot of READMEs that should be further converted to rst.
  At the moment they are moved to Documentation/platforms and included in rst files
2023-10-26 18:13:34 -03:00
raiden00pl
d77dff786b fix broken CI
rename missing CONFIG_SYSTEM_RAMTEST to CONFIG_TESTING_RAMTEST
2023-10-26 14:51:01 -03:00
simbit18
8f96e59aee libs/libc/stdlib/lib_exit.c: fix multiple definition of __dso_handle in msys2
CPP:  nuttx-names.in-> nuttx-names.dat
LD:  nuttx
/usr/lib/gcc/x86_64-pc-msys/13.2.0/../../../../x86_64-pc-msys/bin/ld: nuttx.rel:/d/a/nuttx_windows/nuttx_windows/nuttxspace/nuttx/libs/libc/stdlib/lib_exit.c:48: multiple definition of `__dso_handle'; /usr/lib/gcc/x86_64-pc-msys/13.2.0/crtbegin.o:cygming-crtbeg:(.data+0x0): first defined here
2023-10-27 01:21:10 +08:00
simbit18
9c984bbe5c tools/sethost.sh: add MSYS2 MSYS environment
add MSYS2 MSYS environment
2023-10-27 01:21:10 +08:00
xuxin19
9112b9e4c0 cmake:add zifencei extension in compile options
this fixes the error opcode `fence.i` by cmake compilation

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-10-26 21:01:46 +08:00
xuxin19
906699e0a5 ci:enable RISC-V qemu cmake build ci
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-10-26 21:01:46 +08:00
xuxin19
e3003f691b cmake:init RISC-V cmake qemu-rv build
cmake currently does not support non-FlatBuild,
need disable ELF and LOADABLE when compiling other defconfigs

```
 cmake -B build -DBOARD_CONFIG=rv-virt/smp64 -GNinja # for rv32:rv-virt/smp
 cmake --build build -t menuconfig
 cmake --build build
 qemu-system-riscv64 -semihosting -M virt,aclint=on -cpu rv64 -smp 8 -bios none -kernel nuttx -nographic
```

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-10-26 21:01:46 +08:00
dongjiuzhu1
ed6fb11de6 driver/mtd: get mtd_geometry_s.model for mtd partition and optimize code
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-10-26 20:02:45 +08:00
Tiago Medicci Serrano
a2be27ef7d espressif: Update esp-hal-3rdparty version
This version includes a bugfix for the NULL definition.
2023-10-26 20:02:13 +08:00
raiden00pl
443e900188 Documentation: migrate the rest of drivers readmes 2023-10-26 20:02:03 +08:00
raiden00pl
d98ae9d3e4 Documentation: cosmetics changes
- various style fixes
- limit the line length to about 80 characters to improve readability in terminal-based IDEs
2023-10-26 20:01:21 +08:00
liqinhui
5228d773d3 simwifi: Support that simwifi connects to the hiden ssid.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2023-10-26 08:27:45 -03:00
Dong Heng
d4cebae155 xtensa/esp32s3: Support to read data from flash to PSRAM 2023-10-26 08:23:34 -03:00
chenrun1
de17f43481 boards:Modify test "ramtest" path
Based on the PR#2161 change, we need to modify the macro switch in most boards to configure ramtest.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-10-26 13:17:35 +02:00
dongjiuzhu1
68fc3adeff drivers/usbdev: config USBDEV_TRACE_INITIALIDSET when disbale USBDEV_TRACE
usbtrace is valid when enable USBDEV_TRACE or DEBUG_FEATURE && DEBUG_USB,

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-10-26 16:32:18 +08:00
liqinhui
66b11d8940 sim/wifidriver: Fix the scan error.
Using the uninitialized buffer causes the out of bounds.
Add a terminator for the rbuf.

Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2023-10-26 16:22:28 +08:00
chao an
fc80c70205 assert: rename __ASSERT to __ASSERT__ to avoid conflict
The definition of __ASSERT has special define in some OS and librarys,
rename to __ASSERT__ to avoid conflict

Signed-off-by: chao an <anchao@xiaomi.com>
2023-10-26 16:21:02 +08:00
Stuart Ianna
ad9f6b79e0 libs/libcxx: Silence warnings when building libcxx.
Silence two warnings when building libcxx with GCC 12.2.0 and std=c++2b:

libcxx/src/charconv.cpp_CXXFLAGS += -Wno-attributes
 - Results from libcxx fallback to use __always_inline__ when exclude_from_explicit_instantiation isn't available.

libcxx/src/locale.cpp_CXXFLAGS += -Wno-attributes
 - Results from the expansion of _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS. Should be fine to ignore.
2023-10-26 09:07:17 +02:00
Stuart Ianna
5fa1819492 arch/risc-v/litex/litex-emac: Add support for phy interrupts.
Add support for PHY interrupts in the architecture layer of the Litex emac driver. Boards need to add handling for interrupt lines, if supported.
2023-10-26 09:02:23 +08:00
Stuart Ianna
fe468b276e Documentation: Add entry for sd_bench tool. 2023-10-26 09:00:29 +08:00
simbit18
37729540c0 Fix Kconfig style
Remove spaces from Kconfig
Add comments
2023-10-26 01:53:58 +08:00
simbit18
fa7d0bbd45 Fix nuttx coding style
Remove TABs
2023-10-26 01:53:48 +08:00