diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-09-17 16:12:04 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-09-17 16:12:04 +0000 |
commit | d40da79b04ee4756675c3356cfc156fb7d9bd547 (patch) | |
tree | f55cad54aadd9cac001bccbbb37922cc27597107 /cpukit/sapi/include/confdefs.h | |
parent | 2008-09-17 Miao Yan <yanmiaobest@gmail.com> (diff) | |
download | rtems-d40da79b04ee4756675c3356cfc156fb7d9bd547.tar.bz2 |
2008-09-17 Miao Yan <yanmiaobest@gmail.com>
* Makefile.am, preinstall.am, libcsupport/Makefile.am,
libcsupport/include/rtems/libcsupport.h,
libcsupport/include/rtems/libio.h, libcsupport/src/base_fs.c,
libcsupport/src/libio_init.c, libcsupport/src/newlibc_exit.c,
libcsupport/src/newlibc_init.c, libcsupport/src/sync.c,
libfs/Makefile.am, libfs/src/imfs/deviceio.c,
sapi/include/confdefs.h: Merge GSOC project code to add simple device
only filesystem (devfs), optionally completely drop out filesystem,
and to clean up disabling newlib reentrancy support. This dropped 17K
from the minimum.exe for sparc/sis and arm/rtl22xx_t now has a 15K
code space.
* libcsupport/src/__usrenv.c, libcsupport/src/newlibc_reent.c,
libfs/src/devfs/devclose.c, libfs/src/devfs/devfs.h,
libfs/src/devfs/devfs_eval.c, libfs/src/devfs/devfs_init.c,
libfs/src/devfs/devfs_mknod.c, libfs/src/devfs/devfs_node_type.c,
libfs/src/devfs/devfs_show.c, libfs/src/devfs/devioctl.c,
libfs/src/devfs/devopen.c, libfs/src/devfs/devread.c,
libfs/src/devfs/devstat.c, libfs/src/devfs/devwrite.c,
libfs/src/imfs/deviceerrno.c: New files.
* libcsupport/src/newlibc.c: Removed.
Diffstat (limited to 'cpukit/sapi/include/confdefs.h')
-rw-r--r-- | cpukit/sapi/include/confdefs.h | 60 |
1 files changed, 50 insertions, 10 deletions
diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h index acc03b7434..aeb149fc6a 100644 --- a/cpukit/sapi/include/confdefs.h +++ b/cpukit/sapi/include/confdefs.h @@ -72,6 +72,37 @@ extern rtems_configuration_table Configuration; #define CONFIGURE_NEWLIB_EXTENSION 0 #endif + +#include <rtems/libio.h> + +#ifdef CONFIGURE_INIT +rtems_libio_init_functions_t rtems_libio_init_helper = + #ifdef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM + NULL; + #else + rtems_libio_init; + #endif + +rtems_libio_supp_functions_t rtems_libio_supp_helper = + #ifdef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM + NULL; + #else + open_dev_console; + #endif + +rtems_fs_init_functions_t rtems_fs_init_helper = + #ifdef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM + NULL; + #else + rtems_filesystem_initialize; + #endif +#endif + + +#ifdef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM + #define CONFIGURE_HAS_OWN_MOUNT_TABLE +#endif + /** * This macro defines the number of POSIX file descriptors allocated * and managed by libio. These are the "integer" file descriptors that @@ -138,6 +169,22 @@ extern rtems_configuration_table Configuration; extern int rtems_telnetd_maximum_ptys; #endif +#ifdef CONFIGURE_INIT + #ifdef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM + extern uint32_t rtems_device_table_size; + #define CONFIGURE_MEMORY_FOR_DEVFS 0 + #elif defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM) + #ifndef CONFIGURE_MAXIMUM_DEVICES + #define CONFIGURE_MAXIMUM_DEVICES 4 + #endif + #include <rtems/devfs.h> + uint32_t rtems_device_table_size = CONFIGURE_MAXIMUM_DEVICES; + #define CONFIGURE_MEMORY_FOR_DEVFS _Configure_Object_RAM(CONFIGURE_MAXIMUM_DEVICES, sizeof (rtems_device_name_t)) + #else + #define CONFIGURE_MEMORY_FOR_DEVFS 0 + #endif +#endif + /* * Mount Table Configuration */ @@ -162,6 +209,8 @@ extern rtems_configuration_table Configuration; const rtems_filesystem_mount_table_t configuration_mount_table = { #ifdef CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM &IMFS_ops, + #elif defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM) + &devFS_ops, #else /* using miniIMFS as base filesystem */ &miniIMFS_ops, #endif @@ -574,16 +623,6 @@ extern rtems_configuration_table Configuration; #define CONFIGURE_MAXIMUM_DRIVERS CONFIGURE_NUMBER_OF_DRIVERS #endif -/** - * Default the number of devices per device driver. This value may be - * overridden by the user. - * - * @note This configuration parameter is obsolete. Thus we will warn the - * user that it is obsolete. - */ -#ifdef CONFIGURE_MAXIMUM_DEVICES - #warning "CONFIGURE_MAXIMUM_DEVICES is obsolete. Do not use any longer." -#endif #ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER /* @@ -1681,6 +1720,7 @@ extern rtems_configuration_table Configuration; #define CONFIGURE_EXECUTIVE_RAM_SIZE \ (( \ CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD + \ + CONFIGURE_MEMORY_FOR_DEVFS + \ CONFIGURE_MEMORY_FOR_TASKS( \ CONFIGURE_TOTAL_TASKS_AND_THREADS, CONFIGURE_TOTAL_TASKS_AND_THREADS) + \ CONFIGURE_MEMORY_FOR_CLASSIC + \ |