Commit Graph

46812 Commits

Author SHA1 Message Date
chao an
85440f5db6 net/ioctl/cellular: remove redundant logic
Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-15 18:34:07 +08:00
luojun1
ec4af00538 Add Cellular link layer support
1.Add cellular link layer enum definition and register flow
2.Add ioctl flow to set cellular NICs parameters

Signed-off-by: luojun1 <luojun1@xiaomi.com>
Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-15 18:34:07 +08:00
Masayuki Ishikawa
18ce70c1e7 boards: qemu-armv8a: Fix pthread_attr_setstacksize failed in ostest
Summary:
- This commit adjusts CONFIG_TESTING_OSTEST_STACKSIZE to fix
  pthread_attr_setstacksize failed error in ostest

Impact:
- None

Testing:
- Tested with ostest

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-10-15 08:46:01 +02:00
Masayuki Ishikawa
07b642ae8d boards: qemu-intel64: Fix pthread_attr_setstacksize failed in ostest
Summary:
- This commit adjusts CONFIG_TESTING_OSTEST_STACKSIZE to fix
  pthread_attr_setstacksize failed error in ostest

Impact:
- None

Testing:
- Tested with ostest

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-10-15 08:46:01 +02:00
chao.an
76c64b7d30 net/tcp: syscall send() should not return ETIMEDOUT
Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-15 10:17:25 +09:00
Petro Karashchenko
969a06331f fs/vfs: fix case when file to rename does not exist
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-10-15 04:04:12 +08:00
chao an
4e3aa83706 arm/backtrace_fp: fix build warning
common/arm_backtrace_fp.c: In function 'up_backtrace':
common/arm_backtrace_fp.c:126:23: warning: assignment to 'void *' from 'uintptr_t' {aka 'unsigned int'} makes pointer from integer without a cast [-Wint-conversion]
  126 |           istacklimit = arm_intstack_top();
      |                       ^

Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-15 03:09:55 +08:00
Petro Karashchenko
ec4a615f6c libs/libc/stdio: fix ungetc operation
Do not modify errno in case of failure
Return EOF if the value of c equals to EOF

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-10-14 23:29:38 +08:00
Fotis Panagiotopoulos
a0918d6d5e Fixed NULL pointer use in tmpfs. 2022-10-14 21:29:37 +08:00
zhanghongyu
403c657f42 usrsock: combine response and events when socket setup case
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-10-14 12:29:21 +09:00
liangchaozhong
c75253623d usrsock:fix blocking socket connect operation hang issue
Issue description:
usrsock will wait for state.recvsem forever because no event triggers
state.recvsem post operation when connect operation in server side is
non-blocking.

Solution:
trigger state.recvsem post operation after receive USRSOCK_EVENT_SENDTO_READY.

Signed-off-by: liangchaozhong <liangchaozhong@xiaomi.com>
2022-10-14 12:29:21 +09:00
zhanghongyu
be06d00f85 usrsock: update state to connected when recv sento ready under connecting
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-10-14 12:29:21 +09:00
Hidenori Matsubayashi
28180b49d1 arm64: add Cortex-A57 and Cortex-A72 configurations
This change adds the following:
- Rename the board configuration name from qemu-a53 to qemu-v8a.
- Add the configurations for Cortex-A57 and Cortex-A72.

Signed-off-by: Hidenori Matsubayashi <hidenori.matsubayashi@gmail.com>
2022-10-14 09:27:35 +08:00
zhanghongyu
e9db7bbb8c arm64/qemu/qemu-a53: Ensure the purity of the defconfig
Configuring...
  Building NuttX...
  Normalize qemu-a53/nsh
13a14
> CONFIG_ARCH_CHIP_QEMU_A53=y
Saving the new configuration file
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   boards/arm64/qemu/qemu-a53/configs/nsh/defconfig
	modified:   boards/arm64/qemu/qemu-a53/configs/nsh_smp/defconfig

retrigger ci build.
2022-10-13 21:10:30 +02:00
Fotis Panagiotopoulos
c22c07ba29 Minor fix in UBSan. 2022-10-13 17:06:10 +02:00
Hidenori Matsubayashi
06cf41901f arch/arm64: cleanup defconfigs
Use CONFIG_ARCH_CHIP_QEMU instead of CONFIG_ARCH_CHIP_QEMU_A53. This is because these configurations depend on the hardware configuration of qemu (memory map, irq numbers, etc.).

Signed-off-by: Hidenori Matsubayashi <hidenori.matsubayashi@gmail.com>
2022-10-13 19:26:26 +08:00
TimJTi
83c76eaa93 Documentation file typo's corrected
Correct "Nuttx" to "NuttX"
2022-10-13 18:26:17 +08:00
Fotis Panagiotopoulos
143d1322ea Added handling of MSG_WAITALL flag in TCP recv. 2022-10-13 18:22:05 +08:00
chao an
8150534a2f Revert "tools/ci: patch for gcc-arm-none-eabi to 11.3.Rel1 August 08, 2022"
revert this change since docker image upload always fails

This reverts commit 0f3f5d091a.

Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-13 17:28:37 +08:00
chao an
53dd0819cf tools/ci: patch for docker gcc-arm-none-eabi to 11.3.Rel1 August 08, 2022
Fix Wrong Newlib version strings, error when stdlib.h is included

Reference:
https://community.arm.com/support-forums/f/compilers-and-libraries-forum/53470/arm-gnu-toolchain-11-3-rel1-x86_64-arm-none-eabi-wrong-newlib-version-strings-error-when-stdlib-h-is-included

Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-13 08:33:50 +09:00
TimJTi
538365e362 Documentation for Custom Boards and Apps 2022-10-12 14:56:31 -03:00
Alan Carvalho de Assis
c297ecaa5d esp32s2: Add missing ESP32S2 SPIRAM config 2022-10-13 01:41:47 +08:00
Fotis Panagiotopoulos
eec7f5da00 Fixed undefined behavior in UBSan. 2022-10-13 01:40:32 +08:00
zouboan
d3f84ba724 arch/sparc dismiss non-Unicode characters issue 2022-10-12 11:36:14 -03:00
zhangyuan21
7d34ebdd4e armv7-a: add l2 page mapping interface 2022-10-12 22:00:06 +08:00
chao an
0f3f5d091a tools/ci: patch for gcc-arm-none-eabi to 11.3.Rel1 August 08, 2022
Fix Wrong Newlib version strings, error when stdlib.h is included

Reference:
https://community.arm.com/support-forums/f/compilers-and-libraries-forum/53470/arm-gnu-toolchain-11-3-rel1-x86_64-arm-none-eabi-wrong-newlib-version-strings-error-when-stdlib-h-is-included

Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-12 19:54:37 +08:00
chao an
cfe2ec3d4d tools/ci: Update gcc-arm-none-eabi to 11.3.Rel1 August 08, 2022
Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-12 19:54:37 +08:00
zhangyuan21
466635a5e0 armv7-a: set normal memory shareable in smp mode 2022-10-12 19:54:09 +08:00
chao an
36039c8526 newlib/impure: declare thread specific file only if __NEWLIB__ is defined.
Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-12 17:22:24 +08:00
xinbingnan
d8cff7d17a tools/ci/docker/linux/Dockerfile: Install CodeChecker and requirements(clang, clang-tidy)
.github/workflows/build.yml: added CodeChecker support for GitHub Workflow
tools/testbuild.sh: added support for CodeChecker checks

- Added support for CodeChecker checks.
- Generate inspection reports and summaries.
- After the task is executed, the logs are compressed and the database is packaged.

Signed-off-by: xinbingnan <xinbingnan@xiaomi.com>
2022-10-12 16:23:43 +08:00
wangbowen6
c860a6e5f1 rpmsgdev: forward all open/close to server to support complex driver
Before this commit, each rpmsgdev server only manages one file
no matter how many times the client opened.
It can't work fine with some complex drivers, such as input driver
(keyboard, touchscreen and button), because input driver will alloc
a new private open structure for every open operation to make sure
all the applications don't miss data when input driver is used by
multiple applications.
This commit solves this problem by making the files in server and
client be one-to-one.

Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-10-12 08:53:58 +02:00
zhangyuan21
fc9b5e1980 arch_alarm: adjust oneshot/arch_alarm to support tick 2022-10-12 11:55:46 +08:00
zhangyuan21
750007ded9 sched: use tick count for sched timer expiration 2022-10-12 11:55:46 +08:00
Zhe Weng
7225e44725 arch/sim: support multiple tapdev for sim
Support more than one TAP device for debugging (future) NAT and FORWARD, left WPCAP and VPNKit unchanged (force number to 1).
Although we can support at most 31 interfaces, limit to 8 like CONFIG_TUN_NINTERFACES.

Signed-off-by: wengzhe <wengzhe@xiaomi.com>
2022-10-12 01:57:21 +08:00
chao an
bcdd03cdf3 arm/backtrace: rename arm_backtrace_thumb.c to arm_backtrace_sp.c
1. rename arm_backtrace_thumb.c to arm_backtrace_sp.c
2. use EHABI stack unwinder instead of instruction unwind

Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-12 01:55:48 +08:00
chao an
83a3fd9780 newlib/impure: sync with newlib(4.2.0) reent update
arm-none-eabi-ld: nuttx/staging/libc.a(lib_impure.o):(.data.impure_data+0x4): undefined reference to `__sf'
arm-none-eabi-ld: nuttx/staging/libc.a(lib_impure.o):(.data.impure_data+0x8): undefined reference to `__sf'
arm-none-eabi-ld: nuttx/staging/libc.a(lib_impure.o):(.data.impure_data+0xc): undefined reference to `__sf'

Toolchain:
  Version: GNU Arm Embedded Toolchain to Version 11.3.Rel1(August 8, 2022)
  Tar:     arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi.tar.xz

Break change:
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=b0cb9f85ca3626e0e68fd451c3090d253ceb4300

Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-11 18:38:14 +08:00
zhangyuan21
09a06e7fce sem: don't clear waitobj when do sem recover
This commit is intended to solve the bug caused by #7159.
It will fixed data abort issue when task restart in wait sem status.
If delete waitobj in the sem recover function, then we will get the wrong
task list when remove the task from task list.
2022-10-11 16:31:54 +09:00
Brennan Ashton
4ce8cf7bdc bl602/dma: Fix possible call of null pointer to function 2022-10-11 14:34:52 +08:00
Peter Bee
9c7bb9e088 openamp/libmetal: support other arch sim host
Add support for x86, arm and arm64 host. Tested on M2 mac.

Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2022-10-11 14:58:51 +09:00
Gustavo Henrique Nihei
10efe43c4c lcd: Fix npixels parameter in calls to getrun/putrun
It was being passed in number of bytes, but the correct should be the
number of pixels.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-10-11 09:07:28 +08:00
Xiang Xiao
8c80b3d908 sched: Guard backtrace related code correctly
1.Don't include unwind.h when arch specific backtrace is enable
2.Built arch specific backtrace wrapper only when enable

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-11 00:01:35 +02:00
Xiang Xiao
1cd9fa25cd arm/tlsr82xx: Don't select ARCH_HAVE_BACKTRACE
since it's already selected by ARCH_ARM

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-11 00:01:35 +02:00
Fotis Panagiotopoulos
63d00a5fb1 Added Kconfig option for ccache. 2022-10-10 16:12:27 -03:00
chao an
24129e4ba7 arm/backtrace: add support for EHABI(Exception Handling ABI) stack unwinder
Reference:
https://github.com/ARM-software/abi-aa/blob/main/ehabi32/ehabi32.rst
https://github.com/ARM-software/abi-aa/releases/download/2022Q1/ehabi32.pdf

Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-11 03:11:37 +08:00
Jukka Laitinen
e793207bb6 arch/risc-v/src/mpfs: Add a config option for enabling L2 cache
Make a separate config flag for enabling L2 cache. This is on by
default when compiling a standalone/bootloader configuration, but
can also be disabled for special cases, such as memory testing

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-10-11 00:59:48 +08:00
liangchaozhong
cc426f8539 usrsock:add done flag in usrsock_iovec_do
set done to true if all data in iovec array is copied

Signed-off-by: liangchaozhong <liangchaozhong@xiaomi.com>
2022-10-11 00:57:49 +08:00
liangchaozhong
f9a9a02e3e usersock: Add driver with type of rpmsg interface
move usrsock rpmsg driver from userspace to kernel to reduce extra
context switch for usrsock operations

Signed-off-by: liangchaozhong <liangchaozhong@xiaomi.com>
2022-10-11 00:57:49 +08:00
chao an
09bb292fa2 net/igmp: fix build warning on GCC 12.2.0
igmp/igmp_input.c: In function 'igmp_input':
igmp/igmp_input.c:201:31: warning: the comparison will always evaluate as 'false' for the address of 'grpaddr' will never be NULL [-Waddress]
  201 |             if (igmp->grpaddr == 0)
      |                               ^~
In file included from nuttx/include/nuttx/net/netstats.h:67,
                 from igmp/igmp_input.c:53:
nuttx/include/nuttx/net/igmp.h:132:12: note: 'grpaddr' declared here
  132 |   uint16_t grpaddr[2];       /* 32-bit Group address */
      |            ^~~~~~~

Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-11 00:56:13 +08:00
chao an
8e146590a9 net/local: unified formatting name function
fix build warning on GCC 12.2.0

In file included from local/local_fifo.c:25:
In function 'local_hd_name',
    inlined from 'local_open_receiver' at local/local_fifo.c:593:3:
local/local_fifo.c:128:12: warning: '%s' directive output may be truncated writing up to 107 bytes into a region of size 97 [-Wformat-truncation=]
  128 |            CONFIG_NET_LOCAL_VFS_PATH "/%s" LOCAL_HD_SUFFIX, inpath);
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~
local/local_fifo.c: In function 'local_open_receiver':
local/local_fifo.c:128:40: note: format string is defined here
  128 |            CONFIG_NET_LOCAL_VFS_PATH "/%s" LOCAL_HD_SUFFIX, inpath);
      |                                        ^~
In function 'local_hd_name',
    inlined from 'local_open_receiver' at local/local_fifo.c:593:3:
local/local_fifo.c:127:3: note: 'snprintf' output between 15 and 122 bytes into a destination of size 109
  127 |   snprintf(outpath, LOCAL_FULLPATH_LEN - 1,
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  128 |            CONFIG_NET_LOCAL_VFS_PATH "/%s" LOCAL_HD_SUFFIX, inpath);
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: chao an <anchao@xiaomi.com>
2022-10-11 00:53:57 +08:00
wengzhe
6b7fe6ea8e net/ipforward: fix typo in ipv4_dev_forward
f_domain is used to determine protocol family when CONFIG_NET_IPv4 and CONFIG_NET_IPv6 are both defined, but not correctly used in ipv4_dev_forward because of typo (there's not a config named CONFIG_NET_IPv5) which may cause IPv4 packets to be forwarded as IPv6.

Signed-off-by: wengzhe <wengzhe@xiaomi.com>
2022-10-10 19:31:39 +08:00