Commit Graph

6995 Commits

Author SHA1 Message Date
makejian
558450f0ab mbedtls: add hardware entropy source via /dev/random
add hardware entropy from /dev/random
Signed-off-by: makejian <makejian@xiaomi.com>
2023-08-11 18:13:11 +08:00
makejian
4e016e2260 mbedtls: add nuttx crypto alternative implementation in mbedtls
(1)add dev_alt to manage /dev/crypto
(2)add sha_alt to alternate sha1 algorithm
(3)use new mbedtls_config.h to admin configs of mbedtls
Signed-off-by: makejian <makejian@xiaomi.com>
2023-08-11 18:13:11 +08:00
makejian
fcbf7cc1aa testing/crypto: add md5/sha1/sha256/sha512 testcases
add hash test cases to test the support for the hash algorithm in crypto device
Signed-off-by: makejian <makejian@xiaomi.com>
2023-08-11 18:13:11 +08:00
zhangchao53
f1154b5be2 Memory leaks can be checked using cmocka
Signed-off-by: zhangchao53 <zhangchao53@xiaomi.com>
2023-08-11 18:09:40 +08:00
zhangchao53
d3d704fddb porting libtomcrypt tests cases,update make config.
Signed-off-by: zhangchao53 <zhangchao53@xiaomi.com>
2023-08-11 15:57:59 +08:00
ligd
12a2e14a83 example/poll: add delay for poll testcase
for should setup the fifo firstly

Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-08-11 15:35:06 +08:00
yinshengkai
bdc522bad7 trace: move trace_dump to noteram
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-08-11 13:52:12 +08:00
yinshengkai
95b0515c30 trace: unify ftrace and atrace output formats
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-08-11 13:52:12 +08:00
xucheng5
c7955e5faf drivertest/adc : support cmocka_driver_adc
Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
2023-08-11 13:51:30 +08:00
Xiang Xiao
d420036cbc testing/drivertest: Fix typo error in drivertest_uart.c
Made by:
commit 5659906fdfdac0a363aecb329c39c936324dcc55
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Fri Mar 24 12:02:04 2023 -0600

    Changes to apps needed by nutts PR 8885

    needby:965551

    ostest contains some logic that depends on internal implementation of signal sets and ostest must be updated to match those changes.

    There is no particular impact from this PR.  This PR is the result of impact from nuttx 8885.

    Tested with nuttx 8885

    Change-Id: I2550888ee29aadcfcf8a98bfe5690920ee2b17d1

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-11 13:50:55 +08:00
fengxuesong
fad26cb3ae Add function is missing FAR
Signed-off-by: fengxuesong <fengxuesong@xiaomi.com>
2023-08-11 13:50:38 +08:00
yangsen5
78792120cd nxcamera: Solve compilation errors caused by type mismatch
CC:  nxcamera.c nxcamera.c: In function 'show_image':
nxcamera.c:85:20: error: initialization of 'uint32_t *' {aka 'unsigned int *'} from incompatible pointer type 'uint8_t *' {aka 'unsigned char *'} [-Werror=incompatible-pointer-types]
   85 |   uint32_t *pbuf = pcam->bufs[buf->index];
      |                    ^~~~
cc1: all warnings being treated as errors

Signed-off-by: yangsen5 <yangsen5@xiaomi.com>
2023-08-11 13:50:28 +08:00
dulibo1
3c674fb4d8 add test case for regulator
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2023-08-11 00:45:16 +08:00
yinshengkai
d090da6b91 examples/watcher: get the thread name using pthread_getname_np
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-08-10 22:50:58 +08:00
dulibo1
6534f3d87c add batterydump tool for dump the battery info
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2023-08-10 20:44:03 +08:00
yangguangcai
5c6ffe1a4d drivertest:fix timer testcase
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2023-08-10 20:41:05 +08:00
yangguangcai
1dc7845c06 drivertest/timer:test interface getstatus.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2023-08-10 20:41:05 +08:00
yangguangcai
ffebcfbb9f testing/drivertest:fix variable may be negative
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2023-08-10 20:41:05 +08:00
liaoao
126faafb6e fdttools: add fdt utility tools
Signed-off-by: liaoao <liaoao@xiaomi.com>
2023-08-10 20:39:11 +08:00
rongyichang
9abb0a2592 apps/testing: support alignment for lcd driver test
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2023-08-10 20:36:36 +08:00
rongyichang
6d11e1e7e2 drivertest/lcd: fix draw area calc error in LCD rect
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2023-08-10 20:36:36 +08:00
rongyichang
694fbd2f77 apps/testing : correct the dependency option of fb driver test
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2023-08-10 20:36:36 +08:00
rongyichang
49f81d387a apps/testing/driver_test:fix warning
drivertest_lcd.c:234:12: warning: assignment to 'uint16_t *' {aka 'short unsigned int *'} from incompatible pointer type 'uint8_t *' {aka 'unsigned char *'} [-Wincompatible-pointer-types]

Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2023-08-10 20:36:36 +08:00
rongyichang
b2d3fb726d testing/drivertest:add testcase for LCD driver
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2023-08-10 20:36:36 +08:00
rongyichang
7c18361faf testing/drivertest:add testcase for framebuffer driver
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2023-08-10 20:36:36 +08:00
yangguangcai
3717ce2094 watchdog:input watchdog deviation.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2023-08-10 20:34:47 +08:00
yangguangcai
16872c582c test/watchdog:call board_ioctl from board_reset_cause.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2023-08-10 20:34:47 +08:00
yangguangcai
d4b202ec7e test/watchdog:test interface getstatus.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2023-08-10 20:34:47 +08:00
yangguangcai
76dff2b924 watchdog:test watchdog not depend on fs.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2023-08-10 20:34:47 +08:00
anjiahao
79e481d093 resetcause:show reset string not number
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-08-10 13:51:43 +08:00
Huang Qi
712d008f66 tools: Using math.h from NuttX for wasm build
wasm clang can't find math.h if using libm from toolchain.

It's OK to using math.h from NuttX since only declaration is needed for wasm build.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-08-10 12:14:03 +08:00
xuxin19
8e71885ee5 Enhance Makefile to avoid "Argument list too long"
define a macro for split long variable and redefine variable in batch.
see details in `apps/Make.defs` `SPLITVARIABLE`.
replace the variable reference that caused the error.

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-08-10 11:16:07 +08:00
jinxudong
6bea926ef2 sensor: add force sensor
A sensor of this type measures the force on it, and additionally
compares the force with one or more specified thresholds. The sensor
can output the force value directly. Moreover, it's usually applied
as a press key. In that case, when it detects a force greater than
some given threshold, a corresponding event is reported.

Signed-off-by: jinxudong <jinxudong@xiaomi.com>
2023-08-10 03:33:22 +08:00
haopengxiang
aa38c44b3b testing/unity: adjust unity download pack to 'Unity'
Signed-off-by: haopengxiang <haopengxiang@xiaomi.com>
2023-08-10 03:33:12 +08:00
haopengxiang
bdedf648c5 uorb/topics: update delicated match of listener topics
bug: if user input obr_topic is sensor_gps_sate(wrong topic, which does not exist), the using of `strncmp` will assign idx=8 (as sesnor_gps) in the first.

However, there is no match in the `g_sensor_list`, hence idx=8 will give  out value of `sensor_gps` as output(wrong).

Change: This update aims to match the whole value of sensor name in `g_sensor_list`, while keeping `sensor_name+number` match in this condition.

Signed-off-by: haopengxiang <haopengxiang@xiaomi.com>
2023-08-10 02:01:09 +08:00
haopengxiang
6b5038ef7a uorb/sensor/gps: fix uorinfo_raw print error
[   15.979300] [24] [  INFO] [ap] sensor_gps_satellite: timestamp: 15979200 (100 us ago)
[   15.979400] [24] [  INFO] [ap] sensor_gps_satellite: number:0 svid: 13elevation: 54azimuth: 253 snr: 0
[   15.979600] [24] [  INFO] [ap] sensor_gps_satellite: number:1 svid: 21elevation: 43azimuth: 77 snr: 0
[   15.979700] [24] [  INFO] [ap] sensor_gps_satellite: number:2 svid: 22elevation: 9azimuth: 35 snr: 0
[   15.979800] [24] [  INFO] [ap] sensor_gps_satellite: number:3 svid: 23elevation: 23azimuth: 268 snr: 0

Signed-off-by: haopengxiang <haopengxiang@xiaomi.com>
2023-08-10 02:01:09 +08:00
jinxiuxu
4f7abe0231 apps/testing/drivertest:add audio drivertest
Signed-off-by: jinxiuxu <jinxiuxu@xiaomi.com>
2023-08-10 00:51:07 +08:00
zhangyuan21
7dcb0c79c3 adb: add adb log level
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-08-10 00:50:50 +08:00
simbit18
2e98005608 crypto: Fix Kconfig style
Replace help => ---help---
Add comments
2023-08-09 19:24:17 +03:00
yangguangcai
41388daf74 rtc test:add delay after set time.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2023-08-09 23:47:09 +08:00
yangguangcai
768ce91296 drivertest/rtc:input rtc alarm deviation.
Some vendor hardware precision cannot meet the requirements,
and the deviation needs to be input at this time.

Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2023-08-09 23:47:09 +08:00
yangguangcai
0c8579151f drivertest/rtc:fix rtc testcase.
deviation from (-10,0) to (-10,10)

Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2023-08-09 23:47:09 +08:00
yangguangcai
cd802f6a8f drivertest/rtc:add test case.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2023-08-09 23:47:09 +08:00
yangguangcai
89ad9c6527 test/drivertest:fix rtc settime incorrect.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2023-08-09 23:47:09 +08:00
xuxin19
24319beed3 cmake:migrate apps CMakeLists for canutils
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-08-09 23:46:21 +08:00
makejian
6cd890e843 testing/crypto: add configs of crypto testing cases
crypto testing cases managed by respective config

Signed-off-by: makejian <makejian@xiaomi.com>
2023-08-09 21:37:36 +08:00
chenxiaoyi
0c6016475b system: dd: add standalone dd command
enabling SYSTEM_DD will disable nsh_dd by selecting NSH_DISABLE_DD

Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
2023-08-09 20:59:40 +08:00
shipei
b63c56cefa audio:Resolve compilation errors in nxplayer/nxrecorder/nxlooper on ARM64 architecture
resolve compilation errors: '%0lx' directive output may be truncated
writing between 1 and 16 bytes into a region of size 11 [-Werror=format-truncation=]

Signed-off-by: shipei <shipei@xiaomi.com>
2023-08-09 20:59:19 +08:00
yangsen5
4d2fb8a6cf nxcamera: Add logic to convert to rgb565
Since the current fb display format of vela qemu is rgb565, it is necessary to convert the frame obtained by v4l2 to rgb565

Signed-off-by: yangsen5 <yangsen5@xiaomi.com>
2023-08-09 18:22:39 +08:00
yinshengkai
105fd2aac5 nsh: fix a buffer overflow in help
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-08-09 18:22:09 +08:00