From e2a2ec6016c9bb3f3146c701bbe950af212c097c Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Sat, 21 Mar 1998 15:37:18 +0000 Subject: Switch to using a shared main() for all of the embedded BSPs based on the GNU tools. This usually involved correcting the type of bsp_start(), bsp_cleanup(), adjusting the start code to call the right start routine (the shared boot_card()), and then removing code from bsp_start() which was performed in the new boot_card()/main() path. --- c/src/lib/libbsp/sparc/erc32/include/bsp.h | 2 -- c/src/lib/libbsp/sparc/erc32/start/startsis.s | 4 ++-- c/src/lib/libbsp/sparc/erc32/startsis/startsis.s | 4 ++-- c/src/lib/libbsp/sparc/erc32/startup/Makefile.in | 13 ++----------- c/src/lib/libbsp/sparc/erc32/startup/bspstart.c | 5 ----- 5 files changed, 6 insertions(+), 22 deletions(-) (limited to 'c/src/lib/libbsp/sparc') diff --git a/c/src/lib/libbsp/sparc/erc32/include/bsp.h b/c/src/lib/libbsp/sparc/erc32/include/bsp.h index 770649950c..eef586db00 100644 --- a/c/src/lib/libbsp/sparc/erc32/include/bsp.h +++ b/c/src/lib/libbsp/sparc/erc32/include/bsp.h @@ -171,8 +171,6 @@ extern rtems_configuration_table BSP_Configuration; /* owned by BSP */ extern rtems_cpu_table Cpu_table; /* owned by BSP */ -extern rtems_unsigned32 bsp_isr_level; - #ifdef __cplusplus } #endif diff --git a/c/src/lib/libbsp/sparc/erc32/start/startsis.s b/c/src/lib/libbsp/sparc/erc32/start/startsis.s index 225d70abf0..6097c4ab36 100644 --- a/c/src/lib/libbsp/sparc/erc32/start/startsis.s +++ b/c/src/lib/libbsp/sparc/erc32/start/startsis.s @@ -289,8 +289,8 @@ zerobss: mov %0, %o2 ! environ mov %0, %o1 ! argv mov %0, %o0 ! argc - call SYM(main) - sub %sp, 0x60, %sp ! room for main to save args + call SYM(boot_card) + sub %sp, 0x60, %sp ! room for boot_card to save args nop PUBLIC(BSP_fatal_return) diff --git a/c/src/lib/libbsp/sparc/erc32/startsis/startsis.s b/c/src/lib/libbsp/sparc/erc32/startsis/startsis.s index 225d70abf0..6097c4ab36 100644 --- a/c/src/lib/libbsp/sparc/erc32/startsis/startsis.s +++ b/c/src/lib/libbsp/sparc/erc32/startsis/startsis.s @@ -289,8 +289,8 @@ zerobss: mov %0, %o2 ! environ mov %0, %o1 ! argv mov %0, %o0 ! argc - call SYM(main) - sub %sp, 0x60, %sp ! room for main to save args + call SYM(boot_card) + sub %sp, 0x60, %sp ! room for boot_card to save args nop PUBLIC(BSP_fatal_return) diff --git a/c/src/lib/libbsp/sparc/erc32/startup/Makefile.in b/c/src/lib/libbsp/sparc/erc32/startup/Makefile.in index d2e036dae3..5ca451dc25 100644 --- a/c/src/lib/libbsp/sparc/erc32/startup/Makefile.in +++ b/c/src/lib/libbsp/sparc/erc32/startup/Makefile.in @@ -11,14 +11,10 @@ PROJECT_ROOT = @PROJECT_ROOT@ PGM=${ARCH}/startup.rel # C source names, if any, go here -- minus the .c -C_PIECES=bspclean bspstart sbrk setvec spurious +C_PIECES=bspclean bspstart main sbrk setvec spurious C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) -CC_PIECES=rtems-ctor -CC_FILES=$(CC_PIECES:%=%.cc) -CC_O_FILES=$(CC_PIECES:%=${ARCH}/%.o) - H_FILES= # Assembly source names, if any, go here -- minus the .s @@ -29,10 +25,6 @@ S_O_FILES=$(S_FILES:%.S=${ARCH}/%.o) SRCS=linkcmds $(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES) OBJS=$(C_O_FILES) -# We install the RTEMS constructor as a separate .o -# so it can be easily place correctly by the compiler config file. -INSTALLED_O_FILES=$(ARCH)/rtems-ctor.o - include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg include $(RTEMS_ROOT)/make/leaf.cfg @@ -61,6 +53,5 @@ CLOBBER_ADDITIONS += ${PGM}: ${SRCS} ${OBJS} $(make-rel) -all: ${ARCH} $(SRCS) $(INSTALLED_O_FILES) $(PGM) +all: ${ARCH} $(SRCS) $(PGM) $(INSTALL) $(srcdir)/linkcmds ${PROJECT_RELEASE}/lib - $(INSTALL_VARIANT) $(INSTALLED_O_FILES) ${PROJECT_RELEASE}/lib diff --git a/c/src/lib/libbsp/sparc/erc32/startup/bspstart.c b/c/src/lib/libbsp/sparc/erc32/startup/bspstart.c index 147be20ab0..5ad902ced2 100644 --- a/c/src/lib/libbsp/sparc/erc32/startup/bspstart.c +++ b/c/src/lib/libbsp/sparc/erc32/startup/bspstart.c @@ -372,9 +372,4 @@ void bsp_start( void ) */ rtems_libio_config( &BSP_Configuration, BSP_LIBIO_MAX_FDS ); - - bsp_isr_level = rtems_initialize_executive_early( - &BSP_Configuration, - &Cpu_table - ); } -- cgit v1.2.3