From 6dda185e8a905df58240e2ff8682e38854148030 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 1 Dec 2016 13:28:57 -0600 Subject: [PATCH] NX: Remove configuration CONFIG_NX_NXSTART. nx_start.c is now built unconditionally in multi-user mode. --- configs/mikroe-stm32f4/fulldemo/defconfig | 1 - configs/sam3u-ek/nxwm/defconfig | 1 - configs/sam4e-ek/nxwm/defconfig | 1 - configs/sama5d3x-ek/nxwm/defconfig | 1 - configs/sama5d4-ek/nxwm/defconfig | 1 - configs/samv71-xult/nxwm/defconfig | 1 - configs/samv71-xult/vnxwm/defconfig | 1 - configs/shenzhou/nxwm/defconfig | 1 - configs/sim/nxwm/defconfig | 1 - configs/stm3210e-eval/nxterm/defconfig | 1 - configs/stm3220g-eval/nxwm/defconfig | 1 - configs/stm3240g-eval/knxwm/defconfig | 1 - configs/stm3240g-eval/nxterm/defconfig | 1 - configs/stm3240g-eval/nxwm/defconfig | 1 - configs/stm3240g-eval/src/stm32_boot.c | 24 ++++++++--------------- configs/stm32f429i-disco/lcd/defconfig | 1 - graphics/Kconfig | 11 ----------- graphics/nxmu/Make.defs | 3 --- graphics/nxmu/nx_start.c | 7 +++---- include/nuttx/nx/nx.h | 5 ++++- 20 files changed, 15 insertions(+), 50 deletions(-) diff --git a/configs/mikroe-stm32f4/fulldemo/defconfig b/configs/mikroe-stm32f4/fulldemo/defconfig index d57290807f..83cce8b291 100644 --- a/configs/mikroe-stm32f4/fulldemo/defconfig +++ b/configs/mikroe-stm32f4/fulldemo/defconfig @@ -1162,7 +1162,6 @@ CONFIG_NX_MULTIUSER=y CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 CONFIG_NX_MXCLIENTMSGS=16 -# CONFIG_NX_NXSTART is not set # # Memory Management diff --git a/configs/sam3u-ek/nxwm/defconfig b/configs/sam3u-ek/nxwm/defconfig index 1aa256be23..a838cbbef3 100644 --- a/configs/sam3u-ek/nxwm/defconfig +++ b/configs/sam3u-ek/nxwm/defconfig @@ -782,7 +782,6 @@ CONFIG_NX_MULTIUSER=y CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 CONFIG_NX_MXCLIENTMSGS=16 -# CONFIG_NX_NXSTART is not set # # Memory Management diff --git a/configs/sam4e-ek/nxwm/defconfig b/configs/sam4e-ek/nxwm/defconfig index 06934765a9..c388946f72 100644 --- a/configs/sam4e-ek/nxwm/defconfig +++ b/configs/sam4e-ek/nxwm/defconfig @@ -1054,7 +1054,6 @@ CONFIG_NX_MULTIUSER=y CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 CONFIG_NX_MXCLIENTMSGS=16 -# CONFIG_NX_NXSTART is not set # # Memory Management diff --git a/configs/sama5d3x-ek/nxwm/defconfig b/configs/sama5d3x-ek/nxwm/defconfig index d041a39707..cae9776438 100644 --- a/configs/sama5d3x-ek/nxwm/defconfig +++ b/configs/sama5d3x-ek/nxwm/defconfig @@ -853,7 +853,6 @@ CONFIG_NX_MULTIUSER=y CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 CONFIG_NX_MXCLIENTMSGS=16 -# CONFIG_NX_NXSTART is not set # # Memory Management diff --git a/configs/sama5d4-ek/nxwm/defconfig b/configs/sama5d4-ek/nxwm/defconfig index c3f7f7e16a..16124e587c 100644 --- a/configs/sama5d4-ek/nxwm/defconfig +++ b/configs/sama5d4-ek/nxwm/defconfig @@ -1146,7 +1146,6 @@ CONFIG_NX_MULTIUSER=y CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 CONFIG_NX_MXCLIENTMSGS=16 -# CONFIG_NX_NXSTART is not set # # Memory Management diff --git a/configs/samv71-xult/nxwm/defconfig b/configs/samv71-xult/nxwm/defconfig index 033561fc58..b3763ac745 100644 --- a/configs/samv71-xult/nxwm/defconfig +++ b/configs/samv71-xult/nxwm/defconfig @@ -898,7 +898,6 @@ CONFIG_NX_MULTIUSER=y CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 CONFIG_NX_MXCLIENTMSGS=16 -# CONFIG_NX_NXSTART is not set # # Memory Management diff --git a/configs/samv71-xult/vnxwm/defconfig b/configs/samv71-xult/vnxwm/defconfig index 9ad4941d6e..6a5cce92ce 100644 --- a/configs/samv71-xult/vnxwm/defconfig +++ b/configs/samv71-xult/vnxwm/defconfig @@ -1040,7 +1040,6 @@ CONFIG_NX_MULTIUSER=y CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 CONFIG_NX_MXCLIENTMSGS=16 -# CONFIG_NX_NXSTART is not set CONFIG_VNCSERVER=y # CONFIG_VNCSERVER_PROTO3p3 is not set CONFIG_VNCSERVER_PROTO3p8=y diff --git a/configs/shenzhou/nxwm/defconfig b/configs/shenzhou/nxwm/defconfig index b486a69964..fec63ca1bf 100644 --- a/configs/shenzhou/nxwm/defconfig +++ b/configs/shenzhou/nxwm/defconfig @@ -1220,7 +1220,6 @@ CONFIG_NX_MULTIUSER=y CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 CONFIG_NX_MXCLIENTMSGS=16 -# CONFIG_NX_NXSTART is not set # # Memory Management diff --git a/configs/sim/nxwm/defconfig b/configs/sim/nxwm/defconfig index 68ad712147..bb03dfb47b 100644 --- a/configs/sim/nxwm/defconfig +++ b/configs/sim/nxwm/defconfig @@ -519,7 +519,6 @@ CONFIG_NX_MULTIUSER=y CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 CONFIG_NX_MXCLIENTMSGS=16 -# CONFIG_NX_NXSTART is not set # # Memory Management diff --git a/configs/stm3210e-eval/nxterm/defconfig b/configs/stm3210e-eval/nxterm/defconfig index 2733e516ea..0bf17efa49 100644 --- a/configs/stm3210e-eval/nxterm/defconfig +++ b/configs/stm3210e-eval/nxterm/defconfig @@ -1024,7 +1024,6 @@ CONFIG_NX_MULTIUSER=y CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 CONFIG_NX_MXCLIENTMSGS=16 -# CONFIG_NX_NXSTART is not set # # Memory Management diff --git a/configs/stm3220g-eval/nxwm/defconfig b/configs/stm3220g-eval/nxwm/defconfig index c1097ac55b..27fc76713d 100644 --- a/configs/stm3220g-eval/nxwm/defconfig +++ b/configs/stm3220g-eval/nxwm/defconfig @@ -1248,7 +1248,6 @@ CONFIG_NX_MULTIUSER=y CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 CONFIG_NX_MXCLIENTMSGS=16 -# CONFIG_NX_NXSTART is not set # # Memory Management diff --git a/configs/stm3240g-eval/knxwm/defconfig b/configs/stm3240g-eval/knxwm/defconfig index a8f21ca593..364413a4fa 100644 --- a/configs/stm3240g-eval/knxwm/defconfig +++ b/configs/stm3240g-eval/knxwm/defconfig @@ -1056,7 +1056,6 @@ CONFIG_NX_MULTIUSER=y CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 CONFIG_NX_MXCLIENTMSGS=16 -CONFIG_NX_NXSTART=y # CONFIG_NXSTART_EXTERNINIT is not set CONFIG_NXSTART_SERVERPRIO=110 CONFIG_NXSTART_SERVERSTACK=1596 diff --git a/configs/stm3240g-eval/nxterm/defconfig b/configs/stm3240g-eval/nxterm/defconfig index 3acf60bb0b..dad2e32b82 100644 --- a/configs/stm3240g-eval/nxterm/defconfig +++ b/configs/stm3240g-eval/nxterm/defconfig @@ -1204,7 +1204,6 @@ CONFIG_NX_MULTIUSER=y CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 CONFIG_NX_MXCLIENTMSGS=16 -# CONFIG_NX_NXSTART is not set # # Memory Management diff --git a/configs/stm3240g-eval/nxwm/defconfig b/configs/stm3240g-eval/nxwm/defconfig index d84d697338..ca57da68e3 100644 --- a/configs/stm3240g-eval/nxwm/defconfig +++ b/configs/stm3240g-eval/nxwm/defconfig @@ -1245,7 +1245,6 @@ CONFIG_NX_MULTIUSER=y CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 CONFIG_NX_MXCLIENTMSGS=16 -# CONFIG_NX_NXSTART is not set # # Memory Management diff --git a/configs/stm3240g-eval/src/stm32_boot.c b/configs/stm3240g-eval/src/stm32_boot.c index bfab437e4a..61daf3d2d7 100644 --- a/configs/stm3240g-eval/src/stm32_boot.c +++ b/configs/stm3240g-eval/src/stm32_boot.c @@ -49,11 +49,11 @@ * Pre-processor Definitions ************************************************************************************/ /* Configuration ********************************************************************/ -/* Should we initialize the NX server? This is done for NxWidgets (CONFIG_NXWIDGETS=y) - * if nx_start() is available (CONFIG_NX_NXSTART=y) and if the NxWidget::CNxServer - * class expects the RTOS to do the NX initialization (CONFIG_NXWIDGET_SERVERINIT=n). - * This combination of settings is normally only used in the kernel build mode - * (CONFIG_BUILD_PROTECTED) when NxWidgets is unable to initialize NX from user-space. +/* Should we initialize the NX server using nx_start? This is done for NxWidgets + * (CONFIG_NXWIDGETS=y) and if the NxWidget::CNxServer class expects the RTOS do the + * the NX initialization (CONFIG_NXWIDGET_SERVERINIT=n). This combination of + * settings is normally only used in the kernel build mode* (CONFIG_BUILD_PROTECTED) + * when NxWidgets is unable to initialize NX from user-space. */ #undef HAVE_NXSTART @@ -62,17 +62,9 @@ # undef CONFIG_NX_START #endif -#if defined(CONFIG_NXWIDGETS) -# if defined(CONFIG_NX_NXSTART) -# if !defined(CONFIG_NXWIDGET_SERVERINIT) -# define HAVE_NXSTART -# include -# endif -# else -# if !defined(CONFIG_NXWIDGET_SERVERINIT) && defined(CONFIG_BUILD_PROTECTED) -# error CONFIG_NX_NXSTART=y is needed -# endif -# endif +#if defined(CONFIG_NXWIDGETS) && !defined(CONFIG_NXWIDGET_SERVERINIT) +# define HAVE_NXSTART +# include #endif /* Should we initialize the touchscreen for the NxWM (CONFIG_NXWM=y)? This diff --git a/configs/stm32f429i-disco/lcd/defconfig b/configs/stm32f429i-disco/lcd/defconfig index b3d098ed09..16875b0a0a 100644 --- a/configs/stm32f429i-disco/lcd/defconfig +++ b/configs/stm32f429i-disco/lcd/defconfig @@ -989,7 +989,6 @@ CONFIG_NX_MULTIUSER=y CONFIG_NX_BLOCKING=y CONFIG_NX_MXSERVERMSGS=32 CONFIG_NX_MXCLIENTMSGS=16 -# CONFIG_NX_NXSTART is not set # # Memory Management diff --git a/graphics/Kconfig b/graphics/Kconfig index 02e0205229..aa6ad25258 100644 --- a/graphics/Kconfig +++ b/graphics/Kconfig @@ -691,16 +691,6 @@ config NX_MXCLIENTMSGS flooding of the client or server with too many messages (PREALLOC_MQ_MSGS controls how many messages are pre-allocated). -config NX_NXSTART - bool "nx_start()" - default n - ---help--- - If this option is selected, then the nx_start() interface will be - built. The nx_start() interface provides a single call to initialize - and start the NX server. - -if NX_NXSTART - config NXSTART_EXTERNINIT bool "External display Initialization" default n @@ -743,7 +733,6 @@ config NXSTART_VPLANE ---help--- Only a single video plane is supported. Default: 0 -endif # NX_NXSTART endif # NX_MULTIUSER source "graphics/vnc/Kconfig" diff --git a/graphics/nxmu/Make.defs b/graphics/nxmu/Make.defs index 61016426c4..9c486dd87e 100644 --- a/graphics/nxmu/Make.defs +++ b/graphics/nxmu/Make.defs @@ -38,10 +38,7 @@ ifeq ($(CONFIG_NX_MULTIUSER),y) CSRCS += nxmu_kbdin.c nxmu_mouse.c nxmu_openwindow.c nxmu_redrawreq.c CSRCS += nxmu_releasebkgd.c nxmu_requestbkgd.c nxmu_reportposition.c CSRCS += nxmu_sendclient.c nxmu_sendclientwindow.c nxmu_server.c - -ifeq ($(CONFIG_NX_NXSTART),y) CSRCS += nx_start.c -endif DEPPATH += --dep-path nxmu CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxmu} diff --git a/graphics/nxmu/nx_start.c b/graphics/nxmu/nx_start.c index 3c3e6446d9..f6dca53b18 100644 --- a/graphics/nxmu/nx_start.c +++ b/graphics/nxmu/nx_start.c @@ -51,8 +51,6 @@ #include "nxfe.h" -#ifdef CONFIG_NX_NXSTART - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -155,6 +153,9 @@ int nx_server(int argc, char *argv[]) * work in the NuttX kernel build because the resources required by the * NX server are private to the kernel mode logic. * + * nx_start() can be called (indirectly) from applications via the + * boardctl() interface with the BOARDIOC_NX_START command. + * * Input Parameters: * None * @@ -193,5 +194,3 @@ int nx_start(void) usleep(50*1000); return OK; } - -#endif /* CONFIG_NX_NXSTART */ diff --git a/include/nuttx/nx/nx.h b/include/nuttx/nx/nx.h index 5f6c02a481..ae4fc97379 100644 --- a/include/nuttx/nx/nx.h +++ b/include/nuttx/nx/nx.h @@ -287,6 +287,9 @@ int nx_runinstance(FAR const char *mqname, FAR NX_DRIVERTYPE *dev); * work in the NuttX kernel build because the resources required by the * NX server are private to the kernel mode logic. * + * nx_start() can be called (indirectly) from applications via the + * boardctl() interface with the BOARDIOC_NX_START command. + * * Input Parameters: * None * @@ -300,7 +303,7 @@ int nx_runinstance(FAR const char *mqname, FAR NX_DRIVERTYPE *dev); * ****************************************************************************/ -#if defined(CONFIG_NX_MULTIUSER) && defined(CONFIG_NX_NXSTART) +#ifdef CONFIG_NX_MULTIUSER int nx_start(void); #endif