Commit Graph

1145 Commits

Author SHA1 Message Date
yangsen5
524caec5a0 nxcodec: Modify the logic of judging the correctness of the incoming pixformat
Signed-off-by: yangsen5 <yangsen5@xiaomi.com>
2024-09-13 12:33:45 +08:00
wangjianyu3
6b1062a64e system/fastboot: Fix Out-of-bounds Write
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
caa47f282e system/fastboot: Fix that total_chunks of sparse_header maybe error
when size of image passed to command "fastboot flash" is not 4KB aligned.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
a413f6bcac system/fastboot: Fix error that download_size always be zero
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
e6cedb8da7 system/fastboot: Init total_imgsize to zero
otherwise random value, sometimes zero
And, close file if flash failed.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
78c11c31e8 system/fastboot: Fix fd leak of fastboot_filedump_upload()
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
c3488c5b47 system/fastboot: Support upload & oem(memdump, filedump) command
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
22f055472c system/fastboot: Retry if open EP failed
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wanggang26
e55666f90e fastboot:enable O_CLOEXEC explicit
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
f1ce26162b system/fastboot: Replace printf with syslog
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
anjiahao
53563b67e7 fastbootd:add delay ms for bootloader
usage in bootloader
if [flag == bootloader]
  fastbootd
else
  fastbootd 500
fi

host:
$fastboot flash app app.bin
 < waiting for any device >

let board enter booloader,use <reboot bootloader> or hard reset

then will flash it.

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-09-11 23:20:48 +08:00
dongjiuzhu1
95abb3628c system/fastboot: fix crash when free invalid pointer
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
e3400b2555 Reduce the number of open() and close() to improve performance
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
6ac7cbf4d2 system/fastboot: fastboot flash - call fsync()
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
6b53e1fae9 system/fastboot: erase - add driver independent
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
4d0b9d61de system/fastboot: Support USB boardctl
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
1752726479 system/fastboot: Complete the erase command
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
25ba30986f fastboot tool: Status read failed while rebooting into bootloader
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
dongjiuzhu1
dfa3ce5f5d system/uorb: using uorb.h to replace sensors header file
Sensors are just a part of uORB, and there are many virtual topics used
within uORB as well. For the library apps/system/uorb/, the nuttx/uorb.h
version is more preferable. So, move public type and definition to
nuttx/uorb.h.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-10 15:58:15 +08:00
Huang Qi
2f5dc9c24d system: Rename debug to debugpoint
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-09-08 21:41:23 +08:00
Huang Qi
c7c76534af testing/debug: Enhancement for watch address by cmd line
This patch add some command line arguments for debug
program, then you can use it to insert watchpoint or
breakpoint to arbitrary address at runtime.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-09-08 10:39:37 +08:00
Tim Hardisty
4ebd68f7d8 Update settings.c 2024-08-30 21:29:50 +08:00
renjianguang
246d1d0225 system/nxrecorder: Add opus support in nxrecorder.
Signed-off-by: renjianguang <renjianguang@xiaomi.com>
2024-08-30 01:25:16 +08:00
wurui3
cc17167c7a system/nxrecorder: Add mp3 support in nxrecorder.
add mp3 support in nxrecorder and improve code.

Signed-off-by: wurui3 <wurui3@xiaomi.com>
2024-08-30 01:25:16 +08:00
fangpeina
93348ca1ca system/uorb: fix err when using the -n 1 parameter
Signed-off-by: fangpeina <fangpeina@xiaomi.com>
2024-08-27 22:08:31 +08:00
zhangkai25
4e3f77d884 Fixed the problem of memory trampling caused by not initializing the structure
Signed-off-by: zhangkai25 <zhangkai25@xiaomi.com>
2024-08-24 11:14:47 +08:00
wangzhi16
f638a21f89 [BugFix]Command "critmon" error
Command "critmon" has some format errors and information errors, such as:

PRE-EMPTION CALLER            CSECTION CALLER               RUN         TIME             PID   DESCRIPTION
1.679000000                   3.704000000
                         None None             0     CPU0 IDLE
0.002000000                   0.003000000
                         None None             1     CPU1 IDLE
0.000000000                   0.000000000
                         None None             2     CPU2 IDLE
0.000000000                   0.000000000
                         None None             3     CPU3 IDLE
0.001000000                   0.001000000
                         None None             4     hpwork
0.002000000                   0.006000000
                         None None             5     nsh_main
0.000000000                   0.000000000
                         None None             6     critmon

After bug fix:

PRE-EMPTION CALLER            CSECTION CALLER               RUN              TIME             PID   DESCRIPTION
None                          None                          ---------------- ---------------- ----  CPU 0
None                          None                          ---------------- ---------------- ----  CPU 1
None                          None                          ---------------- ---------------- ----  CPU 2
None                          None                          ---------------- ---------------- ----  CPU 3
None                          None                          0.238000000      6.982000000      0     CPU0 IDLE
None                          None                          0.461000000      13.089000000     1     CPU1 IDLE
None                          None                          0.000000000      0.000000000      2     CPU2 IDLE
None                          None                          0.000000000      0.000000000      3     CPU3 IDLE
None                          None                          0.000000000      0.001000000      4     hpwork
None                          None                          0.000000000      0.010000000      5     nsh_main
None                          None                          0.000000000      0.000000000      46    critmon

Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
2024-08-24 11:14:06 +08:00
zhangshuai39
6d52a0fbc1 netutils/netlib: Encapsulate the dhcp configuration network code and modify at all calling locations
The DHCP configuration network code is called multiple times, so it is encapsulated

Signed-off-by: zhangshuai39 <zhangshuai39@xiaomi.com>
2024-08-23 22:10:04 +08:00
yangjianqing
5a04b9a7c9 tcpdump:fix tcpdump stack overflow bug
Signed-off-by: yangjianqing <yangjianqing@xiaomi.com>
2024-08-22 01:28:27 +08:00
yangsen5
c4d97cd8f8 system/nxcamera: add CMakeLists.txt
Signed-off-by: yangsen5 <yangsen5@xiaomi.com>
2024-08-21 04:27:17 +08:00
Daniel Jasinski
7ff3bc4674 build: Fix rpserver and rpproxy CMake builds
argtable3 include directories are appended as NUTTX_INCLUDE_DIRECTORIES
property, symlink creation is no longer needed.

Signed-off-by: Daniel Jasinski <jasinskidaniel95szcz@gmail.com>
2024-08-20 11:25:48 -03:00
liuhongchao
ad95f7306f apps: Fix input simulates touch reporting error
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2024-08-20 02:51:01 +08:00
jinxiuxu
8ebab7657f apps/nxplayer: add ioctl stop when play completed
Signed-off-by: jinxiuxu <jinxiuxu@xiaomi.com>
2024-08-20 01:43:20 +08:00
zhangshoukui
7503f7bf33 popen: Replace fcntl with ioctl
The fcntl interface sets the O_CLOEXEC property by calling the ioctl interface. Let's call the ioctl interface directly.

Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2024-08-16 19:48:18 +08:00
Matteo Golin
2fce155def i2ctool dev has a -z option to use a zero-byte write request for
scanning the bus, which allows detection of more sensors such as the
MS5611 and SHT41 to be detected.
2024-07-20 08:51:59 -03:00
Denis Ryndine
1852731df8 dd_main.c: Add oseek optional argument.
- If oseek=N passed, will seek N*bs on output file before writing.
2024-07-10 00:16:25 +08:00
shizhenghui
ea64cefa33 nxcodec: improve Kconfig help
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-07-10 00:16:14 +08:00
shizhenghui
ae9f4e2231 nxcodec: update log information
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-07-09 16:32:21 +08:00
yangsen5
69a56e7260 system/nxcodec: modify print usage
Signed-off-by: yangsen5 <yangsen5@xiaomi.com>
2024-07-09 16:32:21 +08:00
yangsen5
b3a424613b system/nxcodec: add CMakeLists.txt
Signed-off-by: yangsen5 <yangsen5@xiaomi.com>
2024-07-09 16:32:21 +08:00
yangsen5
9312a74004 add m2m decoder/encoder test
Signed-off-by: yangsen5 <yangsen5@xiaomi.com>
2024-07-09 16:32:21 +08:00
xuxin19
cbcf9ec168 cmake:add CMake build for libuv
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-06-30 21:40:25 +08:00
xuxin19
8e15514955 cmake:add zlib CMake build
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-06-30 21:40:25 +08:00
xuxin19
2e133feb09 cmake:support system apps CMake build
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-06-30 21:40:25 +08:00
SPRESENSE
97d399dcb8 system/spi: Add CMakeLists.txt
Add CMakeLists.txt to system SPI tool.
2024-06-28 20:17:04 +08:00
Yanfeng Liu
2a2c5a420e system/telnetd: add CMake script
This adds CMake support for the `telnetd` command

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-06-24 22:03:43 +08:00
Zhe Weng
f620353507 system/iptables: Support ip6tables & filter table
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-06-21 10:16:01 +08:00
Zhe Weng
8ae06462eb system/iptables: Support filter table
Add supports for filter table, usage is same as Linux's iptables, including:
- [!] -p/--protocol
- [!] -s/--source -d/--destination
- [!] -i/--in-interface -o/--out-interface
- [!] --sport/--source-port --dport/--destination-port
- [!] --icmp-type

Examples:
> iptables -P FORWARD DROP
> iptables -I INPUT -i eth0 ! -p icmp -j DROP
> iptables -t filter -A FORWARD -p tcp -s 10.0.1.2/24 -d 10.0.3.4/24 -i eth0 -o eth1 --sport 3000:3200 --dport 123:65535 -j ACCEPT
> iptables -t filter -I FORWARD 2 -p icmp ! -s 123.123.123.123 ! -i eth0 -o eth1 ! --icmp-type 255 -j REJECT

> iptables -L
Chain INPUT (policy ACCEPT)
target        prot  idev  odev  source              destination
DROP         !icmp  eth0  any   anywhere            anywhere

Chain FORWARD (policy DROP)
target        prot  idev  odev  source              destination
ACCEPT        tcp   eth0  eth1  10.0.1.2/24         10.0.3.4/24        tcp spts:3000:3200 dpts:123:65535
REJECT        icmp !eth0  eth1 !123.123.123.123/32  anywhere           icmp !type 255

Chain OUTPUT (policy ACCEPT)
target        prot  idev  odev  source              destination

Note:
- We're dropping dependency of argtable3, since it is difficult to support command like '! -p tcp ! -i eth0'

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-06-21 10:16:01 +08:00
raiden00pl
72635a88ca system: add sensor streaming tool based on nxscope
This tool allows you to send sensor data via the nxscope interface.
Useful when we test sensors or when we just need a tool to visualize
data from sensors.

Works only with the new sensor framework.
2024-05-23 11:50:08 +08:00
Tiago Medicci Serrano
a09521ed55 system/nxdiag: Remove unnecessary --depth parameter
This commits removes the unnecesary `--depth` parameter: Espressif
common headers do not require it.
2024-05-23 11:49:08 +08:00