Xin Xu
fe51fed1e6
Revert "cmake:builtin register support NONE srcs target"
...
This reverts commit bcf655e196
.
2024-08-16 15:21:50 +08:00
xuxin19
bcf655e196
cmake:builtin register support NONE srcs target
...
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-08-15 13:37:24 +08:00
Marco Casaroli
96100b30f2
feat(nsh): input (stdin) redirection
...
This adds support for `<` to redirect input on nsh commands.
2024-08-08 19:19:18 -03:00
Xiang Xiao
054cf3b1cb
Change all sizeof(arr)/sizeof(arr[0]) to nitems
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-17 22:51:51 +03:00
fangxinyong
b0933fe431
builtin: uid and gid configuration for builtin app
...
File uid and gid configuration for builtin fs, if set-user-ID bit is set
in the file permissions, then the euid of process set as file uid. Use
the confiuration to emulate builtin app set.
MODE must octal number and use similar with linux chmod OCTAL-MODE FILE
UID = 2000
GID = 3000
MODE = 06555
Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2023-08-14 11:47:55 +08:00
xuxin19
8e71885ee5
Enhance Makefile to avoid "Argument list too long"
...
define a macro for split long variable and redefine variable in batch.
see details in `apps/Make.defs` `SPLITVARIABLE`.
replace the variable reference that caused the error.
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-08-10 11:16:07 +08:00
chao an
4d79a5cbaf
add initial cmake build system
...
Co-authored-by: Daniel Agar <daniel@agar.ca>
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-08 13:52:02 +08:00
Xiang Xiao
0acd68b391
Indent the include statement by two spaces
...
follow the coding style
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-13 10:16:26 -03:00
zouboan
776136a113
Fix various error in Windows native build
2022-12-08 13:22:13 +08:00
Xiang Xiao
678415c6fa
Rename task_spawnattr_setstacksize to posix_spawnattr_setstacksize
...
follow up the kernel side change
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-01 09:51:08 +09:00
Xiang Xiao
b659f0fbdf
Remove the unnecessary cast for main_t, NULL and argv
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-18 18:40:23 +02:00
Xiang Xiao
4941182cc6
Make.defs: Change "ifeq ($(XXX),y)" to "ifneq ($(XXX),)
...
to support the tristate option correctly and unify the usage
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-16 14:59:08 +02:00
Abdelatif Guettouche
ff48ece8fb
Fix few typos in builtin/ and sotest_main example.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-16 21:21:28 -05:00
Xiang Xiao
99e1674912
Call posix_spawn with filename as the first argv entry
...
pair with the kernel side change to follow the standard defintion:
https://pubs.opengroup.org/onlinepubs/009695399/functions/posix_spawn.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-14 07:12:54 -06:00
Alin Jerpelea
3170ca0835
builtin: update licenses to Apache
...
Gregory Nutt is has submitted the SGA
Uros Platise 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-07 21:35:33 -05:00
Xiang Xiao
58293abb8e
Follow up task_spawn change from kernel side
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-01 12:45:26 +09:00
Xiang Xiao
deaa6c5b7b
build: Replace $(TOPDIR)/Make.defs with $(APPDIR)/Make.defs
...
and move NUTTXLIB defintion to the common place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-09 15:17:37 -03:00
Xiang Xiao
69f013e74e
build: Remve the unnecessary .gitignore
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-23 15:56:35 +01:00
Xiang Xiao
ead498a788
build: Remove the workaround for the inexistence of .config/Make.defs
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-21 17:43:42 +01:00
Xiang Xiao
0a6f978771
app/builtin: simplify the application registraion flow
...
Change-Id: I6b92385e72d0e1a30123f12dbb9c4fd3e90b0315
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-05-18 09:51:09 -06:00
chao.an
8997213c2a
nsh/parse: Try FILE_APPS first in the case of builtin
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-05-18 06:53:57 -06:00
Gregory Nutt
b2d8c501f6
Remove use of set_errno() from application code.
...
The normal assignment errno = errcode should work fine now.
2020-05-07 22:23:19 +01:00
Xiang Xiao
e72608e0d8
Fix nxstyle issue
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-02 09:45:44 -06:00
YAMAMOTO Takashi
779502b4d9
Clean *.bdat and *.pdat on clean_context target
2020-03-26 22:29:28 -05:00
Xiang Xiao
1511403fdf
Revert "Don't generate .depend anymore"
...
This reverts commit cc5ad09caa
.
2020-03-22 23:09:40 -05:00
Xiang Xiao
cc5ad09caa
Don't generate .depend anymore
2020-03-22 18:15:21 +00:00
YAMAMOTO Takashi
c5673957cc
Remove unused BUILTIN_PROXY_STACKSIZE config
...
It has been unused since the following change:
"All argv types should be char * const * not const char **"
2020-02-13 15:00:56 +08: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
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
Xiang Xiao
7a645baa4d
Add .updated target to handle the no builtin app case correctly
...
Change-Id: Ia61ff63b4b1e4cb6ec52ac216626bbb76fdf3a33
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-01 12:22:00 +08:00
Xiang Xiao
8c8c481381
fix builtin_list.c:58:10: fatal error: builtin_proto.h: No such file or directory ( #2 )
...
Make builtin_list.c instead of builtin_list.o depend on builtin_proto.h and builtin_proto.c
2019-12-31 11:02:09 -06:00
Xiang Xiao
7808eb62d2
apps/: In all Make.def files, append to CONFIGURED_APPS patch with the absolute path.
2019-10-17 11:33:59 -06:00
Gregory Nutt
3a23523147
Makefiles: This reverts part of commit cf0365ea9
. It restores 'conditional' inclusion of TOPDIR/Make.defs. Otherwise all make targets fail if the board has not been configured. That is okay most of the time, but not for things like clean and distclean which should not depend on being configured.
2019-10-15 09:25:48 +08:00
Xiang Xiao
cf0365ea92
Clean up Makefile under apps folder no functional changes.
2019-10-04 08:35:46 -06:00
Xiang Xiao
9a27d4a697
Makefiles: Remove .PRECIOUS if Makefile doesn't touch libapps.
2019-10-01 11:48:55 -06:00
Gregory Nutt
ac61c18fcc
Move apps/builtins/builtin_forindex.c to nuttx/libs/libc/builtin since it is required by kernel logic as well. Other changes account for movement of builtin.h from nuttx/include/nuttx/binfmt/built.h to nuttx/include/lib/builtin.h.
2019-08-23 09:12:45 -06:00
anchao
b5cfd93444
apps/: Modification to build system: Unified application compilation rules
2018-09-03 09:29:56 -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
Gregory Nutt
cd62ab5398
Revert "apps/builtin/exec_builtin.c: Fix a error introduced by recent comments. Found in build testing."
...
This reverts commit 64e423a49c
.
2018-08-22 12:06:28 -06:00
Gregory Nutt
3a2a480eeb
Revert "Oops.. typo in bugfix."
...
This reverts commit 57998f8d71
.
2018-08-22 12:06:25 -06:00
Gregory Nutt
57998f8d71
Oops.. typo in bugfix.
2018-08-22 10:00:37 -06:00
Gregory Nutt
64e423a49c
apps/builtin/exec_builtin.c: Fix a error introduced by recent comments. Found in build testing.
2018-08-22 09:54:37 -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
Gregory Nutt
7d47671b9d
apps/builtin/Makefile: Fix an error introduced with commit 904d68cd1f
: If there are no built-in functions, then the CATFILE function hangs.
2018-08-18 11:37:23 -06:00
Gregory Nutt
f198e32c17
apps/system/popen: Add an implementation of the standard popen() and pclose() OS interfaces. These are implementated as applications vs. part of the OS because they depend on NSH. Untested on initial commit.
2018-08-17 10:45:06 -06:00
Gregory Nutt
9e9072bd00
apps/builtin/Makefile: Move the RWILDCARD function definition from apps/builtin/Makefile to nuttx/tools/Config.mk. It may have a broader usage than it does now.
2018-08-15 18:46:04 -06:00
Gregory Nutt
904d68cd1f
apps/builtin/Makefile. This commit changes apps/builtin to search the registry recursively. By supporting directories, external projects can install the hooks into the registry and easily clean them up and reinstall if something needs to be updated. Based on an idea from Anthony Merlino.
2018-08-15 18:30:59 -06:00
Gregory Nutt
7a8561728c
The last change added .PRECIOUS: $(BIN) to everyway Makefile in hopes the libapps.a will not be deleted on Control-C (unproven so far). However, $(BIN) may contain back slashes in some build platforms and that causes problems for make: It can't handle the backslashes in the .PRECIOUS dependency list. $(BIN) replaced with ../../libapp.a, where the number of ../ depends on the depth of the Makefile in the apps/ source tree.
2017-08-13 11:03:17 -06:00
Gregory Nutt
a66da34f18
All Makefiles: Add .PRECIOUS: apps/libapps.a to every Makefile. Hopefully this will end awkward problems when you Control-C out of a build and libapps.a is deleted.
2017-08-13 09:35:14 -06:00