Commit graph

8065 commits

Author SHA1 Message Date
buxiasen
93a431d19b testing/drivertest: add pm_smp test
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-28 22:51:12 +08:00
buxiasen
7acf0ff314 drivertest_pm: compatible with SMP
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-28 22:51:12 +08:00
liugui
9353bcefa2 skip oneshot timer test
Signed-off-by: liugui <liugui@xiaomi.com>
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-28 22:51:12 +08:00
anjiahao
0b03ca1538 macos:fix sim:module build warning
CP:  /Users/vela/ajh/nuttx/include/nuttx/fs/hostfs.h
CC:  inode/fs_inodebasename.c ar: no archive members specified
usage:  ar -d [-TLsv] archive file ...
        ar -m [-TLsv] archive file ...
        ar -m [-abiTLsv] position archive file ...
        ar -p [-TLsv] archive [file ...]
        ar -q [-cTLsv] archive file ...
        ar -r [-cuTLsv] archive file ...
        ar -r [-abciuTLsv] position archive file ...
        ar -t [-TLsv] archive [file ...]
        ar -x [-ouTLsv] archive [file ...]

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-28 21:27:32 +08:00
Leo Chung
c7a905ec0c apps/system/vi: Add missing vi_release before exit.
If VI exit without vi_release, that broken console.

Signed-off-by: Leo Chung <gewalalb@gmail.com>
2024-10-28 10:10:14 -03:00
Leo Chung
c0e04b0251 termcurses: Disable ICANON for serial driver. That was broken VI editor.
The ICANON flag broken VI key input, so disable it.

Signed-off-by: Leo Chung <gewalalb@gmail.com>
2024-10-28 10:10:14 -03:00
dengwenqi
41bc4f7873 testing/stressapptest: fix: git status --ignore normalization check problem
Signed-off-by: dengwenqi <dengwenqi@xiaomi.com>
2024-10-28 00:40:37 +01:00
haopengxiang
df559f1712 fix: git status/git status --ignore normalization check problem
Signed-off-by: dengwenqi <dengwenqi@xiaomi.com>
2024-10-27 22:30:39 +08:00
zhuanglin
5b2397b595 testing/fatutf8:fix Out of bounds writing
Signed-off-by: zhuanglin <zhuanglin@xiaomi.com>
2024-10-27 22:30:39 +08:00
makejian
84292d5013 mbedtls: compile warning fix
- apps/crypto/openssl_mbedtls_wrapper/mbedtls/err.c
- apps/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c

Signed-off-by: makejian <makejian@xiaomi.com>
2024-10-27 20:57:11 +08:00
xuxin19
597c701518 cmake:add openssl_mbedtls_wrapper cmake build support
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-10-27 20:57:11 +08:00
makejian
fbcc320321 openssl_mbedtls_wrapper: Implement SHA1 Interface
Signed-off-by: makejian <makejian@xiaomi.com>
2024-10-27 20:57:11 +08:00
makejian
42e0e4c6b2 openssl_mbedtls_wrapper: support X509_new()
Signed-off-by: makejian <makejian@xiaomi.com>
2024-10-27 20:57:11 +08:00
cuiziwei
6721ae3555 fix build warning.
CC:  vfs/fs_lseek.c /home/cuiziwei/vela/happy/apps/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c: In function ‘HMAC_CTX_new’:
/home/cuiziwei/vela/happy/apps/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c:57:31: warning: implicit declaration of function ‘malloc’ [-Wimplicit-function-declaration]
   57 |       (mbedtls_md_context_t *)malloc(sizeof(mbedtls_md_context_t));
      |                               ^~~~~~
/home/cuiziwei/vela/happy/apps/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c:28:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’
   27 | #include <mbedtls/hmac_drbg.h>
  +++ |+#include <stdlib.h>
   28 | #include <mbedtls/md.h>
/home/cuiziwei/vela/happy/apps/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c:57:31: warning: incompatible implicit declaration of built-in function ‘malloc’ [-Wbuiltin-declaration-mismatch]
   57 |       (mbedtls_md_context_t *)malloc(sizeof(mbedtls_md_context_t));
      |                               ^~~~~~
/home/cuiziwei/vela/happy/apps/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c:57:31: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’
/home/cuiziwei/vela/happy/apps/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c: In function ‘HMAC_CTX_free’:
/home/cuiziwei/vela/happy/apps/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c:126:3: warning: implicit declaration of function ‘free’ [-Wimplicit-function-declaration]
  126 |   free(ctx);
      |   ^~~~
/home/cuiziwei/vela/happy/apps/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c:126:3: note: include ‘<stdlib.h>’ or provide a declaration of ‘free’
/home/cuiziwei/vela/happy/apps/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c:126:3: warning: incompatible implicit declaration of built-in function ‘free’ [-Wbuiltin-declaration-mismatch]
/home/cuiziwei/vela/happy/apps/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c:126:3: note: include ‘<stdlib.h>’ or provide a declaration of ‘free’

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-27 20:57:11 +08:00
makejian
f7582e34e5 openssl_mbedtls_wrapper: add ssl wrapper from libwebsockets
Signed-off-by: makejian <makejian@xiaomi.com>
2024-10-27 20:57:11 +08:00
yanghuatao
f1ace3774f apps/crypto: Add project openssl_mbedtls_wrapper
Add openssl mbedtls wrapper project

Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
2024-10-27 20:57:11 +08:00
ligd
da83750cd3 netutils: fix compile error when not defined CONFIG_NET_ETHERNET
/home/ligd/platform/dev/apps/netutils/netlib/netlib_obtainipv4addr.c:117: undefined reference to `netlib_getmacaddr'

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-27 20:03:43 +08:00
Xiang Xiao
f8341ab94d Replace getrandom with arc4random_buf to simplify the usage
and follow the kernel side change:
https://github.com/apache/nuttx/pull/14509

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-27 20:03:14 +08:00
Xiang Xiao
e8497e5355 system/libuv: Sync CMakeLists.txt with Makefile
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-27 20:02:07 +08:00
Huang Qi
f9c6e18693 libuv: Don't select PIPES implicitly
To avoid introducing unexpected dependencies,
we should not select any feature implicitly.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-10-27 20:02:07 +08:00
Huang Qi
713cd4d971 libuv: Make stream read buffer size configurable
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-10-27 20:02:07 +08:00
zhangchao53
1ddeaa1468 testing/cmocka: shuffling test sequence and pass seed arg
Signed-off-by: zhangchao53 <zhangchao53@xiaomi.com>
2024-10-27 20:01:51 +08:00
raiden00pl
71d26a5dd1 canutils: change dependency from GPL to BSD
socketCAN utils are dual licence, there is no point in using
GPL licence when we can use BSD.

Also change `select CANUTILS_LIBCANUTILS` to `depends on CANUTILS_LIBCANUTILS`.
We can't `select` that option when `ALLOW_BSD_COMPONENTS` is not set.
2024-10-27 19:46:28 +08:00
zhanghongyu
8b15b267a3 matter: add Kconfig option to control logging
Logs have a great impact on image size, so whether to print logs is
modified as a compilation option and controlled by Kconfig

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-10-27 19:45:17 +08:00
renzhiyuan1
f1501c56d3 cmake:add ruy CMake build
Signed-off-by: renzhiyuan1 <renzhiyuan1@xiaomi.com>
2024-10-27 18:12:54 +08:00
renzhiyuan1
b694cbb848 cmake:add gemmlowp CMake build
Signed-off-by: renzhiyuan1 <renzhiyuan1@xiaomi.com>
2024-10-27 18:12:54 +08:00
renzhiyuan1
2074d04f62 cmake:add kissfft CMake build
Signed-off-by: renzhiyuan1 <renzhiyuan1@xiaomi.com>
2024-10-27 18:12:54 +08:00
dengwenqi
f7ff338a7b fix: git status/git status --ignore normalization check problem 2024-10-27 18:12:54 +08:00
zhanghongyu
429befe1ed examples/netpkt: add ethercat test example for robot
add a simple example to test ethercat's sending and receiving

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-10-27 15:59:14 +08:00
xuxingliang
28c3c05c28 example/libtest: add malloc/free to libtest
So we can verify flags like kasan are effective or not.

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-10-27 15:05:36 +08:00
Neo Xu
c4b6fd77be lvgldemo: allow to customize input dev path
Default to /dev/input0, now it's configurable.

Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-27 14:05:37 +08:00
xuxin19
b4c2e6bf46 build(bugfix):remove unused cmake scrpits
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-10-27 14:05:17 +08:00
xuxin19
55a955234a cmake:add system gprof CMake build
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-10-27 14:05:06 +08:00
renzhiyuan1
469cc11406 cmake:add flatbuffers CMake build
Signed-off-by: renzhiyuan1 <renzhiyuan1@xiaomi.com>
2024-10-27 14:05:06 +08:00
Petro Karashchenko
7f7bbe236d examples/mqttc: add option to use MBED TLS for connections
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-10-26 19:11:55 -03:00
liuwei35
3e54ea0aae fix compile warning for fsutils inifile.c
Signed-off-by: liuwei35 <liuwei35@xiaomi.com>
2024-10-26 23:08:53 +02:00
Neo Xu
0109ab39ec lvgldemo: should use nuttx_deinit to free all resources
Memory leak can be detected when simply change the while(1) loop to exit. The lv_nuttx_deinit will free resources including display, input etc.

Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-26 21:33:00 +08:00
Neo Xu
1506c6f54d lvgl: upgrade to release/v9.2.1
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-25 09:27:15 +02:00
zhanghongyu
2ff75e32e9 netutils/connectedhomeip: use CONFIG_CXX_STANDARD instead of hard code
as c++ versions are upgraded, hard code compilation options can
cause build error

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-10-24 19:57:59 +08:00
Lup Yuen Lee
b6fb787669 CI: Enable sim-02 build when we create or update a Complex PR
CI Build Job sim-02 was disabled to reduce our usage of GitHub Runners, to comply with ASF Policy: https://github.com/apache/nuttx/issues/14376#issuecomment-2427837859

However this causes the Scheduled Merge Job to fail, due to reduced CI Checks: https://github.com/NuttX/nuttx/actions/runs/11490041505/job/31980056690#step:7:465

This PR re-enables sim-02 when we create or update a Complex PR.
2024-10-24 09:28:08 +07:00
Felipe Moura
f517b66d60 examples/spislv_test: Added app that allows users to test SPI Slave comm
This application continuously reads the file system of the spislv. Each received message will be written to the user in hexadecimal form, and the same received data will be sent back. In this way, the user can test if their spislv driver and hardware setup are working properly before proceeding further.

On a master device, using the SPI tool, when sending the message: spi exch -x 4 deadbeef

The slave device will output:
Slave: 4 Bytes read
 Value in hex form from /dev/spislv2: de ad be ef
Slave: Writing value back to /dev/spislv2
2024-10-22 18:41:12 +02:00
wangmingrong1
a7a03a9e5a kasantest: Add some tests for legitimate and illegitimate operations of memory APIs
1. By printing the results, you can know which libc memory APIs in the
current system support kasan check; for examples:
KASan Test: heap underflow -> PASS
KASan Test: heap overflow -> PASS
KASan Test: heap use after free -> PASS
KASan Test: heap invalid free -> PASS
KASan Test: heap double free -> PASS
KASan Test: heap poison -> PASS
KASan Test: heap unpoison -> PASS
KASan Test: heap illegal memchr -> PASS
KASan Test: heap illegal memcpy -> PASS
KASan Test: heap illegal memcmp -> PASS
KASan Test: heap illegal memmove -> PASS
KASan Test: heap illegal memset -> PASS
KASan Test: heap illegal strcmp -> PASS
KASan Test: heap illegal strcpy -> PASS
KASan Test: heap illegal strlen -> FAIL
KASan Test: heap illegal strncpy -> FAIL
KASan Test: heap illegal strchr -> PASS
KASan Test: heap illegal strncmp -> PASS
KASan Test: heap illegal strnlen -> FAIL
KASan Test: heap illegal strrchr -> PASS
KASan Test: heap legal memchr -> PASS
KASan Test: heap legal memcpy -> PASS
KASan Test: heap legal memcmp -> PASS
KASan Test: heap legal memmove -> PASS
KASan Test: heap legal memset -> PASS
KASan Test: heap legal strcmp -> PASS
KASan Test: heap legal strlen -> PASS
KASan Test: heap legal strlen -> PASS
KASan Test: heap legal strncpy -> PASS
KASan Test: heap legal strchr -> PASS
KASan Test: heap legal strncmp -> PASS
KASan Test: heap legal strnlen -> PASS
KASan Test: heap legal strrchr -> PASS
KASan Test: globals underflow -> PASS
KASan Test: globals overflow -> PASS

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-22 23:14:50 +08:00
simbit18
abcfd74c19 ISSUE_TEMPLATE: fix missing labels
Not all labels are added because there is no match with the label name.

issue_labeler.yml
os: Linux -> os: linux

001_bug_report.yml
Type: bug -> Type: Bug
Corrected label in links

002_feature_request.yml
Type: enhancement -> Type: Enhancement
Corrected label in links

003_help.yml
Type: question -> Community: Question
Corrected label in links
2024-10-22 23:14:15 +08:00
Lup Yuen Lee
1cb45b0d1c CI: Split the targets in sim-01 and add sim-03
This PR syncs the Simulator Targets `sim-01`, `sim-02`, `sim-03` from `nuttx` repo to `nuttx-apps`: https://github.com/apache/nuttx/pull/14428
2024-10-22 08:47:07 +08:00
buxiasen
790be6d639 nshlib/nsh_parse: use sh -c replace pthread detach when nsh background.
pthread & detach will still quit when parent task exit,
cause nsh_parse clone args leak. nsh should use task instead of thread

this case can reproduce the memory leak.
int main(int argc, FAR char *argv[])
{
  printf("Hello, World!!\n");
  system("sleep 1 &");
  return 0;
}

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-22 00:04:09 +08:00
Lup Yuen Lee
ec458f0ec7 CI: Build only Arm32 Targets arm-01 / 03 / 05 / 06 / 07 / 09 / 11 for Complex PRs
This PR updates the Build Rules `arch.yml` to build only these Arm32 Targets when we create or update a Complex PR:
- arm-01, arm-03, arm-05, arm-06, arm-07, arm-09, arm-11

No changes for Simple PRs (arm-01 to arm-14) and for Merging PRs (also arm-01 to arm-14).

This will improve our breadth of CI Checks across Arm32 Targets, as explained here: https://github.com/apache/nuttx/issues/14376
2024-10-21 05:53:04 +07:00
Lup Yuen Lee
52a50ea72a CI: Split the Build Jobs for Arm64 and x86_64
This PR syncs https://github.com/apache/nuttx/pull/14282 from `nuttx` repo to `nuttx-apps`.
2024-10-20 16:19:10 +08:00
cuiziwei
729cc337a1 libuv: Remove GCCVER redefinition
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-19 18:55:01 +08:00
wangjianyu3
e5a1bb1796 nshlib/dd: Add support for reading from/writing to standard input/output
Test
  1. Input from stdin and output to stdout
       Keyboard input: 12345AAAAABBBBB
    nsh> dd bs=5
    1234512345AAAAAAAAAABBBBBBBBBB

  2. Input from file and output to stdout
    nsh> dd if=/etc/init.d/rc.sysinit
    mkrd -m 2 -s 512 1024
    mkfatfs /dev/ram2
    mount -t vfat /dev/ram2 "/tmp"

  3. Input from stdin and output to file
       Keyboard input: QWERT
    dd of=/data/dd_stdout bs=5

    Then, cat the output file in host (based on HostFS):
    $ cat ./dd_stdout
    QWERT

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-10-19 14:07:32 +08:00
Lup Yuen Lee
a799c3e805 CI: Skip half of RISC-V, Xtensa and Simulator targets when a Complex PR is created / updated
When we submit or update a Complex PR that affects All Architectures (Arm, RISC-V, Xtensa, etc): CI Workflow shall run only half the jobs for RISC-V, Xtensa and Simulator:
- `risc-v-01` to `03`
- `xtensa-01`
- `sim-01`

When the Complex PR is Merged: CI Workflow will still run all jobs for RISC-V, Xtensa and Simulator:
- `risc-v-01` to `06`
- `xtensa-01` to `02`
- `sim-01` to `02`

Simple PRs with One Single Arch / Board will build the same way as before:
- `risc-v-01` to `06`
- `xtensa-01` to `02`
- `sim-01` to `02`

We hope to lower drastically our usage of GitHub Runners before the ASF Deadline, as explained here: https://github.com/apache/nuttx/issues/14376
2024-10-19 06:57:33 +07:00