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.
This commit is contained in:
parent
4b49362719
commit
63c3772888
@ -398,7 +398,7 @@ examples/flash_test
|
||||
* CONFIG_MTD_SMART=y - SMART block driver support
|
||||
* CONFIG_NSH_BUILTIN_APPS=y - This example can only be built as an NSH
|
||||
command
|
||||
* CONFIG_BUILD_PROTECTED=n and CONFIG_BUILD_LOADABLE=n- This test uses
|
||||
* CONFIG_BUILD_PROTECTED=n and CONFIG_BUILD_KERNEL=n - This test uses
|
||||
internal OS interfaces and so is not available in the NUTTX kernel
|
||||
builds
|
||||
|
||||
@ -1496,7 +1496,7 @@ examples/relays
|
||||
relies on internal OS interfaces that are not normally available to a
|
||||
user-space program. As a result, this example cannot be used if a
|
||||
NuttX is built as a protected, supervisor kernel (CONFIG_BUILD_PROTECTED
|
||||
or CONFIG_BUILD_LOADABLE).
|
||||
or CONFIG_BUILD_KERNEL).
|
||||
|
||||
examples/rfid_readuid
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -6,7 +6,7 @@
|
||||
config EXAMPLES_FLASH_TEST
|
||||
tristate "SMART FLASH block device test"
|
||||
default n
|
||||
depends on (!BUILD_PROTECTED && !BUILD_LOADABLE) && MTD_SMART && NSH_BUILTIN_APPS
|
||||
depends on (!BUILD_PROTECTED && !BUILD_KERNEL) && MTD_SMART && NSH_BUILTIN_APPS
|
||||
---help---
|
||||
This logic performs a SMART flash block device test. This test
|
||||
performs a sector allocate, read, write, free and garbage collection
|
||||
|
@ -78,7 +78,7 @@ config EXAMPLES_I2SCHAR_BUFSIZE
|
||||
config EXAMPLES_I2SCHAR_DEVINIT
|
||||
bool "Architecture-specific device initialization"
|
||||
default 256
|
||||
depends on !BUILD_PROTECTED && !BUILD_LOADABLE
|
||||
depends on !BUILD_PROTECTED && !BUILD_KERNEL
|
||||
---help---
|
||||
Define if architecture-specific I2S device initialize is available.
|
||||
If defined, the platform specific code must provide a function
|
||||
|
@ -128,7 +128,7 @@ config EXAMPLES_MODULE_NOSTRIP
|
||||
config EXAMPLES_MODULE_LIBC
|
||||
bool "Link with LIBC"
|
||||
default n
|
||||
depends on !BUILD_LOADABLE && EXPERIMENTAL
|
||||
depends on EXPERIMENTAL
|
||||
---help---
|
||||
Link with the C library (and also math library if it was built).
|
||||
By default, all undefined symbols must be provided via a symbol
|
||||
@ -147,6 +147,6 @@ config EXAMPLES_MODULE_LIBC
|
||||
config EXAMPLES_MODULE_LIBGCC
|
||||
bool "Link with LIBGCC"
|
||||
default n
|
||||
depends on !BUILD_LOADABLE && EXPERIMENTAL
|
||||
depends on EXPERIMENTAL
|
||||
|
||||
endif
|
||||
|
@ -6,7 +6,7 @@
|
||||
config EXAMPLES_MTDPART
|
||||
tristate "MTD partition test"
|
||||
default n
|
||||
depends on MTD_PARTITION && !BUILD_PROTECTED && !BUILD_LOADABLE
|
||||
depends on MTD_PARTITION && !BUILD_PROTECTED && !BUILD_KERNEL
|
||||
---help---
|
||||
Enable the MTD partition test example.
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
config EXAMPLES_MTDRWB
|
||||
tristate "MTD R/W buffer test"
|
||||
default n
|
||||
depends on (MTD_WRBUFFER || MTD_READAHEAD) && !BUILD_PROTECTED && !BUILD_LOADABLE
|
||||
depends on (MTD_WRBUFFER || MTD_READAHEAD) && !BUILD_PROTECTED && !BUILD_KERNEL
|
||||
---help---
|
||||
Enable the MTD R/W buffer test example.
|
||||
|
||||
|
@ -133,7 +133,7 @@ config EXAMPLES_NETTEST_INIT
|
||||
bool "Initialize network"
|
||||
default n if NSH_BUILTIN_APPS
|
||||
default y if !NSH_BUILTIN_APPS
|
||||
depends on !BUILD_LOADABLE && !EXAMPLES_NETTEST_LOOPBACK
|
||||
depends on !EXAMPLES_NETTEST_LOOPBACK
|
||||
---help---
|
||||
Include logic to initialize the network. This should not be done if
|
||||
the network is already initialized when nettest runs. This is
|
||||
|
@ -7,7 +7,7 @@ config EXAMPLES_NXFLAT
|
||||
bool "NXFLAT example"
|
||||
default n
|
||||
select LIBC_EXECFUNCS
|
||||
depends on NXFLAT && !BUILD_LOADABLE
|
||||
depends on NXFLAT
|
||||
---help---
|
||||
Enable the NXFLAT example
|
||||
|
||||
|
@ -67,7 +67,7 @@ endif # !EXAMPLES_SOTEST_BUILTINFS
|
||||
config EXAMPLES_SOTEST_LIBC
|
||||
bool "Link with LIBC"
|
||||
default n
|
||||
depends on !BUILD_LOADABLE && EXPERIMENTAL
|
||||
depends on EXPERIMENTAL
|
||||
---help---
|
||||
Link with the C library (and also math library if it was built).
|
||||
By default, all undefined symbols must be provided via a symbol
|
||||
@ -86,6 +86,6 @@ config EXAMPLES_SOTEST_LIBC
|
||||
config EXAMPLES_SOTEST_LIBGCC
|
||||
bool "Link with LIBGCC"
|
||||
default n
|
||||
depends on !BUILD_LOADABLE && EXPERIMENTAL
|
||||
depends on EXPERIMENTAL
|
||||
|
||||
endif
|
||||
|
@ -143,7 +143,7 @@ config EXAMPLES_TCPBLASTER_INIT
|
||||
bool "Initialize network"
|
||||
default n if NSH_BUILTIN_APPS
|
||||
default y if !NSH_BUILTIN_APPS
|
||||
depends on !BUILD_LOADABLE && !EXAMPLES_TCPBLASTER_LOOPBACK
|
||||
depends on !EXAMPLES_TCPBLASTER_LOOPBACK
|
||||
---help---
|
||||
Include logic to initialize the network. This should not be done if
|
||||
the network is already initialized when tcpblaster runs. This is
|
||||
|
@ -60,7 +60,7 @@ config EXAMPLES_UDPBLASTER_INIT
|
||||
bool "Initialize network"
|
||||
default n if NSH_BUILTIN_APPS
|
||||
default y if !NSH_BUILTIN_APPS
|
||||
depends on !BUILD_LOADABLE && !EXAMPLES_UDPBLASTER_LOOPBACK
|
||||
depends on !EXAMPLES_UDPBLASTER_LOOPBACK
|
||||
---help---
|
||||
Include logic to initialize the network. This should not be done if
|
||||
the network is already initialized when udpblaster runs. This is
|
||||
|
@ -47,7 +47,7 @@
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_BUILD_LOADABLE
|
||||
#ifdef CONFIG_BUILD_KERNEL
|
||||
/* In the kernel build mode, we need to use a named semaphore so that all
|
||||
* processes will share the same, named semaphore instance.
|
||||
*/
|
||||
@ -59,7 +59,7 @@
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CONFIG_BUILD_LOADABLE
|
||||
#ifndef CONFIG_BUILD_KERNEL
|
||||
/* In the FLAT and PROTECTED build modes, we do not need to bother with a
|
||||
* named semaphore. We use a single global semaphore in theses cases.
|
||||
*/
|
||||
@ -92,7 +92,7 @@ int passwd_lock(FAR sem_t **semp)
|
||||
{
|
||||
FAR sem_t *sem;
|
||||
|
||||
#ifdef CONFIG_BUILD_LOADABLE
|
||||
#ifdef CONFIG_BUILD_KERNEL
|
||||
/* Open the shared, named semaphore */
|
||||
|
||||
sem = sem_open(PASSWD_SEMNAME, O_CREAT, 0644, 1);
|
||||
@ -127,7 +127,7 @@ int passwd_unlock(FAR sem_t *sem)
|
||||
|
||||
sem_post(sem);
|
||||
|
||||
#ifdef CONFIG_BUILD_LOADABLE
|
||||
#ifdef CONFIG_BUILD_KERNEL
|
||||
/* Close the named semaphore */
|
||||
|
||||
(void)sem_close(sem);
|
||||
|
@ -561,7 +561,7 @@
|
||||
* library where they will become accessible to application code.
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_BUILD_PROTECTED) || defined(CONFIG_BUILD_LOADABLE)
|
||||
#if defined(CONFIG_BUILD_PROTECTED) || defined(CONFIG_BUILD_KERNEL)
|
||||
# undef CONFIG_NSH_DISABLE_MKRD /* 'mkrd' depends on ramdisk_register */
|
||||
# define CONFIG_NSH_DISABLE_MKRD 1
|
||||
#endif
|
||||
|
@ -58,7 +58,7 @@
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CONFIG_BUILD_LOADABLE
|
||||
#ifndef CONFIG_BUILD_KERNEL
|
||||
static sem_t g_exclsem = SEM_INITIALIZER(1);
|
||||
#endif
|
||||
|
||||
@ -78,7 +78,7 @@ static uint8_t g_buf2[MAX_BLOCKSIZE + LZF_MAX_HDR_SIZE + 16];
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CONFIG_BUILD_LOADABLE
|
||||
#ifndef CONFIG_BUILD_KERNEL
|
||||
static void lzf_exit(int exitcode) noreturn_function;
|
||||
static void lzf_exit(int exitcode)
|
||||
{
|
||||
@ -443,7 +443,7 @@ int lzf_main(int argc, FAR char *argv[])
|
||||
int optc;
|
||||
int ret = 0;
|
||||
|
||||
#ifndef CONFIG_BUILD_LOADABLE
|
||||
#ifndef CONFIG_BUILD_KERNEL
|
||||
/* Get exclusive access to the global variables. Global variables are
|
||||
* used because the hash table and buffers are too large to allocate on
|
||||
* the embedded stack. But the use of global variables has the downside
|
||||
|
@ -106,8 +106,7 @@
|
||||
*/
|
||||
|
||||
#undef HAVE_NSH_COMMAND
|
||||
#if (defined(CONFIG_SYSTEM_SYSTEM) || defined(CONFIG_SYSTEM_POPEN)) && \
|
||||
defined(CONFIG_BUILD_LOADABLE)
|
||||
#if defined(CONFIG_SYSTEM_SYSTEM) || defined(CONFIG_SYSTEM_POPEN)
|
||||
# define HAVE_NSH_COMMAND 1
|
||||
#endif
|
||||
|
||||
@ -285,7 +284,7 @@ int nsh_main(int argc, char *argv[])
|
||||
* 2) As a single command processor. In this case, the single command is
|
||||
* is provided in argv[1].
|
||||
*
|
||||
* NOTE: The latter mode is only available if CONFIG_BUILD_LOADABLE=y.
|
||||
* NOTE: The latter mode is only available if CONFIG_SYSTEM_NSH=m.
|
||||
* In that case, this main() function will be built as a process. The
|
||||
* process will be started with a command by the implementations of the
|
||||
* system() and popen() interfaces.
|
||||
|
@ -18,7 +18,7 @@ if SYSTEM_POPEN
|
||||
config SYSTEM_POPEN_SHPATH
|
||||
string "Path to shell command"
|
||||
default "/bin/nsh"
|
||||
depends on BUILD_LOADABLE
|
||||
depends on SYSTEM_NSH=m
|
||||
---help---
|
||||
This is the full path to the program in a mounted file system that
|
||||
implements the system() command. That is, a program that starts the
|
||||
|
@ -261,7 +261,7 @@ FILE *popen(FAR const char *command, FAR const char *mode)
|
||||
argv[0] = (FAR char *)command;
|
||||
argv[1] = NULL;
|
||||
|
||||
#ifdef CONFIG_BUILD_LOADABLE
|
||||
#ifdef CONFIG_SYSTEM_POPEN_SHPATH
|
||||
errcode = posix_spawn(&container->shell, CONFIG_SYSTEM_POPEN_SHPATH,
|
||||
&file_actions, &attr, argv,
|
||||
(FAR char * const *)NULL);
|
||||
|
@ -17,7 +17,7 @@ if SYSTEM_SYSTEM
|
||||
config SYSTEM_SYSTEM_SHPATH
|
||||
string "Path to shell command"
|
||||
default "/bin/nsh"
|
||||
depends on BUILD_LOADABLE
|
||||
depends on SYSTEM_NSH=m
|
||||
---help---
|
||||
This is the full path to the program in a mounted file system that
|
||||
implements the system() command. That is, a program that starts the
|
||||
|
@ -144,7 +144,7 @@ int system(FAR const char *cmd)
|
||||
argv[0] = (FAR char *)cmd;
|
||||
argv[1] = NULL;
|
||||
|
||||
#ifdef CONFIG_BUILD_LOADABLE
|
||||
#ifdef CONFIG_SYSTEM_SYSTEM_SHPATH
|
||||
errcode = posix_spawn(&pid, CONFIG_SYSTEM_SYSTEM_SHPATH, NULL, &attr,
|
||||
argv, (FAR char * const *)NULL);
|
||||
#else
|
||||
|
@ -79,4 +79,4 @@ system/usbmsc
|
||||
it relies on internal OS interfaces that are not normally available to a
|
||||
user-space program. As a result, this add-on cannot be used if a
|
||||
NuttX is built as a protected, supervisor kernel (CONFIG_BUILD_PROTECTED
|
||||
or CONFIG_BUILD_LOADABLE).
|
||||
or CONFIG_BUILD_KERNEL).
|
||||
|
Loading…
x
Reference in New Issue
Block a user