Commit Graph

28 Commits

Author SHA1 Message Date
Xiang Xiao
8e460e7e19 nshlib: Move symbol table initialization from nsh_main to nsh_initialize
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-16 15:39:10 -04:00
Xiang Xiao
0d210c3227 nshlib: Move commoin initialization from console_main to nsh_initialize
to avoid the code duplication

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-16 15:39:10 -04:00
Xiang Xiao
964747dd36 nshlib: Call nsh_telnetstart in nsh_initialize to avoid the dupliation
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-16 15:39:10 -04:00
Masayuki Ishikawa
41fe4f177a system:nsh : Apply CONFIG_NSH_DISABLE_TELNETSTART to nsh_main.c
Summary:
- This commit applies CONFIG_NSH_DISABLE_TELNETSTART to nsh_main.c

Impact:
- None

Testing:
- Tested with sabre-6quad:netknsh (will be updated later)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-08-09 23:17:25 +08:00
Xiang Xiao
d4d2f13f89 Rename CONFIG_LIB_BOARDCTL to CONFIG_BOARDCTL
since boardctl isn't a libc feature

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-06 11:04:35 +02:00
Alin Jerpelea
aa581fe5ce system: nxstyle fixes
fixes for errors reported by the nxstyle tool

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-11 02:42:05 -05:00
Alin Jerpelea
84e0ca1310 system: update licenses to Apache
Gregory Nutt is has submitted the SGA

Ken Pettit has submitted the ICLA

David S. Alessio has submitted the ICLA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-11 02:42:05 -05:00
Xiang Xiao
9d80399bd5 nsh: Accept the command line arguments like sh
Usage: nsh [<script-path>|-c <command>]

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ifb76b27e7fd09d26b1f6e48c391fed0972018041
2020-08-19 14:32:53 -07:00
Xiang Xiao
b217de70e5 apps: Remove all stuff related to CONFIG_xxx_CXXINITIALIZE
since it is moved to the central place in nuttx side instead

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I544d6110f1ca6460f7c82f970870aa9b1e7ab3dd
2020-07-01 10:03:12 -06:00
Xiang Xiao
650b58d6b2 nshlib: Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-19 08:07:06 -06:00
Xiang Xiao
de8a56d149 nshlib: Split shell functionality from nsh to sh
1.Improve the compatiblity as other OS
2.Avoid call nsh_initialize more than once

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-19 08:07:06 -06:00
Gregory Nutt
724a34bd3b Run all files modified by pr45 through nxstyle. 2020-02-03 07:38:57 -06:00
Xiang Xiao
37135e5dfe telnetd should listen both IPv4 and IPv6 for the dual stack
Change-Id: Ic1c2878f2eda721ccdf667b0a634289c643f5220
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-03 07:17:22 -06:00
Xiang Xiao
857158451b Unify the void cast usage
1.Remove void cast for function because many place ignore the returned value witout cast
2.Replace void cast for variable with UNUSED macro

Change-Id: Ie644129a563244a6397036789c4c3ea83c4e9b09
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-02 23:21:01 +08:00
Gregory Nutt
3da8091d30 Include nuttx/symtab.h instead of nuttx/binfmt/symtab.h since symtab.h under binfmt folder is for internal use. 2019-12-10 08:39:22 -06:00
Xiang Xiao
7479cd6819 apps/system/nsh/nsh_main.c: Remove HAVE_DUMMY_SYMTAB logic since BINFS can run without it. 2019-12-10 08:37:58 -06:00
Xiang Xiao
e806097c70 Application.mk and main.c files: Change builtin's entry point from main to xxx_main by macro expansion. This change make the entry point fully compliant with POSIX/ANSI standard. 2019-10-06 06:14:56 -06:00
Xiang Xiao
63c3772888 CONFIG_BUILD_LOADABLE: Check the kernel function callable by BUILD_KERNEL instead of BUILD_LOADABLE since BUILD_LOADABLE could be turned on even with BUILD_FLAT. 2019-10-03 14:10:32 -06:00
Gregory Nutt
94a0d92b54 This commit removes the private network initialization logic from NSH and puts in a common location at apps/netutils/netinit. Now that netork initialization logic can be used by applications that do not include NSH.
Squashed commit of the following:

    apps/nshlib:  Remove NSH initialization.  Now uses the common apps/netutils/netinit logic (which was cloned from nshlib to begin with).

    apps/netutils/netinit:  Clone network initialization logic from NSH to this directory so that it can be available for general use.
2019-04-29 10:22:56 -06:00
Gregory Nutt
9db029e318 The file system can no longer be disabled. Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS==0 2019-02-11 13:10:10 -06:00
Gregory Nutt
40874bbe8b apps/system/nsh/nsh_main.c: Set NSH priorirty if the NSH task was scheduled at a different priority than the configured priority. 2018-12-20 10:50:29 -06:00
anchao
220653f21c Squashed commit of the following:
Author: anchao <anchao@pinecone.net>

     apps/, most main() function: Correct CONFIG_BUILD_LOADABLE usage
     Loadable apps/: Correct loadable symbol table generate
     apps/system/ubloxmodem:  Fix build break
     apps/examples/ostest: start restart/waitpid/user test from main loop
     apps/nshlib:  Expand reboot and poweroff commands to include a second, optional mode argument

    Author: Gregory Nutt <gnutt@nuttx.org>

     An attempt to fix build issues.  Does not work.
     apps/examples/ostest:  Fix some inappropriate renaming of static functions introduced with recent patches.
     apps/builtin/exec_builtin.c:  Fix a error introduced by recent comments.  Found in build testing.

    Author: anchao <anchao@pinecone.net>

     apps/builtin/exec_builtin.c:  Try posix_spawn if builtin apps do not have have an entry point.
     apps/Application.mk: introduce MODULE config to simplify tristate(m)
     apps/nsh:  Change the nuttx shell module type to tristate
     apps:  Add loadable application support
     script/mksymtab:  Generate symbol table name by default
     apps/builtin:  Allow loadable applications can register with apps/builtin.
2018-08-23 11:06:15 -06:00
Gregory Nutt
2f982e9c77 Revert "Squashed commit of the following:"
This reverts commit 25b92edd9f.
2018-08-22 12:06:32 -06:00
anchao
25b92edd9f Squashed commit of the following:
apps/builtin/exec_builtin.c:  Try posix_spawn if builtin apps do not have have an entry point.
    apps/Application.mk: introduce MODULE config to simplify tristate(m)
    apps/nsh:  Change the nuttx shell module type to tristate
    apps:  Add loadable application support
    script/mksymtab:  Generate symbol table name by default
    apps/builtin:  Allow loadable applications can register with apps/builtin.
2018-08-22 09:30:38 -06:00
anchao
9fe6d2e1c3 Remove illegal calls into OS to initialize BINFMT support. This must be moved to the board initialization logic within the OS. 2018-08-22 07:53:35 -06:00
Gregory Nutt
3c4ca6a35e apps/system/nsh: Completes implementation of system() and popen() commands for the KERNEL build mode. 2018-08-18 11:39:26 -06:00
Gregory Nutt
32f50985a6 Fix references to examples/nsh left in previous commit. 2018-08-18 09:33:25 -06:00
Gregory Nutt
8de513e36b apps/system/nsh: Move apps/examples/nsh to apps/system/nsh. It has become so entrenched that it is hardly an example these days. May as well formalized it as a system task. 2018-08-18 09:04:43 -06:00