10427 Commits

Author SHA1 Message Date
openvela-robot
25125c8cb6 update .github
Some checks failed
Close stale issues and PR / stale (push) Has been cancelled
dev_20250801
2025-07-23 10:49:48 +08:00
openvela-robot
edab47a1b1 update .github
Some checks failed
Close stale issues and PR / stale (push) Has been cancelled
2025-07-23 00:25:25 +08:00
wangjianyu3
0a723ddb48 system/fastboot: add support for fastboot tcp
Add TCP network transport support for fastboot, users can
add "-s tcp:HOST[:PORT]" option to specify a network device.

Examples

  fastboot -s tcp:192.168.100.2 getvar version
  fastboot -s tcp:192.168.100.2 flash virtblk0 fastboot.c
  fastboot -s tcp:192.168.100.2 oem shell "uname -a"

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-07-22 16:20:52 +08:00
wangjianyu3
ba97265c13 system/fastboot: add func for context and usbdev
fastboot_context_initialize : initialize fastboot context
fastboot_context_deinit     : deinitialize fastboot context
fastboot_usbdev_initialize  : initialize usbdev and open USB endpoint
fastboot_usbdev_deinit      : close USB endpoint

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-07-22 16:20:52 +08:00
wangjianyu3
1871dc8448 system/fastboot: replace GETUINT32 with be32toh
Replace macro `FASTBOOT_GETUINT32` with function `be32toh()`.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-07-22 16:20:52 +08:00
wangjianyu3
3c8d3d9acf system/fastboot: add const for memdump_print_t
Add qualifier "const" to the declaration of `memdump_print_t`,
the value of the 2nd argument will not be changed.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-07-22 16:20:52 +08:00
wangjianyu3
722758959d system/fastboot: move usbdev init after help
Move initialization of usbdev to after help().

This patch fix that even users just run `fastbootd -h`,
the usbdev will also be (re)initialized,
and if the daemon is running the status will be broken.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-07-22 16:20:52 +08:00
wangjianyu3
2a59b2bbb7 nshlib/md5: Support reading from standard input
Sometimes users may want to calculate the MD5 of part of a file(e.g. check
partition contents for debug after flashing, size of which may be greater
than image). This can be done with the "dd" command and pipes, the "md5"
command just needs to support reading from standard input. For example:
`dd if=/dev/virtblk0 bs=512 count=1 | md5`.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-07-22 16:18:08 +08:00
Tang Meng
b8a6656f9a examples/i2schar: fix spelling mistakes
Some checks failed
Close stale issues and PR / stale (push) Has been cancelled
2025-06-27 19:17:19 +08:00
wangjianyu3
39f26dbe99 system/fastboot: dump all memory regions
Some checks failed
Close stale issues and PR / stale (push) Has been cancelled
Add examples for oem memdump dumping all memory regions.

Host side

  $ fastboot oem memdump
  fastboot oem memdump 0x20000 0x28000
  fastboot get_staged 0x20000.bin
  fastboot oem memdump 0x40000000 0xf590000
  fastboot get_staged 0x40000000.bin
  fastboot oem memdump 0x4ff30000 0xd0000
  fastboot get_staged 0x4ff30000.bin
  FAILED (remote: 'Invalid argument')
  fastboot: error: Command failed

Device side

  nsh> fastbootd -h
  Usage: fastbootd [wait_ms]

  memdump:
      fastboot oem memdump 0x20000 0x28000
      fastboot get_staged 0x20000.bin
      fastboot oem memdump 0x40000000 0xf590000
      fastboot get_staged 0x40000000.bin
      fastboot oem memdump 0x4ff30000 0xd0000
      fastboot get_staged 0x4ff30000.bin

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-06-15 00:15:22 +08:00
openvela-robot
c9813ce536 workflows add stale.yml
Some checks failed
Close stale issues and PR / stale (push) Has been cancelled
2025-05-06 16:46:34 +08:00
wangjianyu3
69e9348438 system/fastboot: Add prefix "SYSTEM" for USB boardctl configuration
- FASTBOOTD_USB_BOARDCTL
  + SYSTEM_FASTBOOTD_USB_BOARDCTL

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-03-27 02:34:29 +08:00
wangjianyu3
c9158a851e system/fastboot: Add support for fastboot oem shell
To support executing custom commands.

Usage

  fastboot oem shell <command>

Tests

  # Configuration "esp32s3-devkit:fastboot" with `SYSTEM_FASTBOOTD_SHELL` enabled

  $ fastboot --version
  fastboot version 35.0.2-12147458

  $ fastboot oem shell ls /FILE_NOT_EXISTS
  FAILED (remote: 'error detected 0xff00 4')
  fastboot: error: Command failed

  $ fastboot oem shell ps
    PID GROUP PRI POLICY   TYPE    NPX STATE    EVENT     SIGMASK            STACK COMMAND
      0     0   0 FIFO     Kthread   - Ready              0000000000000000 0003056 Idle_Task
      1     0 224 RR       Kthread   - Waiting  Semaphore 0000000000000000 0001976 hpwork 0x3fc8bd50 0x3fc8bd80
      2     2 100 RR       Task      - Waiting  Semaphore 0000000000000000 0004048 nsh_main
      3     3 100 RR       Task      - Ready              0000000000000000 0001992 fastbootd
      4     4 100 RR       Task      - Running            0000000000000000 0001992 popen -c ps
  OKAY [  0.010s]
  Finished. Total time: 0.010s

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-03-27 02:34:29 +08:00
wangjianyu3
064bfb36f1 system/fastboot: Add format string support for fastboot_fail()
Add support for producing output according to a format like printf().

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-03-27 02:34:29 +08:00
buxiasen
1ab6443099 kernel/syscall: fix required INET may case no support
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2025-03-05 10:19:13 +08:00
tengshuangshuang
008b7a904d testing: specify arch format Kconfig
Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
2025-03-04 21:25:47 +08:00
tengshuangshuang
c7fe13def6 testing:specify sched kconfig
Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
2025-03-04 21:25:23 +08:00
tengshuangshuang
5fc847cd1f test:clean driver_audio_test (void *) cast
Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
2025-03-04 21:25:00 +08:00
tengshuangshuang
8405caf405 test:driver_audio bug fix
Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
2025-03-03 16:02:34 +08:00
chenrun1
a95e169086 ostest:Fix the issue that nxevent pthread was not executed, causing case failed
Summary:
  In the case of complex business and slow overall system response (such as when MM_KASAN is turned on), the nxevent case work thread will not be executed and will be switched back to the main thread, so that the event does not get the expected result and the case fails.
By adjusting the thread priority, the work thread can be scheduled to avoid the expected result failure

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2025-02-27 18:11:55 +08:00
chenrun1
25fa91999a examples/romfs:add EXAMPLES_ROMFS_RAMDEVNO
Summary:
  add EXAMPLES_ROMFS_RAMDEVNO for custom initliaze ramdisk number

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2025-02-27 18:11:36 +08:00
chenrun1
4f4690ecb6 scanftest:need enable CONFIG_LIBC_SCANSET
Summary:
"",
        instead of
"   ",
        to the first argument.

Test #29 returned 0 instead of 1.
Test #29 assigned
"",
        instead of
"  q",
        to the first argument.

Test #30 returned 0 instead of 2.
Test #30 assigned
"",
        instead of
"  ",
        to the first argument.

Test #30 assigned
"",
        instead of
"Q",
        to the second argument.

Test #31 returned 0 instead of 2.
Test #31 assigned
"",
        instead of
"qwerty-",
        to the first argument.

Test #31 assigned
"",
        instead of
"QWERTY-",
        to the second argument.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2025-02-27 18:11:19 +08:00
chenrun1
e681cdd9e0 osperf.c:fix warning maybe-uninitialized
Summary:
In function 'performance_gettime',
    inlined from 'hpwork_performance' at osperf.c:245:10:
osperf.c:123:3: error: 'result.end' may be used uninitialized [-Werror=maybe-uninitialized]
  123 |   up_perf_convert(result->end - result->start, &ts);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
osperf.c: In function 'hpwork_performance':
osperf.c:228:29: note: 'result.end' was declared here
  228 |   struct performance_time_s result;
      |                             ^~~~~~
CC:  audio/lib_buffer.c
CC:  common/arm64_initialize.c
CC:  builtin/lib_builtin_getname.c

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2025-02-27 18:08:41 +08:00
chenrun1
4d5536bf97 apps:Add depends to different test cases
Summary:
  1.ftpd
  2.unionfs
  3.userfs
  4.nxffs
  5.smart

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2025-02-27 18:08:10 +08:00
mazhuang
41fb07e975 ivshmem uio:add apps to check ivshmem write/read/poll func
Signed-off-by: mazhuang <mazhuang@xiaomi.com>
2025-02-27 00:42:31 +08:00
mazhuang
c6154e86a7 apps:add rpmsg_test syscmd
Signed-off-by: mazhuang <mazhuang@xiaomi.com>
2025-02-27 00:41:26 +08:00
zhangshuai39
344102ea28 apps/netutils: Modify the MQTT compilation file to enable MQTT testing
Signed-off-by: zhangshuai39 <zhangshuai39@xiaomi.com>
2025-02-25 20:52:48 +08:00
liaozhiwei
fe8a3b991c Build the quickjs unit test framework by generating a ROMFS image
Signed-off-by: liaozhiwei <liaozhiwei@xiaomi.com>
2025-02-25 20:12:57 +08:00
wangzhi16
4e964703e0 Solve static checking problems.
The code detection tool thinks that when if (pos != NULL) is false, that is, when pos is null, the strchr(pos, ',') operation will be performed on pos, causing a null pointer error, for example:

line 226: if (*pos != '\0')     when pos is null.
line 236: pos = strchrnul(pos, ',');    Dereference of a null pointer.

However,  this will not happen, because the configuration condition(line 234) will be judged first. If pos is null, line 236 will not be executed.

SOLUTION:
Use strchrnul to replace strchr. Even if no characters are matched, a null pointer will not be returned, thus avoiding incorrect judgment by code detection tools.

Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
2025-02-25 20:12:32 +08:00
wenlingyun1
2ca8f1c0f8 wasm toolchain: add --enable-gc to wamrc if GC enabled
Signed-off-by: wenlingyun1 <wenlingyun1@xiaomi.com>
2025-02-20 23:49:17 +08:00
wenlingyun1
003044a7b2 update quickjs patch for cmake compilation 2025-01-24 17:06:25 +08:00
wenlingyun1
d3e5e502fb add CMakeLists.txt for quickjs 2025-01-24 17:06:25 +08:00
xuxingliang
7ea9b9047c system/coredump: fix core file size mismatch
Write exactly the same data size to core file.

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2025-01-23 23:32:51 +08:00
zhuanglin
7552b8c91d tools:Remove the --param compilation option 2025-01-22 20:51:37 +08:00
zhangwenjian
63ba5914b7 If file name too long,can show next dir and no error info 2025-01-18 23:12:59 +08:00
wangjianyu3
d139947edc apps/nshlib: Remove the deprecated config NSH_LINELEN
NSH_LINELEN is replaced by POSIX standard LINE_MAX.

https://github.com/apache/nuttx/pull/15541
https://github.com/apache/nuttx-apps/pull/2943

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-01-18 22:58:32 +08:00
Xiang Xiao
73ade86c6f tools: Remove the unused mkwamrglue.py. 2025-01-17 00:19:11 +08:00
liuhongchao
44378c48ce drivertest: release fd resources.
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2025-01-17 00:18:58 +08:00
wangjianyu3
86e7e17792 nshlib/nsh_parse: Closing fds opened for redirection if necessary
Coverity Log

  CID 1612743: (#1 of 1): Resource leak (RESOURCE_LEAK)
  12. leaked_handle: The handle variable fd_out goes out of scope and leaks the handle.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-01-17 00:18:41 +08:00
wangjianyu3
8dac325a6a apps/nshlib: Save result and return ERROR if lib_get_tempbuffer() fails
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-01-17 00:18:41 +08:00
wangjianyu3
31be246b63 apps/nshlib: Using lib_get_tempbuffer() to save stack space
Comparison

  Config: "esp32s3-devkit:adb" with `CONFIG_LINE_MAX=512`

  Test CMD: `ls | cat | cat | cat`

  Without this patch

    |                | Before Test CMD | After Test CMD  |
    |---------------:|----------------:|----------------:|
    | nsh_main.STACK | 0002624/0008096 | 0002624/0008096 |
    |       sh.STACK | 0003360/0004008 | 0003360/0004008 |
    |     Free/Total |   355288/403116 |   355288/403116 |

  With this patch

    |                | Before Test CMD | After Test CMD  |
    |---------------:|----------------:|----------------:|
    | nsh_main.STACK | 0001616/0008096 | 0001616/0008096 |
    |       sh.STACK | 0002352/0004008 | 0002352/0004008 |
    |     Free/Total |   355288/403116 |   354760/403116 |

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-01-17 00:18:41 +08:00
wangjianyu3
d04dca42c4 apps/nshlib: replace CONFIG_NSH_LINELEN to LINE_MAX
LINE_MAX: https://github.com/apache/nuttx/pull/15344

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-01-17 00:18:41 +08:00
chao an
8cd691c428 apps/system: replace CONFIG_NSH_LINELEN to LINE_MAX
Applications should not depend on any properties of nshlib

Signed-off-by: chao an <anchao@lixiang.com>
2025-01-17 00:18:41 +08:00
Zhe Weng
0dade3e3e8 apps: Set sll_protocol for raw socket to ETH_P_ALL
Ref: https://man7.org/linux/man-pages/man7/packet.7.html

We should either set protocal when creating socket or binding, otherwise
we cannot capture any packet.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2025-01-15 23:05:23 +08:00
liucheng5
3bf2f6c2f3 feat: sensor: add a new uorb topic ENG
Add a new uorb topic for ENG sensor
2025-01-15 17:34:56 +08:00
tengshuangshuang
7cf99856bc test:fix timerjitter data style error 2025-01-15 00:02:05 +08:00
liaobin1
c73ec9a085 Feature sunset: MEMORY_LEAK_TRACK 2025-01-14 23:58:27 +08:00
tengshuangshuang
5eeed99ca8 cache_test:fix up_flash_dcache error
Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
2025-01-14 00:35:31 +08:00
tengshuangshuang
e38ff2e911 tests: fix cache_test and arch_lib_test date style error 2025-01-14 00:35:11 +08:00
wangjianyu3
b67c0f4ec6 nshlib/pipeline: Concat variable arguments failed
1. Without this patch

  nsh> set var_test `uname`
  nsh> echo $var_test
  NuttX
  nsh> echo $var_test | cat
  sh [5:100]

  nsh>

2. With this patch

  nsh> set var_test `uname`
  nsh> echo $var_test
  NuttX
  nsh> echo $var_test | cat
  sh [4:100]
  NuttX
  nsh>

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-01-13 09:36:56 +08:00