From c8d91839ff0af2f6cf8bbeeecc6e8f7bbf1315c9 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 2 Jul 1999 18:57:11 +0000 Subject: Patch from Ralf Corsepius that splits boot_card() and main() into separate files to ease configuration of other packages. This was a big step in the way to build TCL, ncurses, and zlib for RTEMS. --- c/src/lib/libbsp/a29k/portsw/startup/Makefile.in | 2 +- .../lib/libbsp/hppa1.1/simhppa/startup/Makefile.in | 2 +- c/src/lib/libbsp/i386/force386/startup/Makefile.in | 2 +- c/src/lib/libbsp/i386/i386ex/startup/Makefile.in | 2 +- c/src/lib/libbsp/i386/pc386/startup/Makefile.in | 2 +- c/src/lib/libbsp/i386/ts_386ex/startup/Makefile.in | 2 +- c/src/lib/libbsp/i960/cvme961/startup/Makefile.in | 2 +- c/src/lib/libbsp/m68k/dmv152/startup/Makefile.in | 2 +- c/src/lib/libbsp/m68k/efi332/startup/Makefile.in | 2 +- c/src/lib/libbsp/m68k/efi68k/startup/Makefile.in | 2 +- c/src/lib/libbsp/m68k/gen68302/startup/Makefile.in | 2 +- c/src/lib/libbsp/m68k/gen68340/startup/Makefile.in | 2 +- c/src/lib/libbsp/m68k/gen68360/startup/Makefile.in | 2 +- c/src/lib/libbsp/m68k/idp/startup/Makefile.in | 2 +- c/src/lib/libbsp/m68k/mvme136/startup/Makefile.in | 2 +- c/src/lib/libbsp/m68k/mvme147/startup/Makefile.in | 2 +- c/src/lib/libbsp/m68k/mvme147s/startup/Makefile.in | 2 +- c/src/lib/libbsp/m68k/mvme162/startup/Makefile.in | 2 +- c/src/lib/libbsp/m68k/mvme167/startup/Makefile.in | 2 +- c/src/lib/libbsp/m68k/ods68302/startup/Makefile.in | 3 +- .../libbsp/mips64orion/p4000/startup/Makefile.in | 2 +- c/src/lib/libbsp/no_cpu/no_bsp/startup/Makefile.in | 2 +- .../lib/libbsp/powerpc/dmv177/startup/Makefile.in | 2 +- .../libbsp/powerpc/eth_comm/startup/Makefile.in | 2 +- .../libbsp/powerpc/helas403/startup/Makefile.in | 2 +- .../lib/libbsp/powerpc/mcp750/startup/Makefile.in | 2 +- .../powerpc/motorola_powerpc/startup/Makefile.in | 2 +- .../lib/libbsp/powerpc/papyrus/startup/Makefile.in | 2 +- .../libbsp/powerpc/ppcn_60x/startup/Makefile.in | 4 +- c/src/lib/libbsp/powerpc/psim/startup/Makefile.in | 2 +- .../libbsp/powerpc/score603e/startup/Makefile.in | 2 +- c/src/lib/libbsp/sh/gensh1/startup/Makefile.in | 2 +- c/src/lib/libbsp/shared/bootcard.c | 96 ++++++++++++++++++++++ c/src/lib/libbsp/shared/main.c | 85 ------------------- c/src/lib/libbsp/sparc/erc32/startup/Makefile.in | 2 +- c/src/lib/libbsp/unix/posix/startup/Makefile.in | 2 +- 36 files changed, 131 insertions(+), 121 deletions(-) create mode 100644 c/src/lib/libbsp/shared/bootcard.c (limited to 'c') diff --git a/c/src/lib/libbsp/a29k/portsw/startup/Makefile.in b/c/src/lib/libbsp/a29k/portsw/startup/Makefile.in index 236db6ed94..4f1d02816e 100644 --- a/c/src/lib/libbsp/a29k/portsw/startup/Makefile.in +++ b/c/src/lib/libbsp/a29k/portsw/startup/Makefile.in @@ -18,7 +18,7 @@ VPATH = @srcdir@:@srcdir@/../../../shared PGM=${ARCH}/startup.rel # C source names, if any, go here -- minus the .c -C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec gnatinstallhandler +C_PIECES=bspclean bsplibc bsppost bspstart bootcard main sbrk setvec gnatinstallhandler C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/startup/Makefile.in b/c/src/lib/libbsp/hppa1.1/simhppa/startup/Makefile.in index 868ec31da0..0f9ed7ac3b 100644 --- a/c/src/lib/libbsp/hppa1.1/simhppa/startup/Makefile.in +++ b/c/src/lib/libbsp/hppa1.1/simhppa/startup/Makefile.in @@ -18,7 +18,7 @@ VPATH = @srcdir@:@srcdir@/../../../shared PGM=${ARCH}/startup.rel # C source names, if any, go here -- minus the .c -C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec gnatinstallhandler +C_PIECES=bspclean bsplibc bsppost bspstart bootcard main sbrk setvec gnatinstallhandler C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/i386/force386/startup/Makefile.in b/c/src/lib/libbsp/i386/force386/startup/Makefile.in index d4434182f5..ec2ec33a7c 100644 --- a/c/src/lib/libbsp/i386/force386/startup/Makefile.in +++ b/c/src/lib/libbsp/i386/force386/startup/Makefile.in @@ -18,7 +18,7 @@ VPATH = @srcdir@:@srcdir@/../../../shared PGM=${ARCH}/startup.rel # C source names, if any, go here -- minus the .c -C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec gnatinstallhandler +C_PIECES=bspclean bsplibc bsppost bspstart bootcard main sbrk setvec gnatinstallhandler C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/i386/i386ex/startup/Makefile.in b/c/src/lib/libbsp/i386/i386ex/startup/Makefile.in index 5428290269..46219dd8a3 100644 --- a/c/src/lib/libbsp/i386/i386ex/startup/Makefile.in +++ b/c/src/lib/libbsp/i386/i386ex/startup/Makefile.in @@ -18,7 +18,7 @@ VPATH = @srcdir@:@srcdir@/../../../shared:@srcdir@/../../shared/comm:@srcdir@/.. PGM=${ARCH}/startup.rel # C source names, if any, go here -- minus the .c -C_PIECES=bspclean bsplibc bsppost bspstart main sbrk irq irq_init i386-stub-glue uart i386-stub gnatinstallhandler +C_PIECES=bspclean bsplibc bsppost bspstart bootcard main sbrk irq irq_init i386-stub-glue uart i386-stub gnatinstallhandler C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/i386/pc386/startup/Makefile.in b/c/src/lib/libbsp/i386/pc386/startup/Makefile.in index 79f55e5122..d881224d85 100644 --- a/c/src/lib/libbsp/i386/pc386/startup/Makefile.in +++ b/c/src/lib/libbsp/i386/pc386/startup/Makefile.in @@ -18,7 +18,7 @@ VPATH = @srcdir@:@srcdir@/../../../shared:@srcdir@/../../shared/irq:@srcdir@/../ PGM=${ARCH}/startup.rel # C source names, if any, go here -- minus the .c -C_PIECES=bsplibc bsppost bspstart exit irq irq_init main sbrk i386-stub i386-stub-glue uart pcibios gnatinstallhandler +C_PIECES=bsplibc bsppost bspstart exit irq irq_init bootcard main sbrk i386-stub i386-stub-glue uart pcibios gnatinstallhandler C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/i386/ts_386ex/startup/Makefile.in b/c/src/lib/libbsp/i386/ts_386ex/startup/Makefile.in index 28958233dc..be92c0cdeb 100644 --- a/c/src/lib/libbsp/i386/ts_386ex/startup/Makefile.in +++ b/c/src/lib/libbsp/i386/ts_386ex/startup/Makefile.in @@ -18,7 +18,7 @@ VPATH = @srcdir@:@srcdir@/../../../shared:@srcdir@/../../shared/comm:@srcdir@/.. PGM=${ARCH}/startup.rel # C source names, if any, go here -- minus the .c -C_PIECES=bspclean bsplibc bsppost bspstart main sbrk irq irq_init i386-stub-glue uart i386-stub gnatinstallhandler +C_PIECES=bspclean bsplibc bsppost bspstart bootcard main sbrk irq irq_init i386-stub-glue uart i386-stub gnatinstallhandler C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/i960/cvme961/startup/Makefile.in b/c/src/lib/libbsp/i960/cvme961/startup/Makefile.in index e20ab4ba6d..de74d8a159 100644 --- a/c/src/lib/libbsp/i960/cvme961/startup/Makefile.in +++ b/c/src/lib/libbsp/i960/cvme961/startup/Makefile.in @@ -18,7 +18,7 @@ VPATH = @srcdir@:@srcdir@/../../../shared PGM=${ARCH}/startup.rel # C source names, if any, go here -- minus the .c -C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec gnatinstallhandler +C_PIECES=bspclean bsplibc bsppost bspstart bootcard main sbrk setvec gnatinstallhandler C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/m68k/dmv152/startup/Makefile.in b/c/src/lib/libbsp/m68k/dmv152/startup/Makefile.in index b1b59249c6..e546797edb 100644 --- a/c/src/lib/libbsp/m68k/dmv152/startup/Makefile.in +++ b/c/src/lib/libbsp/m68k/dmv152/startup/Makefile.in @@ -18,7 +18,7 @@ VPATH = @srcdir@:@srcdir@/../../shared:@srcdir@/../../../shared PGM=${ARCH}/startup.rel # C source names, if any, go here -- minus the .c -C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec vmeintr gnatinstallhandler +C_PIECES=bspclean bsplibc bsppost bspstart bootcard main sbrk setvec vmeintr gnatinstallhandler C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/m68k/efi332/startup/Makefile.in b/c/src/lib/libbsp/m68k/efi332/startup/Makefile.in index d65d0d875f..39c14a28c4 100644 --- a/c/src/lib/libbsp/m68k/efi332/startup/Makefile.in +++ b/c/src/lib/libbsp/m68k/efi332/startup/Makefile.in @@ -18,7 +18,7 @@ VPATH = @srcdir@:@srcdir@/../../shared:@srcdir@/../../../shared PGM=${ARCH}/startup.rel # C source names, if any, go here -- minus the .c -C_PIECES=bsplibc bsppost bspstart bspclean main sbrk setvec gnatinstallhandler +C_PIECES=bsplibc bsppost bspstart bspclean bootcard main sbrk setvec gnatinstallhandler C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/m68k/efi68k/startup/Makefile.in b/c/src/lib/libbsp/m68k/efi68k/startup/Makefile.in index 0ee11de1ea..15ee16bc39 100644 --- a/c/src/lib/libbsp/m68k/efi68k/startup/Makefile.in +++ b/c/src/lib/libbsp/m68k/efi68k/startup/Makefile.in @@ -18,7 +18,7 @@ VPATH = @srcdir@:@srcdir@/../../../shared PGM=${ARCH}/startup.rel # C source names, if any, go here -- minus the .c -C_PIECES=bsplibc bsppost bspstart bspclean efi68k_tcp efi68k_wd main sbrk setvec gnatinstallhandler +C_PIECES=bsplibc bsppost bspstart bspclean efi68k_tcp efi68k_wd bootcard main sbrk setvec gnatinstallhandler C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/m68k/gen68302/startup/Makefile.in b/c/src/lib/libbsp/m68k/gen68302/startup/Makefile.in index fa2e5273a0..23ee5e4db8 100644 --- a/c/src/lib/libbsp/m68k/gen68302/startup/Makefile.in +++ b/c/src/lib/libbsp/m68k/gen68302/startup/Makefile.in @@ -18,7 +18,7 @@ VPATH = @srcdir@:@srcdir@/../../shared:@srcdir@/../../../shared PGM=${ARCH}/startup.rel # C source names, if any, go here -- minus the .c -C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec gnatinstallhandler +C_PIECES=bspclean bsplibc bsppost bspstart bootcard main sbrk setvec gnatinstallhandler C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/m68k/gen68340/startup/Makefile.in b/c/src/lib/libbsp/m68k/gen68340/startup/Makefile.in index 9212b9aea4..2c9a32db0e 100644 --- a/c/src/lib/libbsp/m68k/gen68340/startup/Makefile.in +++ b/c/src/lib/libbsp/m68k/gen68340/startup/Makefile.in @@ -18,7 +18,7 @@ VPATH = @srcdir@:@srcdir@/../../shared:@srcdir@/../../../shared PGM=${ARCH}/startup.rel # C source names, if any, go here -- minus the .c -C_PIECES=bspclean bsplibc bsppost bspstart init68340 main sbrk setvec dumpanic gnatinstallhandler +C_PIECES=bspclean bsplibc bsppost bspstart init68340 bootcard main sbrk setvec dumpanic gnatinstallhandler C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/m68k/gen68360/startup/Makefile.in b/c/src/lib/libbsp/m68k/gen68360/startup/Makefile.in index d57d0e2d53..92d3023784 100644 --- a/c/src/lib/libbsp/m68k/gen68360/startup/Makefile.in +++ b/c/src/lib/libbsp/m68k/gen68360/startup/Makefile.in @@ -18,7 +18,7 @@ VPATH = @srcdir@:@srcdir@/../../shared:@srcdir@/../../../shared PGM=${ARCH}/startup.rel # C source names, if any, go here -- minus the .c -C_PIECES=alloc360 bspclean bsplibc bsppost bspstart init68360 main sbrk setvec gnatinstallhandler +C_PIECES=alloc360 bspclean bsplibc bsppost bspstart init68360 bootcard main sbrk setvec gnatinstallhandler C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/m68k/idp/startup/Makefile.in b/c/src/lib/libbsp/m68k/idp/startup/Makefile.in index 89af2f56ee..9795bb0530 100644 --- a/c/src/lib/libbsp/m68k/idp/startup/Makefile.in +++ b/c/src/lib/libbsp/m68k/idp/startup/Makefile.in @@ -18,7 +18,7 @@ VPATH = @srcdir@:@srcdir@/../../shared:@srcdir@/../../../shared PGM=${ARCH}/startup.rel # C source names, if any, go here -- minus the .c -C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec gnatinstallhandler +C_PIECES=bspclean bsplibc bsppost bspstart bootcard main sbrk setvec gnatinstallhandler C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/m68k/mvme136/startup/Makefile.in b/c/src/lib/libbsp/m68k/mvme136/startup/Makefile.in index a8e41e8909..0d1812154e 100644 --- a/c/src/lib/libbsp/m68k/mvme136/startup/Makefile.in +++ b/c/src/lib/libbsp/m68k/mvme136/startup/Makefile.in @@ -18,7 +18,7 @@ VPATH = @srcdir@:@srcdir@/../../shared:@srcdir@/../../../shared PGM=${ARCH}/startup.rel # C source names, if any, go here -- minus the .c -C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec gnatinstallhandler +C_PIECES=bspclean bsplibc bsppost bspstart bootcard main sbrk setvec gnatinstallhandler C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/m68k/mvme147/startup/Makefile.in b/c/src/lib/libbsp/m68k/mvme147/startup/Makefile.in index f2a47cd42e..87adf9fcac 100644 --- a/c/src/lib/libbsp/m68k/mvme147/startup/Makefile.in +++ b/c/src/lib/libbsp/m68k/mvme147/startup/Makefile.in @@ -18,7 +18,7 @@ VPATH = @srcdir@:@srcdir@/../../shared:@srcdir@/../../../shared PGM=${ARCH}/startup.rel # C source names, if any, go here -- minus the .c -C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec gnatinstallhandler +C_PIECES=bspclean bsplibc bsppost bspstart bootcard main sbrk setvec gnatinstallhandler C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/m68k/mvme147s/startup/Makefile.in b/c/src/lib/libbsp/m68k/mvme147s/startup/Makefile.in index a175e57f64..ae93124468 100644 --- a/c/src/lib/libbsp/m68k/mvme147s/startup/Makefile.in +++ b/c/src/lib/libbsp/m68k/mvme147s/startup/Makefile.in @@ -18,7 +18,7 @@ VPATH = @srcdir@:@srcdir@/../../mvme147/startup:@srcdir@/../../shared:@srcdir@/. PGM=${ARCH}/startup.rel # C source names, if any, go here -- minus the .c -C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec gnatinstallhandler +C_PIECES=bspclean bsplibc bsppost bspstart bootcard main sbrk setvec gnatinstallhandler C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/m68k/mvme162/startup/Makefile.in b/c/src/lib/libbsp/m68k/mvme162/startup/Makefile.in index b0c9216716..bff3af6cbb 100644 --- a/c/src/lib/libbsp/m68k/mvme162/startup/Makefile.in +++ b/c/src/lib/libbsp/m68k/mvme162/startup/Makefile.in @@ -18,7 +18,7 @@ VPATH = @srcdir@:@srcdir@/../../shared:@srcdir@/../../../shared PGM=${ARCH}/startup.rel # C source names, if any, go here -- minus the .c -C_PIECES=bspclean bsplibc bsppost bspstart main page_table sbrk setvec gnatinstallhandler +C_PIECES=bspclean bsplibc bsppost bspstart bootcard main page_table sbrk setvec gnatinstallhandler C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/m68k/mvme167/startup/Makefile.in b/c/src/lib/libbsp/m68k/mvme167/startup/Makefile.in index 1dfc1e8633..73fc774c7f 100644 --- a/c/src/lib/libbsp/m68k/mvme167/startup/Makefile.in +++ b/c/src/lib/libbsp/m68k/mvme167/startup/Makefile.in @@ -18,7 +18,7 @@ VPATH = @srcdir@:@srcdir@/../../shared:@srcdir@/../../../shared PGM=${ARCH}/startup.rel # C source names, if any, go here -- minus the .c -C_PIECES=bspclean bsplibc bsppost bspstart main page_table sbrk setvec gnatinstallhandler +C_PIECES=bspclean bsplibc bsppost bspstart bootcard main page_table sbrk setvec gnatinstallhandler C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/m68k/ods68302/startup/Makefile.in b/c/src/lib/libbsp/m68k/ods68302/startup/Makefile.in index 4e83fac5e1..6fe2321d6d 100644 --- a/c/src/lib/libbsp/m68k/ods68302/startup/Makefile.in +++ b/c/src/lib/libbsp/m68k/ods68302/startup/Makefile.in @@ -18,8 +18,7 @@ VPATH = @srcdir@:@srcdir@/../../shared:@srcdir@/../../../shared PGM=${ARCH}/startup.rel # C source names, if any, go here -- minus the .c -C_PIECES=crc debugport gdb-hooks main m68302scc m68k-stub memcheck trace \ - gnatinstallhandler bsplibc bsppost bspstart bspclean sbrk setvec +C_PIECES=crc debugport gdb-hooks bootcard main m68302scc m68k-stub memcheck trace gnatinstallhandler bsplibc bsppost bspstart bspclean sbrk setvec C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/mips64orion/p4000/startup/Makefile.in b/c/src/lib/libbsp/mips64orion/p4000/startup/Makefile.in index 4e552ab859..bef2810f22 100644 --- a/c/src/lib/libbsp/mips64orion/p4000/startup/Makefile.in +++ b/c/src/lib/libbsp/mips64orion/p4000/startup/Makefile.in @@ -18,7 +18,7 @@ VPATH = @srcdir@:@srcdir@/../../../shared PGM=${ARCH}/startup.rel # C source names, if any, go here -- minus the .c -C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec inittlb gnatinstallhandler +C_PIECES=bspclean bsplibc bsppost bspstart bootcard main sbrk setvec inittlb gnatinstallhandler C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/no_cpu/no_bsp/startup/Makefile.in b/c/src/lib/libbsp/no_cpu/no_bsp/startup/Makefile.in index 10c9d8458d..f486ac3def 100644 --- a/c/src/lib/libbsp/no_cpu/no_bsp/startup/Makefile.in +++ b/c/src/lib/libbsp/no_cpu/no_bsp/startup/Makefile.in @@ -18,7 +18,7 @@ VPATH = @srcdir@:@srcdir@/../../../shared PGM=${ARCH}/startup.rel # C source names, if any, go here -- minus the .c -C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec gnatinstallhandler +C_PIECES=bspclean bsplibc bsppost bspstart bootcard main sbrk setvec gnatinstallhandler C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/powerpc/dmv177/startup/Makefile.in b/c/src/lib/libbsp/powerpc/dmv177/startup/Makefile.in index 555d19f01a..3d96a7f597 100644 --- a/c/src/lib/libbsp/powerpc/dmv177/startup/Makefile.in +++ b/c/src/lib/libbsp/powerpc/dmv177/startup/Makefile.in @@ -18,7 +18,7 @@ VPATH = @srcdir@:@srcdir@/../../../shared PGM=${ARCH}/startup.rel # C source names, if any, go here -- minus the .c -C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec genpvec vmeintr gnatinstallhandler +C_PIECES=bspclean bsplibc bsppost bspstart bootcard main sbrk setvec genpvec vmeintr gnatinstallhandler C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/powerpc/eth_comm/startup/Makefile.in b/c/src/lib/libbsp/powerpc/eth_comm/startup/Makefile.in index a84f3bac99..f0cc44f972 100644 --- a/c/src/lib/libbsp/powerpc/eth_comm/startup/Makefile.in +++ b/c/src/lib/libbsp/powerpc/eth_comm/startup/Makefile.in @@ -18,7 +18,7 @@ VPATH = @srcdir@:@srcdir@/../../../shared PGM=${ARCH}/startup.rel # C source names, if any, go here -- minus the .c -C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec alloc860 mmu gnatinstallhandler +C_PIECES=bspclean bsplibc bsppost bspstart bootcard main sbrk setvec alloc860 mmu gnatinstallhandler C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/powerpc/helas403/startup/Makefile.in b/c/src/lib/libbsp/powerpc/helas403/startup/Makefile.in index 8b3d169b90..e6c746b8b8 100644 --- a/c/src/lib/libbsp/powerpc/helas403/startup/Makefile.in +++ b/c/src/lib/libbsp/powerpc/helas403/startup/Makefile.in @@ -18,7 +18,7 @@ VPATH = @srcdir@:@srcdir@/../../../shared PGM=${ARCH}/startup.rel # C source names, if any, go here -- minus the .c -C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec gnatinstallhandler +C_PIECES=bspclean bsplibc bsppost bspstart bootcard main sbrk setvec gnatinstallhandler C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/powerpc/mcp750/startup/Makefile.in b/c/src/lib/libbsp/powerpc/mcp750/startup/Makefile.in index 227bfd1c22..cf91444a77 100644 --- a/c/src/lib/libbsp/powerpc/mcp750/startup/Makefile.in +++ b/c/src/lib/libbsp/powerpc/mcp750/startup/Makefile.in @@ -9,7 +9,7 @@ RTEMS_ROOT = @top_srcdir@ PROJECT_ROOT = @PROJECT_ROOT@ # C source names, if any, go here -- minus the .c -C_PIECES=main bspstart bsppost bsplibc sbrk bspclean gnatinstallhandler +C_PIECES=bootcard main bspstart bsppost bsplibc sbrk bspclean gnatinstallhandler C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/startup/Makefile.in b/c/src/lib/libbsp/powerpc/motorola_powerpc/startup/Makefile.in index 227bfd1c22..cf91444a77 100644 --- a/c/src/lib/libbsp/powerpc/motorola_powerpc/startup/Makefile.in +++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/startup/Makefile.in @@ -9,7 +9,7 @@ RTEMS_ROOT = @top_srcdir@ PROJECT_ROOT = @PROJECT_ROOT@ # C source names, if any, go here -- minus the .c -C_PIECES=main bspstart bsppost bsplibc sbrk bspclean gnatinstallhandler +C_PIECES=bootcard main bspstart bsppost bsplibc sbrk bspclean gnatinstallhandler C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/powerpc/papyrus/startup/Makefile.in b/c/src/lib/libbsp/powerpc/papyrus/startup/Makefile.in index 3e9d1cef1b..96463b95fe 100644 --- a/c/src/lib/libbsp/powerpc/papyrus/startup/Makefile.in +++ b/c/src/lib/libbsp/powerpc/papyrus/startup/Makefile.in @@ -18,7 +18,7 @@ VPATH = @srcdir@:@srcdir@/../../../shared PGM=${ARCH}/startup.rel # C source names, if any, go here -- minus the .c -C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec gnatinstallhandler +C_PIECES=bspclean bsplibc bsppost bspstart bootcard main sbrk setvec gnatinstallhandler C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/powerpc/ppcn_60x/startup/Makefile.in b/c/src/lib/libbsp/powerpc/ppcn_60x/startup/Makefile.in index 69ad97dc12..50c4458c3e 100644 --- a/c/src/lib/libbsp/powerpc/ppcn_60x/startup/Makefile.in +++ b/c/src/lib/libbsp/powerpc/ppcn_60x/startup/Makefile.in @@ -36,9 +36,9 @@ include $(RTEMS_ROOT)/make/custom/${RTEMS_BSP}.cfg include $(RTEMS_ROOT)/make/leaf.cfg # Files expected to be from the shared directory: -# sbrk main bsplibc bsppost +# sbrk bootcard main bsplibc bsppost STARTUP_PIECES=bspstart bspclean sbrk setvec spurious genpvec swap \ - main bsplibc bsppost + main bootcard bsplibc bsppost # # (OPTIONAL) Add local stuff here using += diff --git a/c/src/lib/libbsp/powerpc/psim/startup/Makefile.in b/c/src/lib/libbsp/powerpc/psim/startup/Makefile.in index 7fde8d7e37..d9bee8bd7c 100644 --- a/c/src/lib/libbsp/powerpc/psim/startup/Makefile.in +++ b/c/src/lib/libbsp/powerpc/psim/startup/Makefile.in @@ -18,7 +18,7 @@ VPATH = @srcdir@:@srcdir@/../../../shared PGM=${ARCH}/startup.rel # C source names, if any, go here -- minus the .c -C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec gnatinstallhandler +C_PIECES=bspclean bsplibc bsppost bspstart bootcard main sbrk setvec gnatinstallhandler C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/powerpc/score603e/startup/Makefile.in b/c/src/lib/libbsp/powerpc/score603e/startup/Makefile.in index 77d1bf4bc0..b2f8be4615 100644 --- a/c/src/lib/libbsp/powerpc/score603e/startup/Makefile.in +++ b/c/src/lib/libbsp/powerpc/score603e/startup/Makefile.in @@ -18,7 +18,7 @@ VPATH = @srcdir@:@srcdir@/../../../shared PGM=${ARCH}/startup.rel # C source names, if any, go here -- minus the .c -C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec \ +C_PIECES=bspclean bsplibc bsppost bspstart bootcard main sbrk setvec \ Hwr_init spurious genpvec $(STARTUP_PIECES) gnatinstallhandler C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/sh/gensh1/startup/Makefile.in b/c/src/lib/libbsp/sh/gensh1/startup/Makefile.in index f4317de082..7636ad88f4 100644 --- a/c/src/lib/libbsp/sh/gensh1/startup/Makefile.in +++ b/c/src/lib/libbsp/sh/gensh1/startup/Makefile.in @@ -18,7 +18,7 @@ VPATH=@srcdir@:@srcdir@/../../shared:@srcdir@/../../../shared PGM=${ARCH}/startup.rel # C source names, if any, go here -- minus the .c -C_PIECES=bsplibc bsppost bspstart bspclean sbrk main gnatinstallhandler +C_PIECES=bsplibc bsppost bspstart bspclean sbrk bootcard main gnatinstallhandler C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/shared/bootcard.c b/c/src/lib/libbsp/shared/bootcard.c new file mode 100644 index 0000000000..9f7a3893ce --- /dev/null +++ b/c/src/lib/libbsp/shared/bootcard.c @@ -0,0 +1,96 @@ +/* + * A simple main which can be used on any embedded target. + * + * This style of initialization insures that the C++ global + * constructors are executed after RTEMS is initialized. + * + * Thanks to Chris Johns for this idea. + * + * COPYRIGHT (c) 1989-1998. + * On-Line Applications Research Corporation (OAR). + * Copyright assigned to U.S. Government, 1994. + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.OARcorp.com/rtems/license.html. + * + * $Id$ + */ + +#include + +extern void bsp_start( void ); +extern void bsp_cleanup( void ); + +extern rtems_configuration_table Configuration; +extern rtems_configuration_table BSP_Configuration; +extern rtems_cpu_table Cpu_table; + +rtems_interrupt_level bsp_isr_level; + +/* + * Since there is a forward reference + */ + +int main(int argc, char **argv); + +int boot_card(int argc, char **argv) +{ + int status; + + /* + * Set default values for the CPU Table fields all ports must have. + * These values can be overridden in bsp_start() but they are + * right most of the time. + */ + + Cpu_table.pretasking_hook = NULL; + Cpu_table.predriver_hook = NULL; + Cpu_table.postdriver_hook = NULL; + Cpu_table.idle_task = NULL; + Cpu_table.do_zero_of_workspace = TRUE; + Cpu_table.interrupt_stack_size = RTEMS_MINIMUM_STACK_SIZE; + Cpu_table.extra_mpci_receive_server_stack = 0; + Cpu_table.stack_allocate_hook = NULL; + Cpu_table.stack_free_hook = NULL; + + + /* + * Copy the configuration table so we and the BSP wants to change it. + */ + + BSP_Configuration = Configuration; + + /* + * The atexit hook will be before the static destructor list's entry + * point. + */ + + bsp_start(); + + /* + * Initialize RTEMS but do NOT start multitasking. + */ + + bsp_isr_level = + rtems_initialize_executive_early( &BSP_Configuration, &Cpu_table ); + + /* + * Call main() and get the global constructors invoked if there + * are any. + */ + + status = main(argc, argv); + + /* + * Perform any BSP specific shutdown actions. + */ + + bsp_cleanup(); + + /* + * Now return to the start code. + */ + + return status; +} diff --git a/c/src/lib/libbsp/shared/main.c b/c/src/lib/libbsp/shared/main.c index d516ff9b08..2ac7a0a4af 100644 --- a/c/src/lib/libbsp/shared/main.c +++ b/c/src/lib/libbsp/shared/main.c @@ -21,95 +21,10 @@ char *rtems_progname; -extern void bsp_start( void ); -extern void bsp_cleanup( void ); - -extern rtems_configuration_table Configuration; -extern rtems_configuration_table BSP_Configuration; -extern rtems_cpu_table Cpu_table; - -#if defined(USE_INIT_FINI) -extern void _fini( void ); -extern void _init( void ); -#endif - rtems_interrupt_level bsp_isr_level; -/* - * Since there is a forward reference - */ - -int main(int argc, char **argv); - -int boot_card(int argc, char **argv) -{ - int status; - - /* - * Set default values for the CPU Table fields all ports must have. - * These values can be overridden in bsp_start() but they are - * right most of the time. - */ - - Cpu_table.pretasking_hook = NULL; - Cpu_table.predriver_hook = NULL; - Cpu_table.postdriver_hook = NULL; - Cpu_table.idle_task = NULL; - Cpu_table.do_zero_of_workspace = TRUE; - Cpu_table.interrupt_stack_size = RTEMS_MINIMUM_STACK_SIZE; - Cpu_table.extra_mpci_receive_server_stack = 0; - Cpu_table.stack_allocate_hook = NULL; - Cpu_table.stack_free_hook = NULL; - - - /* - * Copy the configuration table so we and the BSP wants to change it. - */ - - BSP_Configuration = Configuration; - - /* - * The atexit hook will be before the static destructor list's entry - * point. - */ - - bsp_start(); - - /* - * Initialize RTEMS but do NOT start multitasking. - */ - - bsp_isr_level = - rtems_initialize_executive_early( &BSP_Configuration, &Cpu_table ); - - /* - * Call main() and get the global constructors invoked if there - * are any. - */ - -#if defined(USE_INIT_FINI) - atexit( _fini ); - _init(); -#endif - - status = main(argc, argv); - - /* - * Perform any BSP specific shutdown actions. - */ - - bsp_cleanup(); - - /* - * Now return to the start code. - */ - - return status; -} - int main(int argc, char **argv) { - if ((argc > 0) && argv && argv[0]) rtems_progname = argv[0]; else diff --git a/c/src/lib/libbsp/sparc/erc32/startup/Makefile.in b/c/src/lib/libbsp/sparc/erc32/startup/Makefile.in index b645b0e476..2ed43a0fbb 100644 --- a/c/src/lib/libbsp/sparc/erc32/startup/Makefile.in +++ b/c/src/lib/libbsp/sparc/erc32/startup/Makefile.in @@ -18,7 +18,7 @@ VPATH = @srcdir@:@srcdir@/../../../shared PGM=${ARCH}/startup.rel # C source names, if any, go here -- minus the .c -C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec spurious +C_PIECES=bspclean bsplibc bsppost bspstart main bootcard sbrk setvec spurious C_FILES=$(C_PIECES:%=%.c) C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) diff --git a/c/src/lib/libbsp/unix/posix/startup/Makefile.in b/c/src/lib/libbsp/unix/posix/startup/Makefile.in index d8478b3522..826419bbd9 100644 --- a/c/src/lib/libbsp/unix/posix/startup/Makefile.in +++ b/c/src/lib/libbsp/unix/posix/startup/Makefile.in @@ -45,7 +45,7 @@ CXX_MAIN=rtems-ctor C_MAIN= else CXX_MAIN= -C_MAIN=main +C_MAIN=main bootcard endif # -- cgit v1.2.3