2017-02-10 16:32:55 +01:00
|
|
|
#
|
|
|
|
# For a description of the syntax of this configuration file,
|
|
|
|
# see the file kconfig-language.txt in the NuttX tools repository.
|
|
|
|
#
|
|
|
|
|
2017-02-10 17:04:56 +01:00
|
|
|
menu "Program Execution Options"
|
2017-02-10 16:32:55 +01:00
|
|
|
|
|
|
|
config LIBC_EXECFUNCS
|
|
|
|
bool "Enable exec[l|v] / posix_spawn() Support"
|
|
|
|
default n
|
|
|
|
depends on !BINFMT_DISABLE
|
|
|
|
---help---
|
|
|
|
Enable support for the exec[l|v] family of functions that can be
|
|
|
|
used to start other programs, terminating the current program and
|
|
|
|
the posix_spawn() familty of functions that can be used start other
|
|
|
|
programs without terminating the current program. The typical
|
|
|
|
usage of the exec[l|v] functions is (1) first call vfork() to create
|
|
|
|
a new thread, then (2) call exec[l|v] to replace the new thread with
|
|
|
|
a program from the file system.
|
|
|
|
|
|
|
|
NOTE 1: This two step process start is completely unnecessary in
|
|
|
|
NuttX and is provided only for compatibily with Unix systems. These
|
|
|
|
functions are essentially just wrapper functions that (1) call the
|
|
|
|
non-standard binfmt function 'exec', and then (2) exit(0). Since
|
|
|
|
the new thread will be terminated by the exec[l|v] call, it really
|
|
|
|
served no purpose other than to suport Unix compatility.
|
|
|
|
|
|
|
|
The posix_spawn() functions do not have this inefficiency.
|
|
|
|
|
|
|
|
NOTE 2: Support for exec[l|v] and posix_spawn() is conditional
|
|
|
|
because they require additional support for symbol tables that
|
|
|
|
will not be available in the typical system.
|
|
|
|
|
|
|
|
if LIBC_EXECFUNCS
|
|
|
|
|
|
|
|
config EXECFUNCS_HAVE_SYMTAB
|
|
|
|
bool "Have symbol table"
|
2019-10-01 15:19:21 +02:00
|
|
|
default n
|
|
|
|
depends on !BUILD_KERNEL
|
2017-02-10 16:32:55 +01:00
|
|
|
---help---
|
2018-03-16 16:34:09 +01:00
|
|
|
If you have a system symbol table, then you may select this
|
2017-02-10 16:32:55 +01:00
|
|
|
option in order to use it. Symbol tables are required in most
|
2018-03-16 16:34:09 +01:00
|
|
|
cases in order to link executable programs to the base code.
|
|
|
|
|
|
|
|
NOTE: This option only pre-initializes the system symbol table as
|
2018-07-15 19:20:37 +02:00
|
|
|
defined by CONFIG_EXECFUNCS_SYMTAB_ARRAY and CONFIG_EXECFUNCS_NSYMBOLS_VAR.
|
2018-07-14 15:08:51 +02:00
|
|
|
This is simply an optional, automatic initialization of the
|
2018-03-16 16:34:09 +01:00
|
|
|
system symbol table. You would need to do this, for example, in
|
|
|
|
in the kernel build were the first task must be run from a program
|
|
|
|
on the file system. This option has no other effect.
|
|
|
|
|
2018-07-14 15:08:51 +02:00
|
|
|
Optionally, you can always call binfmt_setsymtab() from your
|
2018-03-16 16:34:09 +01:00
|
|
|
board-specific logic or, equivalently, call boardctl(BOARDIOC_APP_SYMTAB)
|
|
|
|
from your application initialization logic.
|
2017-02-10 16:32:55 +01:00
|
|
|
|
|
|
|
if EXECFUNCS_HAVE_SYMTAB
|
2019-08-26 03:28:04 +02:00
|
|
|
|
2018-07-15 19:20:37 +02:00
|
|
|
config EXECFUNCS_SYMTAB_ARRAY
|
|
|
|
string "Symbol table name used by exec[l|v]"
|
2017-02-10 16:32:55 +01:00
|
|
|
default "g_symtab"
|
|
|
|
---help---
|
|
|
|
The exec[l|v] and posix_spawn() functions are wrapper functions that
|
|
|
|
call the non-standard binfmt function 'exec'). The binfmt
|
|
|
|
function 'exec' needs to have (1) a symbol table that provides the
|
|
|
|
list of symbols exported by the base code, and (2) the number of
|
|
|
|
symbols in that table. This selection provides the name of that
|
|
|
|
symbol table.
|
|
|
|
|
2018-07-15 19:20:37 +02:00
|
|
|
config EXECFUNCS_NSYMBOLS_VAR
|
2018-08-11 01:30:17 +02:00
|
|
|
string "Name of variable holding the number of symbols"
|
2018-07-15 19:20:37 +02:00
|
|
|
default "g_nsymbols"
|
2017-02-10 16:32:55 +01:00
|
|
|
---help---
|
|
|
|
The exec[l|v] and posix_spawn() functions are wrapper functions that
|
|
|
|
call the non-standard binfmt function 'exec'). The binfmt
|
|
|
|
function 'exec' needs to have (1) a symbol table that provides the
|
|
|
|
list of symbols exported by the base code, and (2) the number of
|
2018-07-15 19:20:37 +02:00
|
|
|
symbols in that table. This selection provides the name of an 'int'
|
|
|
|
variable that contains the number of symbols in the symbol table.
|
2017-02-10 16:32:55 +01:00
|
|
|
|
2019-08-26 03:28:04 +02:00
|
|
|
config EXECFUNCS_SYSTEM_SYMTAB
|
2019-08-13 17:09:43 +02:00
|
|
|
bool "Generate and include system symbol table"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
Generate symbol table which includes symbols for all available
|
|
|
|
syscalls, libc and libm functions. It makes system significantly
|
|
|
|
larger but actual applications can reuse maximum from the system
|
|
|
|
image.
|
|
|
|
|
|
|
|
The symbol table array is named g_symtab and variable holding
|
|
|
|
number of exported symbols g_nsymbols. It matches expected defaults
|
|
|
|
from entries above. But they can be changed and generated symbol table
|
|
|
|
can be used as template by application.
|
2019-08-26 03:28:04 +02:00
|
|
|
|
2017-02-10 16:32:55 +01:00
|
|
|
endif # EXECFUNCS_HAVE_SYMTAB
|
|
|
|
endif # LIBC_EXECFUNCS
|
|
|
|
|
2021-03-15 10:35:47 +01:00
|
|
|
config SYMTAB_ORDEREDBYNAME
|
|
|
|
bool "Symbol Tables Ordered by Name"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
Select if the symbol table is ordered by symbol name. In this case,
|
|
|
|
the logic can perform faster lookups using a binary search.
|
|
|
|
Otherwise, the symbol table is assumed to be un-ordered and only
|
|
|
|
slow, linear searches are supported.
|
|
|
|
|
|
|
|
config SYMTAB_DECORATED
|
|
|
|
bool "Symbols are decorated with leading underscores"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
Select if symbols in relocatable objects are decorated with a leading
|
|
|
|
underscore. This option will remove the underscore from symbol names
|
|
|
|
when relocating a loadable object.
|
|
|
|
|
2017-02-10 16:32:55 +01:00
|
|
|
config POSIX_SPAWN_PROXY_STACKSIZE
|
|
|
|
int "Spawn Stack Size"
|
|
|
|
default 1024
|
|
|
|
---help---
|
|
|
|
If posix_spawn[p]() and task_spawn() use I/O redirection options,
|
|
|
|
they will require an intermediary/proxy task to muck with the file
|
|
|
|
descriptors. This configuration item specifies the stack size
|
|
|
|
used for the proxy. Default: 1024 bytes.
|
|
|
|
|
|
|
|
config TASK_SPAWN_DEFAULT_STACKSIZE
|
|
|
|
int "Default task_spawn Stack Size"
|
2020-03-27 02:51:03 +01:00
|
|
|
default DEFAULT_TASK_STACKSIZE
|
2017-02-10 16:32:55 +01:00
|
|
|
depends on !ARCH_ADDRENV
|
|
|
|
---help---
|
|
|
|
The actual size to use for the child task's stack can be set with
|
|
|
|
task_spawnattr_setstacksize(). This value specifies the default
|
|
|
|
stack size to use if task_spawnattr_setstacksize() is not used.
|
|
|
|
Default: 2048.
|
2017-02-10 17:04:56 +01:00
|
|
|
|
|
|
|
endmenu # Program Execution Options
|
2019-01-27 13:56:16 +01:00
|
|
|
|
|
|
|
config LIB_HOSTNAME
|
|
|
|
string "Host name for this device"
|
|
|
|
default ""
|
|
|
|
---help---
|
|
|
|
A unique name to identify device on the network
|