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/i386/pc386/startup/Makefile.in | 2 +- c/src/lib/libbsp/i386/pc386/startup/bspstart.c | 15 ++++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) (limited to 'c/src/lib/libbsp/i386/pc386/startup') diff --git a/c/src/lib/libbsp/i386/pc386/startup/Makefile.in b/c/src/lib/libbsp/i386/pc386/startup/Makefile.in index 7c775413d5..957411a4fb 100644 --- a/c/src/lib/libbsp/i386/pc386/startup/Makefile.in +++ b/c/src/lib/libbsp/i386/pc386/startup/Makefile.in @@ -11,7 +11,7 @@ PROJECT_ROOT = @PROJECT_ROOT@ PGM=${ARCH}/startup.rel # C source names, if any, go here -- minus the .c -C_PIECES=bspstart exit irq sbrk +C_PIECES=bspclean bspstart exit irq main sbrk C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/i386/pc386/startup/bspstart.c b/c/src/lib/libbsp/i386/pc386/startup/bspstart.c index dd50fd115a..8b670357c1 100644 --- a/c/src/lib/libbsp/i386/pc386/startup/bspstart.c +++ b/c/src/lib/libbsp/i386/pc386/startup/bspstart.c @@ -171,21 +171,16 @@ bsp_postdriver_hook(void) /*-------------------------------------------------------------------------+ -| Function: main -| Description: Called from bsp's startup code ('start.s'). +| Function: bsp_start +| Description: Called before main is invoked. | Global Variables: None. | Arguments: None. | Returns: Nothing. +--------------------------------------------------------------------------*/ -int main(int argc, char **argv, char **environp) +void bsp_start( void ) { /* If we don't have command line arguments set default program name. */ - if ((argc > 0) && argv && argv[0]) - rtems_progname = argv[0]; - else - rtems_progname = "RTEMS"; - Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */ Cpu_table.predriver_hook = NULL; /* use system's */ Cpu_table.postdriver_hook = bsp_postdriver_hook; @@ -226,6 +221,7 @@ int main(int argc, char **argv, char **environp) rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS); +#if 0 rtems_initialize_executive(&BSP_Configuration, &Cpu_table); /* does not return */ @@ -240,4 +236,5 @@ int main(int argc, char **argv, char **environp) /* no cleanup necessary for PC386 */ return 0; -} /* main */ +#endif +} /* bsp_start */ -- cgit v1.2.3