From 5129b24c4e34e43c69d1c229cf2f91ccfffee1ba Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 20 Jun 2007 22:19:38 +0000 Subject: 2007-06-20 Ray Xu * optman/Makefile.am, optman/preinstall.am: Add stubs for file system, console, and libio. This shrinks the memory requirements but Joel has not figured out how best to present this to application space. * optman/no-console.c, optman/no-filesystem.c, optman/no-libio.c: New files. --- c/src/optman/Makefile.am | 10 +++++++++ c/src/optman/no-console.c | 21 +++++++++++++++++++ c/src/optman/no-filesystem.c | 32 +++++++++++++++++++++++++++++ c/src/optman/no-libio.c | 49 ++++++++++++++++++++++++++++++++++++++++++++ c/src/optman/preinstall.am | 8 ++++++++ 5 files changed, 120 insertions(+) create mode 100644 c/src/optman/no-console.c create mode 100644 c/src/optman/no-filesystem.c create mode 100644 c/src/optman/no-libio.c (limited to 'c/src/optman') diff --git a/c/src/optman/Makefile.am b/c/src/optman/Makefile.am index 7560f32d9f..98d548daba 100644 --- a/c/src/optman/Makefile.am +++ b/c/src/optman/Makefile.am @@ -73,5 +73,15 @@ no_timer_rel_SOURCES = rtems/no-timer.c no_timer_rel_CPPFLAGS = $(AM_CPPFLAGS) no_timer_rel_LDFLAGS = $(RTEMS_RELLDFLAGS) +project_lib_PROGRAMS += no-filesystem.rel +no_filesystem_rel_SOURCES = no-filesystem.c no-libio.c +no_filesystem_rel_CPPFLAGS = $(AM_CPPFLAGS) +no_filesystem_rel_LDFLAGS = $(RTEMS_RELLDFLAGS) + +project_lib_PROGRAMS += no-console.rel +no_console_rel_SOURCES = no-console.c +no_console_rel_CPPFLAGS = $(AM_CPPFLAGS) +no_console_rel_LDFLAGS = $(RTEMS_RELLDFLAGS) + include $(srcdir)/preinstall.am include $(top_srcdir)/automake/local.am diff --git a/c/src/optman/no-console.c b/c/src/optman/no-console.c new file mode 100644 index 0000000000..4f30ad32d9 --- /dev/null +++ b/c/src/optman/no-console.c @@ -0,0 +1,21 @@ +/* + * Console Initialization Stub + * + * COPYRIGHT (c) 1989-2007. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + * $Id$ + */ + +#if HAVE_CONFIG_H +#include "config.h" +#endif + +void open_dev_console(void) +{ +} + diff --git a/c/src/optman/no-filesystem.c b/c/src/optman/no-filesystem.c new file mode 100644 index 0000000000..69d4b18c45 --- /dev/null +++ b/c/src/optman/no-filesystem.c @@ -0,0 +1,32 @@ +/* + * Stub Base file system initialization + * + * COPYRIGHT (c) 1989-2007. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + */ + +#if HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include + +rtems_user_env_t rtems_global_user_env; +rtems_user_env_t *rtems_current_user_env; + +/* + * rtems_filesystem_initialize + * + * Initialize the foundation of the file system. It is an empty function. + */ + +void rtems_filesystem_initialize( void ) +{ +} diff --git a/c/src/optman/no-libio.c b/c/src/optman/no-libio.c new file mode 100644 index 0000000000..de0b26cd5a --- /dev/null +++ b/c/src/optman/no-libio.c @@ -0,0 +1,49 @@ +/* + * Stub Base libio initialization + * + * COPYRIGHT (c) 1989-2007. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + */ + +#if HAVE_CONFIG_H +#include "config.h" +#endif + +#include /* libio_.h pulls in rtems */ +#include +#include /* assoc.h not included by rtems.h */ + +#include /* O_RDONLY, et.al. */ +#include /* O_RDONLY, et.al. */ +#include +#include + +#include +#include /* strcmp */ +#include +#include /* calloc() */ + +#include /* libio.h not pulled in by rtems */ + +/* + * File descriptor Table Information + */ + +extern uint32_t rtems_libio_number_iops; +rtems_id rtems_libio_semaphore; +rtems_libio_t *rtems_libio_iops; +rtems_libio_t *rtems_libio_iop_freelist; + +/* + * rtems_libio_init + * + * Called by BSP startup code to initialize the libio subsystem. + */ +void rtems_libio_init( void ) +{ +} diff --git a/c/src/optman/preinstall.am b/c/src/optman/preinstall.am index 7b82b63d6b..f300fa4c02 100644 --- a/c/src/optman/preinstall.am +++ b/c/src/optman/preinstall.am @@ -70,3 +70,11 @@ $(PROJECT_LIB)/no-timer.rel: no-timer.rel $(PROJECT_LIB)/$(dirstamp) $(INSTALL_PROGRAM) $< $(PROJECT_LIB)/no-timer.rel TMPINSTALL_FILES += $(PROJECT_LIB)/no-timer.rel +$(PROJECT_LIB)/no-filesystem.rel: no-filesystem.rel $(PROJECT_LIB)/$(dirstamp) + $(INSTALL_PROGRAM) $< $(PROJECT_LIB)/no-filesystem.rel +TMPINSTALL_FILES += $(PROJECT_LIB)/no-filesystem.rel + +$(PROJECT_LIB)/no-console.rel: no-console.rel $(PROJECT_LIB)/$(dirstamp) + $(INSTALL_PROGRAM) $< $(PROJECT_LIB)/no-console.rel +TMPINSTALL_FILES += $(PROJECT_LIB)/no-console.rel + -- cgit v1.2.3