wangchen
c2f75330f7
nshlib/netcmds:support to set MTU
...
Usage:ifconfig interfacename mtu ***
Signed-off-by: wangchen <wangchen41@xiaomi.com>
2023-04-27 18:02:23 +08:00
Xiang Xiao
1d3e6510e6
nshlib: Add switchboot command
...
switchboot <image path>
Switch to the updated or specified boot system. This command depends on
hardware support CONFIG_BOARDCTL_SWITCH_BOOT. `<image path>` point to a
partion or file which contain the firmware to boot.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-07 13:44:49 +03:00
Xiang Xiao
49418d6de5
nshlib: Align the command table
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-04 13:53:28 +03:00
Xiang Xiao
4f7dd7be7c
nshlib: Add boot command
...
boot [<image path> [<header size>]]
Boot a new firmware image. This command depends on hardware support
CONFIG_BOARDCTL_BOOT_IMAGE. <image path> may point to a partion or file
which contain the firmware to boot. The optional, numeric argument
<header size> may be useful for skipping metadata information preprended
to the firmware image.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-04 13:53:28 +03:00
Ville Juven
f9dfb51001
nsh/nshlib: Add alias support for nsh
...
This adds support for string aliases into nsh. There are some nuances that
are not handled correctly yet:
- Reserved words can be overloaded, which is a clear POSIX violation
2023-03-23 22:10:19 +02:00
Huang Qi
dbf7d34a2a
nsh: Fix a potential buffer overflow in cmd help
...
Follow https://github.com/apache/nuttx-apps/pull/1621 , fix issue of builtin command list.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-03-09 01:42:38 +08:00
Huang Qi
12d31075eb
nsh: Fix a buffer overflow in help
...
Introduced by https://github.com/apache/nuttx-apps/pull/1610 ,
internal line buffer should have more bytes for tab before newline and '\0'.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-03-05 11:18:59 +02:00
Huang Qi
e957e1633c
nsh: Improve performance of help
by line buffer
...
This change reduce the usage of `printf`,
which will improve both CPU usage and IO performance.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-03-03 17:41:39 +09:00
Xiang Xiao
359f66ad37
nshlib: Remove the remaining CONFIG_FILE_STREAM dependence
...
continue the change from https://github.com/apache/nuttx-apps/pull/1559
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-24 17:38:19 +08:00
Oreh
f63a3cac0e
Add NSH lomtd command (creates MTD loop device)
2023-02-19 19:55:52 +08:00
Zhe Weng
93b4dc2692
ifconfig: Support ifconfig interface
and update arg limit
...
From comment in cmd_ifconfig, it seems that we support `ifconfig [interface]`, but actually not considering the interface param now. After this commit, we only print the information of interface specified in param, just like linux.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-02-01 11:12:24 +08:00
zhanghongyu
df3121213e
cmd_arp: add device input for arp interface
...
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-12-14 21:19:37 +08:00
anjiahao
14465b85c4
cmd_dd:support dd can do verify
...
After writing the file, compare the contents of the two files again
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-11-14 20:40:43 +08:00
Xiang Xiao
36a0c924f7
netutils: Support telnetd in the kernel mode
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-07 15:24:08 +09:00
Junbo Zheng
79e770b0c6
apps/nshlib: add the missing FAR macro for all source files
...
Signed-off-by: Junbo Zheng <zhengjunbo1@xiaomi.com>
2022-09-22 14:22:13 +08:00
Junbo Zheng
06f39d10f1
apps/nshlib: add uptime command support
...
run uptime command on sim:
nsh>
nsh>
nsh> uptime
19:35:01 up 1:40, load average: 0.00, 0.00, 0.00
nsh>
nsh>
nsh> uptime -s
2022-09-16 17:54:26
nsh>
nsh>
nsh> uptime -p
up 1 hour, 40 minutes
nsh>
nsh>
nsh> uptime -h
Usage:
uptime [options]
Options:
-p, show uptime in pretty format
-h, display this help and exit
-s, system up since
nsh>
nsh>
nsh> uptime -abc
uptime: invalid option -- -abc
Usage:
uptime [options]
Options:
-p, show uptime in pretty format
-h, display this help and exit
-s, system up since
nsh>
nsh>
nsh> date
Fri, Sep 16 19:35:18 2022
nsh>
nsh>
Signed-off-by: Junbo Zheng <zhengjunbo1@xiaomi.com>
2022-09-21 16:37:34 +02:00
Junbo Zheng
732450d42a
apps/nshlib: correct commands with alphabet order in kconfig
...
Signed-off-by: Junbo Zheng <zhengjunbo1@xiaomi.com>
2022-09-16 15:59:30 +08:00
Fotis Panagiotopoulos
1c7839c28c
Fixed compiler warnings.
2022-08-30 12:10:49 +08:00
Fotis Panagiotopoulos
0cdb2cfa48
Fixed compiler warnings.
2022-08-23 01:39:59 +08:00
ligd
a109a6e58b
rptun_ping: add sleep param to rptun_ping
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-30 03:15:01 +08:00
Jiuzhu Dong
45615a8d9d
nshlib/dmesg: update config about enable dmesg
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-25 08:27:48 +02:00
zhuyanlin
a5a4c561fb
pmconfig: add mulit domain support
...
pmconfig [domain]
pmconfig relax/stay state [domain]
Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2022-04-28 00:36:36 +08:00
YAMAMOTO Takashi
c7fcffd09a
nshlib/nsh_fscmds.c: Make losetup command take optional sector size
2022-04-11 22:19:19 +08:00
Jiuzhu Dong
63f28099e3
nsh/timedatectl: add timedatectl to get/set TZ
...
follow https://man7.org/linux/man-pages/man1/timedatectl.1.html
nsh> timedatectl
TimeZone: CST, 28800
Local time: Sat, Apr 02 05:59:43 2022 CST
Universal time: Fri, Apr 01 21:59:43 2022 GMT
RTC time: Sun, Apr 01 21:59:42 2022
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-04-07 02:52:11 +08:00
ligd
470174260c
rptun: update rptun cmd usage
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-04-01 17:36:51 +08:00
ligd
f5d2c64556
rptun: add rptun ping support
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-04-01 17:36:51 +08:00
ligd
622784be89
rptun cmd: add broadcast rptun cmd
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-04-01 17:36:51 +08:00
ligd
e0e5652de4
rptun: add rptun dump support
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-04-01 17:36:51 +08:00
ligd
d5aae96523
apps: add rptun reset /dev/rptun/xx cmd
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-04-01 17:36:51 +08:00
ligd
c57677c3ce
apps: add rptun /dev/rptun/xx panic cmd
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-04-01 17:36:51 +08:00
Jiuzhu Dong
de61706552
nsh/memdump: support dynamic turn on/off backtrace in heap
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-04-01 13:31:28 +08:00
田昕
cbc9163266
apps/nsh:add resetcause command
...
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-03-31 12:09:24 +03:00
anjiahao
eabba4ca20
cmd_mkdir:support mkdir opthon -p
...
use "mkdir -p /test/test" to ceate a dir
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-03-16 13:53:45 +08:00
Jiuzhu Dong
283b1a4dfc
nshlib/cmd_memdump: support new command: memdump
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-02-24 02:16:00 +08:00
liuhaitao
4b8e0fde62
nshlib: Add 'rm -r' recursive remove directory support
...
Change-Id: Iafecb0a25cc9d091a1aee8f381b217e67d6e3925
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2021-07-01 14:55:04 -07:00
Xiang Xiao
8e06d060c2
nsh/date: Support -u option
...
user can use both UTC and local time now
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-02 11:10:31 +01:00
RoCorbera
42f4565129
nsh kill cmd can be executed with no signal option.
...
SIGTERM is the default signal, as in unix kill command.
nsh> kill [-<signal>] <pid>
2021-06-01 15:57:13 -03:00
Xiang Xiao
98de0d6a68
nsh: Add debug.h inclusion in nsh_command.c
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-05-24 16:05:07 +09:00
Xiang Xiao
ecae66fe59
Replace all CONFIG_NFILE_STREAMS with CONFIG_FILE_STREAM
...
follow up the kernel side change
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ic27ad65d7cc2ea570921e0c17098dcb6bfe1893a
2020-09-11 17:57:58 +08:00
spiriou
06c7f06b1d
nshlib: remove NSH_HAVE_WRITABLE_MOUNTPOINT to enable mkrd again
2020-08-23 11:38:08 -07:00
Xiang Xiao
d307758c3c
nshlib: Rename 'sh' command to 'source' command
...
since this command change the parent environment variable and
add new '.' command which has the same functionality as 'source'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-19 08:07:06 -06:00
chao.an
9968461c2b
nsh/command: do not show the module application in built-in list
...
Change-Id: Ia6dd5dcf7d7eb829fde67c522f7ee2155a4051ce
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-04-03 15:59:45 +09:00
Xiang Xiao
8da81578b0
nsh: Call getaddrinfo in cmd_nslookup to support the dual stack host
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Iac7a9a6b871d473e4720db1d6cbfeea3dc9796a0
2020-03-30 09:43:49 -06:00
Gregory Nutt
1a9444a68b
Remove support for CONFIG_FS_WRITABLE and CONFIG_FS_READABLE
2020-03-22 08:23:28 -05:00
YAMAMOTO Takashi
e1d9e82273
nshlib: Fix a few strange whitespace in command help text
2020-03-18 00:39:17 -05:00
YAMAMOTO Takashi
2b47187a83
nsh_command.c: Appease nxstyle complaints
2020-03-17 21:45:37 -06:00
Xiang Xiao
5f273b2c5c
nshlib: cmd_nfsmount support the mount with TCP protocol
...
And make TCP as the default like Linux
2020-02-27 12:53:54 -06:00
Xiang Xiao
41d88f06e7
Run codespell -w with the latest dictonary again
2020-02-23 07:10:14 -06:00
Xiang Xiao
d660492289
Run codespell -w against all files
...
and fix the wrong correction
2020-02-22 14:41:36 -06:00
Xiang Xiao
e0dcfa0c55
Remove extra whitespace from files ( #43 )
...
* Remove multiple newlines at the end of file
* Remove the white space from the end of line
2020-01-31 08:29:24 -06:00