From ec1e1a10fd720816e2b8402783fbbba69e411729 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 20 Jun 2016 16:33:20 -0600 Subject: [PATCH] Make system: Build the drivers/ directory even if file descriptors are disabled. There are still things that may be needed from the drivers/ director (such as SYSLOG logic or lower half drivers). --- ChangeLog | 4 ++++ Directories.mk | 9 ++++++--- FlatLibs.mk | 11 +++++++---- KernelLibs.mk | 11 +++++++---- ProtectedLibs.mk | 11 +++++++---- configs/stm32f103-minimum/README.txt | 10 ++++++++++ 6 files changed, 41 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 05f5d80320..39e30c16bf 100755 --- a/ChangeLog +++ b/ChangeLog @@ -12105,3 +12105,7 @@ * SYSLOG: Remove lowsyslog(), vlowsyslog(), and associated macros *llinfo(), *llwarn(), and llerr(). In the redesigned syslog() logic, these serve no purpose (2016-06-20). + * Make system: Need to build the drivers/ directory even it file + descriptors are not supported. There are things in the drivers/ + directory that are still needed (like SYSLOG logic). + diff --git a/Directories.mk b/Directories.mk index 6eeedc79e8..2e42a8a435 100644 --- a/Directories.mk +++ b/Directories.mk @@ -59,7 +59,10 @@ endif # # FSDIRS depend on file descriptor support; NONFSDIRS do not (except for parts # of FSDIRS). We will exclude FSDIRS from the build if file descriptor -# support is disabled +# support is disabled. NOTE that drivers, in general, depends on file +# descriptor support but is always built because there are other components +# in the drivers directory that are needed even if file descriptors are not +# supported. # CONTEXTDIRS include directories that have special, one-time pre-build # requirements. Normally this includes things like auto-generation of # configuration specific files or creation of configurable symbolic links @@ -69,8 +72,8 @@ endif # be cleaned to prevent garbage from collecting in them when changing # configurations. -NONFSDIRS = sched configs $(ARCH_SRC) $(NUTTX_ADDONS) -FSDIRS = fs drivers binfmt +NONFSDIRS = sched drivers configs $(ARCH_SRC) $(NUTTX_ADDONS) +FSDIRS = fs binfmt CONTEXTDIRS = $(APPDIR) USERDIRS = OTHERDIRS = lib diff --git a/FlatLibs.mk b/FlatLibs.mk index 13dcc6c340..69fe6a9fa0 100644 --- a/FlatLibs.mk +++ b/FlatLibs.mk @@ -45,6 +45,12 @@ NUTTXLIBS = lib$(DELIM)libsched$(LIBEXT) USERLIBS = +# Driver support. Generally depends on file descriptor support but there +# are some components in the drivers directory that are needed even if file +# descriptors are not supported. + +NUTTXLIBS += lib$(DELIM)libdrivers$(LIBEXT) + # Add libraries for board support NUTTXLIBS += lib$(DELIM)libconfigs$(LIBEXT) @@ -89,11 +95,8 @@ ifeq ($(CONFIG_NFILE_DESCRIPTORS),0) ifneq ($(CONFIG_NSOCKET_DESCRIPTORS),0) NUTTXLIBS += lib$(DELIM)libfs$(LIBEXT) endif -ifeq ($(CONFIG_NET),y) -NUTTXLIBS += lib$(DELIM)libdrivers$(LIBEXT) -endif else -NUTTXLIBS += lib$(DELIM)libfs$(LIBEXT) lib$(DELIM)libdrivers$(LIBEXT) lib$(DELIM)libbinfmt$(LIBEXT) +NUTTXLIBS += lib$(DELIM)libfs$(LIBEXT) lib$(DELIM)libbinfmt$(LIBEXT) endif # Add libraries for the NX graphics sub-system diff --git a/KernelLibs.mk b/KernelLibs.mk index a7888d714d..719430b6c9 100644 --- a/KernelLibs.mk +++ b/KernelLibs.mk @@ -45,6 +45,12 @@ NUTTXLIBS = lib$(DELIM)libsched$(LIBEXT) USERLIBS = +# Driver support. Generally depends on file descriptor support but there +# are some components in the drivers directory that are needed even if file +# descriptors are not supported. + +NUTTXLIBS += lib$(DELIM)libdrivers$(LIBEXT) + # Add libraries for board support NUTTXLIBS += lib$(DELIM)libconfigs$(LIBEXT) @@ -83,11 +89,8 @@ ifeq ($(CONFIG_NFILE_DESCRIPTORS),0) ifneq ($(CONFIG_NSOCKET_DESCRIPTORS),0) NUTTXLIBS += lib$(DELIM)libfs$(LIBEXT) endif -ifeq ($(CONFIG_NET),y) -NUTTXLIBS += lib$(DELIM)libdrivers$(LIBEXT) -endif else -NUTTXLIBS += lib$(DELIM)libfs$(LIBEXT) lib$(DELIM)libdrivers$(LIBEXT) lib$(DELIM)libbinfmt$(LIBEXT) +NUTTXLIBS += lib$(DELIM)libfs$(LIBEXT) lib$(DELIM)libbinfmt$(LIBEXT) endif # Add libraries for the NX graphics sub-system diff --git a/ProtectedLibs.mk b/ProtectedLibs.mk index 70185eacf4..4f2e2c6072 100644 --- a/ProtectedLibs.mk +++ b/ProtectedLibs.mk @@ -45,6 +45,12 @@ NUTTXLIBS = lib$(DELIM)libsched$(LIBEXT) USERLIBS = +# Driver support. Generally depends on file descriptor support but there +# are some components in the drivers directory that are needed even if file +# descriptors are not supported. + +NUTTXLIBS += lib$(DELIM)libdrivers$(LIBEXT) + # Add libraries for board support NUTTXLIBS += lib$(DELIM)libconfigs$(LIBEXT) @@ -89,11 +95,8 @@ ifeq ($(CONFIG_NFILE_DESCRIPTORS),0) ifneq ($(CONFIG_NSOCKET_DESCRIPTORS),0) NUTTXLIBS += lib$(DELIM)libfs$(LIBEXT) endif -ifeq ($(CONFIG_NET),y) -NUTTXLIBS += lib$(DELIM)libdrivers$(LIBEXT) -endif else -NUTTXLIBS += lib$(DELIM)libfs$(LIBEXT) lib$(DELIM)libdrivers$(LIBEXT) lib$(DELIM)libbinfmt$(LIBEXT) +NUTTXLIBS += lib$(DELIM)libfs$(LIBEXT) lib$(DELIM)libbinfmt$(LIBEXT) endif # Add libraries for the NX graphics sub-system diff --git a/configs/stm32f103-minimum/README.txt b/configs/stm32f103-minimum/README.txt index aabde35057..c23afa37d9 100644 --- a/configs/stm32f103-minimum/README.txt +++ b/configs/stm32f103-minimum/README.txt @@ -548,6 +548,16 @@ Where is one of the following: console device was about 5 KB (primarily OS support) and the cost of the NSH 'ls' command (including OS support) is about 2KB. + 2016-02-20: There has been some size increase due primarily, I believe + to the enhanced SYSLOG logic: + + $ arm-none-eabi-size nuttx + text data bss dec hex filename + 13002 8 816 13826 3602 nuttx + + No single large new things were included in the link. Apparently + several new smaller things are now included. No idea what. + nsh: --- Configures the NuttShell (nsh) located at apps/examples/nsh. This