summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/sh
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-01-25 22:03:00 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-02-03 10:00:57 +0100
commitca4602e914d4ec00bf5db51e0830d702d5bc3f4e (patch)
tree9f67d1d8b61d97a50452d6011647bcac0bf5f3aa /c/src/lib/libbsp/sh
parentUse atexit() handler to close std file descriptors (diff)
downloadrtems-ca4602e914d4ec00bf5db51e0830d702d5bc3f4e.tar.bz2
Use linker set for libio initialization
Update #2408.
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/sh/gensh1/Makefile.am2
-rw-r--r--c/src/lib/libbsp/sh/gensh2/Makefile.am4
-rw-r--r--c/src/lib/libbsp/sh/gensh4/Makefile.am2
-rw-r--r--c/src/lib/libbsp/sh/shsim/Makefile.am2
-rw-r--r--c/src/lib/libbsp/shared/bootcard.c12
-rw-r--r--c/src/lib/libbsp/shared/bsplibc.c19
-rw-r--r--c/src/lib/libbsp/shared/bsppost.c22
-rw-r--r--c/src/lib/libbsp/shared/include/bootcard.h4
8 files changed, 4 insertions, 63 deletions
diff --git a/c/src/lib/libbsp/sh/gensh1/Makefile.am b/c/src/lib/libbsp/sh/gensh1/Makefile.am
index fbc60dfb6e..1fd30f8f4a 100644
--- a/c/src/lib/libbsp/sh/gensh1/Makefile.am
+++ b/c/src/lib/libbsp/sh/gensh1/Makefile.am
@@ -32,7 +32,7 @@ BUILT_SOURCES = scitab.c
CLEANFILES = scitab.c
# startup
-libbsp_a_SOURCES += ../../shared/bsplibc.c ../../shared/bsppost.c \
+libbsp_a_SOURCES += \
../../shared/bsppredriverhook.c ../shared/startup/bspstart.c \
../../shared/bspclean.c ../../shared/bspreset_loop.c \
../../shared/bspgetworkarea.c \
diff --git a/c/src/lib/libbsp/sh/gensh2/Makefile.am b/c/src/lib/libbsp/sh/gensh2/Makefile.am
index 571c84dd28..ba58a211cd 100644
--- a/c/src/lib/libbsp/sh/gensh2/Makefile.am
+++ b/c/src/lib/libbsp/sh/gensh2/Makefile.am
@@ -34,8 +34,8 @@ BUILT_SOURCES = scitab.c
CLEANFILES = scitab.c
# startup
-libbsp_a_SOURCES += startup/hw_init.c ../../shared/bsplibc.c \
- ../../shared/bsppost.c ../../shared/bsppredriverhook.c \
+libbsp_a_SOURCES += startup/hw_init.c \
+ ../../shared/bsppredriverhook.c \
../shared/startup/bspstart.c \
../../shared/bspgetworkarea.c ../../shared/sbrk.c ../../shared/bootcard.c \
../../shared/gnatinstallhandler.c ../../shared/bspclean.c \
diff --git a/c/src/lib/libbsp/sh/gensh4/Makefile.am b/c/src/lib/libbsp/sh/gensh4/Makefile.am
index 9baa3093f3..995c149004 100644
--- a/c/src/lib/libbsp/sh/gensh4/Makefile.am
+++ b/c/src/lib/libbsp/sh/gensh4/Makefile.am
@@ -27,7 +27,7 @@ noinst_LIBRARIES += libbsp.a
libbsp_a_SOURCES =
# startup
-libbsp_a_SOURCES += ../../shared/bsplibc.c ../../shared/bsppost.c \
+libbsp_a_SOURCES += \
../../shared/bsppredriverhook.c ../shared/startup/bspstart.c \
../../shared/bspgetworkarea.c \
../../shared/bspclean.c ../../shared/sbrk.c ../../shared/bootcard.c \
diff --git a/c/src/lib/libbsp/sh/shsim/Makefile.am b/c/src/lib/libbsp/sh/shsim/Makefile.am
index 9f98636f6a..fc0d77a459 100644
--- a/c/src/lib/libbsp/sh/shsim/Makefile.am
+++ b/c/src/lib/libbsp/sh/shsim/Makefile.am
@@ -28,8 +28,6 @@ noinst_LIBRARIES += libbsp.a
libbsp_a_SOURCES =
# startup
-libbsp_a_SOURCES += ../../shared/bsplibc.c
-libbsp_a_SOURCES += ../../shared/bsppost.c
libbsp_a_SOURCES += ../../shared/bsppredriverhook.c
libbsp_a_SOURCES += ../shared/startup/bspstart.c
libbsp_a_SOURCES += ../../shared/bspgetworkarea.c
diff --git a/c/src/lib/libbsp/shared/bootcard.c b/c/src/lib/libbsp/shared/bootcard.c
index 8b37a52258..3e243d2569 100644
--- a/c/src/lib/libbsp/shared/bootcard.c
+++ b/c/src/lib/libbsp/shared/bootcard.c
@@ -50,23 +50,11 @@ RTEMS_SYSINIT_ITEM(
);
RTEMS_SYSINIT_ITEM(
- bsp_libc_init,
- RTEMS_SYSINIT_BSP_LIBC,
- RTEMS_SYSINIT_ORDER_MIDDLE
-);
-
-RTEMS_SYSINIT_ITEM(
bsp_predriver_hook,
RTEMS_SYSINIT_BSP_PRE_DRIVERS,
RTEMS_SYSINIT_ORDER_MIDDLE
);
-RTEMS_SYSINIT_ITEM(
- bsp_postdriver_hook,
- RTEMS_SYSINIT_BSP_POST_DRIVERS,
- RTEMS_SYSINIT_ORDER_MIDDLE
-);
-
/*
* This is the initialization framework routine that weaves together
* calls to RTEMS and the BSP in the proper sequence to initialize
diff --git a/c/src/lib/libbsp/shared/bsplibc.c b/c/src/lib/libbsp/shared/bsplibc.c
deleted file mode 100644
index 252a4cd74a..0000000000
--- a/c/src/lib/libbsp/shared/bsplibc.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * COPYRIGHT (c) 1989-2008.
- * On-Line Applications Research Corporation (OAR).
- */
-
-#include <rtems/libio.h>
-#include <rtems/libcsupport.h>
-
-#include <bsp/bootcard.h>
-
-void bsp_libc_init(void)
-{
- /*
- * Init the RTEMS libio facility to provide UNIX-like system
- * calls for use by newlib (ie: provide open, close, etc)
- * Uses malloc() to get area for the iops, so must be after malloc init
- */
- (*rtems_libio_init_helper)();
-}
diff --git a/c/src/lib/libbsp/shared/bsppost.c b/c/src/lib/libbsp/shared/bsppost.c
deleted file mode 100644
index bd903e4584..0000000000
--- a/c/src/lib/libbsp/shared/bsppost.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * This is a shared BSP post driver hook designed to open
- * /dev/console for stdin, stdout, and stderr if it exists.
- * Newlib will automatically associate the file descriptors
- * with the first three files opened.
- *
- * COPYRIGHT (c) 1989-2008.
- * 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.org/license/LICENSE.
- */
-
-#include <rtems/libio.h>
-
-#include <bsp/bootcard.h>
-
-void bsp_postdriver_hook(void)
-{
- (*rtems_libio_post_driver_helper)();
-}
diff --git a/c/src/lib/libbsp/shared/include/bootcard.h b/c/src/lib/libbsp/shared/include/bootcard.h
index 385c0aeb08..aaac42e8e2 100644
--- a/c/src/lib/libbsp/shared/include/bootcard.h
+++ b/c/src/lib/libbsp/shared/include/bootcard.h
@@ -55,8 +55,6 @@ void bsp_start(void);
void bsp_predriver_hook(void);
-void bsp_postdriver_hook(void);
-
void bsp_reset(void);
/**
@@ -171,8 +169,6 @@ static inline void bsp_work_area_initialize_with_table(
void bsp_work_area_initialize(void);
-void bsp_libc_init(void);
-
/**
* @brief Standard start routine for secondary processors.
*