Commit Graph

19 Commits

Author SHA1 Message Date
wangchen
cb292d0608 nshlib/netcmds:modify the description of setting MTU
modify the description of setting MTU

Signed-off-by: wangchen <wangchen41@xiaomi.com>
2023-05-10 19:56:04 +08:00
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
zhengjunbo1
f58c87e7ed nshlib/README.md: add uptime command description
Signed-off-by: zhengjunbo1 <zhengjunbo1@xiaomi.com>
2023-04-04 12:19:15 -04: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
Huang Qi
95f32fd018 nsh: Decouple with CONFIG_FILE_STREAM
Replace all fwrite/fread/fgets/... to write/read/...

Before:
```
       text    data     bss     dec     hex filename
 109827     601    6608  117036   1c92c nuttx/nuttx
```
    After:
```
       text    data     bss     dec     hex filename
108053     601    6608  115262   1c23e nuttx/nuttx
```
    After with CONFIG_FILE_STREAM disabled:
```
       text    data     bss     dec     hex filename
 105667     601    6608  112876   1b8ec nuttx/nuttx
```

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-02-22 13:47:41 +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
Zhe Weng
2ad05e3062 ifconfig: Support prefixlen/CIDR for IPv6
Linux:
ifconfig eth0 [inet6] add 2022::2/96

FreeBSD:
ifconfig eth0 inet6 2022::2/96
ifconfig eth0 inet6 2022::2 prefixlen 96

NuttX newly supported:
ifconfig eth0 inet6 [add] 2022::2/96
ifconfig eth0 inet6 [add] 2022::2 prefixlen 96

Ref:
https://man7.org/linux/man-pages/man8/ifconfig.8.html
https://www.freebsd.org/cgi/man.cgi?ifconfig

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-12-29 17:33:59 +08:00
Zhe Weng
8f10dde6ad ifconfig: Allow hostip on first non-option place after inet/inet6
NuttX previous:

ifconfig eth0 10.0.0.1 [inet]
ifconfig eth0 2022::2 inet6

Try to be compatible with other systems:

Linux:
ifconfig eth0 [inet] 10.0.0.1
ifconfig eth0 [inet6] add 2022::2

FreeBSD:
ifconfig eth0 inet 10.0.0.1
ifconfig eth0 inet6 2022::2

NuttX newly supported:
ifconfig eth0 [inet] 10.0.0.1
ifconfig eth0 inet6 [add] 2022::2

Ref:
https://man7.org/linux/man-pages/man8/ifconfig.8.html
https://www.freebsd.org/cgi/man.cgi?ifconfig

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-12-29 17:33:59 +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
Jiuzhu Dong
9f79bf183a nsh/script: support rc.sysinit script
Follow: http://glennastory.net/boot/sysinit.html

This is first script that init runs is rc.sysinit. This
script does serval initialization tasks about basic service.

The boot sequence currently provided to the board level is:
board_earlyinitialize->
    board_lateinitialize(Peripherals driver, core driver, ...)->
	run rcS script(mount fs, run service) ->
	    board_appinitialize->

After this patch:
The boot sequence currently provided to the board level is:
board_earlyinitialize->
    board_lateinitialize(core driver,...)->
	run rc.sysinit script(mount fs, run core service) ->
	    board_appinitialize(Peripherals driver)->
		run rcS script(run other service)->

So, Peripheral drivers can do more with the file system and
core services.

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-04-21 12:54:24 +03:00
Fotis Panagiotopoulos
6daec61423 Typo fix. 2022-01-28 00:02:08 +08:00
Xiang Xiao
967f526850 Rename LIB_ to LIBC_ for all libc Kconfig
follow other libc component naming convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-05 16:42:32 +02: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
Jiuzhu Dong
4c6ded2661 app: delete NFILE_DESCRIPTORS limits
Change-Id: I3ced2b2b7440a2c79a712cfc97b4cd15d2bddd4c
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-12 21:12:07 -08:00
chao.an
fe915679b1 style/Document: remove unnecessary trailing whitespace
N/A

Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-28 12:20:10 +01: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
Maciej Wójcik
21049ece6e Rewritten READMEs to Markdown 2020-07-25 01:01:51 -07:00
Maciej Wójcik
51e6645f71 Rename README and README.txt to README.md 2020-07-25 01:01:51 -07:00