Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -335,15 +335,9 @@ if(NOT EXISTS ${CMAKE_BINARY_DIR}/.config OR NOT "${NUTTX_DEFCONFIG}" STREQUAL
# store original expanded .config
configure_file(${CMAKE_BINARY_DIR}/.config ${CMAKE_BINARY_DIR}/.config.orig
COPYONLY)

string(REPLACE "\n" ";" KCONFIG_ESTRING ${KCONFIG_ERROR})
foreach(estring ${KCONFIG_ESTRING})
string(REGEX MATCH "the 'modules' option is not supported" result
${estring})
if(NOT result)
message(WARNING "Kconfig Configuration Error: ${estring}")
endif()
endforeach()
if(KCONFIG_ERROR)
message(WARNING "Kconfig Configuration Error: ${KCONFIG_ERROR}")
endif()

if(KCONFIG_STATUS AND NOT KCONFIG_STATUS EQUAL 0)
message(
Expand Down
2 changes: 1 addition & 1 deletion Documentation/components/libs/libc/index.rst
Comment thread
cederom marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ Symbol tables have differing usefulness in different NuttX build modes:
share resources with other user code (but should use system calls to
interact with the OS).

#. But in the kernel build mode (``CONFIG_BUILD_LOADABLE``), only fully linked
#. But in the kernel build mode (``CONFIG_MODULES``), only fully linked
executables loadable via ``execl()``, ``execv()``, or ``posix_spawan()``
can be used.
There is no use for a symbol table with the kernel build since all
Expand Down
5 changes: 0 additions & 5 deletions Documentation/quickstart/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,6 @@ If you are a working on Windows, which also need the support of windows-curses:

pip install windows-curses

.. tip::
It should be noted that kconfiglib does not support **modules** attributes.
(https://github.com/ulfalizer/Kconfiglib/blob/master/kconfiglib.py#L3239-L3254,
the community seems to have stopped updating), if the features depends on
``CONFIG_BUILD_LOADABLE``, kconfiglib may not be a good choice.

Toolchain
=========
Expand Down
15 changes: 9 additions & 6 deletions Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -273,14 +273,17 @@ config BASE_DEFCONFIG
current configuration. It is useful for getting the current configuration
on runtime.

config BUILD_LOADABLE
config MODULES
bool
option modules
---help---
Automatically selected if KERNEL build is selected.
This selection only effects the behavior of the 'make export'
target and currently has no effect unless you wish to build
loadable applications in a FLAT build.
This selection marks the implementation of Kconfig
to enable the module build function, and is used to
enable 'm' in the triate state. Its semantics are
consistent with Kernel. This selection also effects
the behavior of the 'make export' target and currently
has no effect unless you wish to build loadable applications
in a FLAT build.

choice
prompt "Memory organization"
Expand Down Expand Up @@ -312,8 +315,8 @@ config BUILD_PROTECTED
config BUILD_KERNEL
bool "NuttX kernel build"
depends on ARCH_USE_MMU && ARCH_ADDRENV
select BUILD_LOADABLE
select LIB_SYSCALL
select MODULES
---help---
Builds NuttX as a separately compiled kernel. No applications are
built. All user applications must reside in a file system where
Expand Down
2 changes: 1 addition & 1 deletion binfmt/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ config PATH_INITIAL

config BINFMT_LOADABLE
bool
select BUILD_LOADABLE
select MODULES
default n
---help---
Automatically selected if a loadable binary format is selected.
Expand Down
2 changes: 1 addition & 1 deletion cmake/nuttx_add_application.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ function(nuttx_add_application)

# loadable build requires applying ELF flags to all applications

if(CONFIG_BUILD_LOADABLE)
if(CONFIG_MODULES)
target_compile_options(
${TARGET}
PRIVATE
Expand Down
29 changes: 12 additions & 17 deletions tools/Unix.mk
Original file line number Diff line number Diff line change
Expand Up @@ -638,10 +638,7 @@ pass2dep: context tools/mkdeps$(HOSTEXEEXT) tools/cnvwindeps$(HOSTEXEEXT)
KCONFIG_ENV = APPSDIR=${CONFIG_APPS_DIR} EXTERNALDIR=$(EXTERNALDIR)
KCONFIG_ENV += APPSBINDIR=${CONFIG_APPS_DIR} BINDIR=${TOPDIR}

LOADABLE = $(shell grep "=m$$" $(TOPDIR)/.config)
ifeq ($(CONFIG_BUILD_LOADABLE)$(LOADABLE),)
KCONFIG_LIB = $(shell command -v menuconfig 2> /dev/null)
endif
KCONFIG_LIB = $(shell command -v menuconfig 2> /dev/null)

# Prefer "kconfiglib" if host OS supports it

Expand All @@ -657,21 +654,19 @@ define kconfig_tweak_disable
kconfig-tweak --file $1 -u $2
endef
else
KCONFIG_WARNING = if [ -s kwarning ]; \
then rm kwarning; \
exit 1; \
else \
rm kwarning; \
fi
MODULE_WARNING = "warning: the 'modules' option is not supported"
PURGE_MODULE_WARNING = 2> >(grep -v ${MODULE_WARNING} | tee kwarning) | cat && ${KCONFIG_WARNING}
KCONFIG_OLDCONFIG = oldconfig ${PURGE_MODULE_WARNING}
KCONFIG_OLDDEFCONFIG = olddefconfig ${PURGE_MODULE_WARNING}
KCONFIG_MENUCONFIG = menuconfig $(subst | cat,,${PURGE_MODULE_WARNING})
KCONFIG_NCONFIG = guiconfig ${PURGE_MODULE_WARNING}
KCONFIG_WARNING = 2> >(tee kwarning) | cat && if [ -s kwarning ]; \
then rm kwarning; \
exit 1; \
else \
rm kwarning; \
fi
KCONFIG_OLDCONFIG = oldconfig ${KCONFIG_WARNING}
KCONFIG_OLDDEFCONFIG = olddefconfig ${KCONFIG_WARNING}
KCONFIG_MENUCONFIG = menuconfig $(subst | cat,,${KCONFIG_WARNING})
KCONFIG_NCONFIG = guiconfig ${KCONFIG_WARNING}
KCONFIG_QCONFIG = ${KCONFIG_NCONFIG}
KCONFIG_GCONFIG = ${KCONFIG_NCONFIG}
KCONFIG_SAVEDEFCONFIG = savedefconfig --out defconfig.tmp ${PURGE_MODULE_WARNING}
KCONFIG_SAVEDEFCONFIG = savedefconfig --out defconfig.tmp ${KCONFIG_WARNING}
define kconfig_tweak_disable
$(Q) sed -i'.orig' '/$2/d' $1
$(Q) rm -f $1.orig
Expand Down