Changeset 69537ca9 in rtems for c/src


Ignore:
Timestamp:
01/12/00 16:38:56 (23 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
b2b4835
Parents:
1e194112
Message:

Patch rtems-rc-20000104-16.diff from Ralf Corsepius <corsepiu@…>
that converts the libbsp/i386 subdirectory to full automake.

Location:
c/src/lib/libbsp
Files:
31 added
24 deleted
21 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/i386/pc386/Makefile.am

    r1e194112 r69537ca9  
    66ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
    77
    8 if HAS_NETWORKING
    9 # We only build the Network library if HAS_NETWORKING was defined
    10 # dec21140 is supported via libchip
    11 NETWORK = ne2000 wd8003 3c509
    12 endif
    13 
    148# wrapup is the one that actually builds and installs the library
    159#  from the individual .rel files built in other directories
    16 SUBDIRS = . include tools start startup clock console timer $(NETWORK) wrapup
     10SUBDIRS = . include tools start startup clock console timer ne2000 wd8003 \
     11    3c509 wrapup
    1712
    1813include $(top_srcdir)/../../bsp.am
     14
     15$(PROJECT_RELEASE)/BootImgs:
     16        $(mkinstalldirs) $@
     17
     18TMPINSTALL_FILES += $(PROJECT_RELEASE)/BootImgs
    1919
    2020EXTRA_DIST = HOWTO README.dec21140 STATUS bsp_specs times_i486dx times_p5
  • c/src/lib/libbsp/i386/pc386/start/start16.S

    r1e194112 r69537ca9  
    1717| This file is provided "AS IS" without warranty of any kind, either
    1818| expressed or implied.
    19 +--------------------------------------------------------------------------+
    20 | This code is partly based on (from the Linux source tree):
    21 |   video.S - Copyright (C) 1995, 1996 Martin Mares <mj@k332.feld.cvut.cz>
    2219+--------------------------------------------------------------------------*/
    2320
  • c/src/lib/libbsp/i386/pc386/startup/ldsegs.S

    r1e194112 r69537ca9  
    3434|
    3535|  $Id$
    36 |
    37 | Also based on (from the Linux source tree):
    38 |   setup.S - Copyright (C) 1991, 1992 Linus Torvalds
    3936+--------------------------------------------------------------------------*/
    4037
  • c/src/lib/libbsp/i386/ts_386ex/Makefile.am

    r1e194112 r69537ca9  
    66ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
    77
    8 if HAS_NETWORKING
    9 # We only build the Network library if HAS_NETWORKING was defined
    10 NETWORK = network
    11 endif
    12 
    138# wrapup is the one that actually builds and installs the library
    149#  from the individual .rel files built in other directories
    15 SUBDIRS = . include tools start startup clock console timer $(NETWORK) wrapup
     10SUBDIRS = . include tools start startup clock console timer network wrapup
    1611
    1712include $(top_srcdir)/../../bsp.am
  • c/src/lib/libbsp/i386/ts_386ex/tools/Makefile.am

    r1e194112 r69537ca9  
    77
    88noinst_SCRIPTS = \
    9 coff2bin
     9coff2bin \
     10elf2exe
    1011
    1112SUBDIRS = \
    1213ts_1325_ada \
     14network_ada \
     15debug_ada \
     16debug_c \
    1317dos_sup
    1418
  • c/src/lib/libbsp/i386/ts_386ex/tools/configure.in

    r1e194112 r69537ca9  
    1919dos_sup/Makefile
    2020ts_1325_ada/Makefile
     21debug_ada/Makefile
     22debug_c/Makefile
     23network_ada/Makefile
     24network_ada/adasockets/Makefile
     25network_ada/listener/Makefile
     26network_ada/tcprelay/Makefile
     27ts_1325_ada/Makefile
    2128)
  • c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c

    r1e194112 r69537ca9  
    5757void bsp_pretasking_hook(void)
    5858{
    59     extern int end;
    60     rtems_unsigned32        heap_start;
     59    extern void             *_HeapStart;
     60    extern rtems_unsigned32  _HeapSize;
    6161
    62     heap_start = (rtems_unsigned32) &end;
    63     if (heap_start & (CPU_ALIGNMENT-1))
    64         heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
    65 
    66     bsp_libc_init((void *) heap_start, 64 * 1024, 0);
     62    bsp_libc_init( &_HeapStart, _HeapSize, 0 );
    6763 
    6864#ifdef RTEMS_DEBUG
  • c/src/lib/libbsp/m68k/efi332/include/bsp.h

    r1e194112 r69537ca9  
    7373/* externals */
    7474
    75 extern char _endtext[];
    76 extern char _sdata[];
     75extern char _etext[];
     76extern char _copy_start[];
    7777extern char _edata[];
    78 extern char __bss_start[];
    79 extern char _end[];
     78extern char _bss_start[];
     79extern char end[];
    8080extern char _copy_data_from_rom[];
    8181extern char __end_of_ram[];
  • c/src/lib/libbsp/m68k/efi332/start/start.c

    r1e194112 r69537ca9  
    3232                  moveal #M68Kvec, %a0;
    3333                  movec %a0, %vbr;
    34                   movel  #_end, %d0;
     34                  movel  #end, %d0;
    3535                  addl   " STACK_SIZE ",%d0;
    3636                  movel  %d0,%sp;
     
    199199   */
    200200  {
    201     register char *src = _endtext;
    202     register char *dst = _sdata;
     201    register char *src = _etext;
     202    register char *dst = _copy_start;
    203203
    204204    if (_copy_data_from_rom)
     
    208208   
    209209    /* Zero bss */
    210     for (dst = __bss_start; dst< _end; dst++)
     210    for (dst = _bss_start; dst< end; dst++)
    211211      *dst = 0;
    212212  }
  • c/src/lib/libbsp/m68k/efi68k/include/bsp.h

    r1e194112 r69537ca9  
    7373/* externals */
    7474
    75 extern char _endtext[];
    76 extern char _sdata[];
     75extern char _etext[];
     76extern char _copy_start[];
    7777extern char _edata[];
    78 extern char __bss_start[];
    79 extern char _end[];
     78extern char _bss_start[];
     79extern char end[];
    8080extern char _copy_data_from_rom[];
    8181extern char __end_of_ram[];
  • c/src/lib/libbsp/m68k/efi68k/start/start.c

    r1e194112 r69537ca9  
    3131  /* disable interrupts, load stack pointer */
    3232  asm volatile ( "oriw  #0x0700, %sr;
    33                   movel  #_end, %d0;
     33                  movel  #end, %d0;
    3434                  addl   " STACK_SIZE ",%d0;
    3535                  movel  %d0,%sp;
     
    4141   */
    4242  {
    43     register char *src = _endtext;
    44     register char *dst = _sdata;
     43    register char *src = _etext;
     44    register char *dst = _copy_start;
    4545
    4646    if (_copy_data_from_rom)
     
    5050   
    5151    /* Zero bss */
    52     for (dst = __bss_start; dst< _end; dst++)
     52    for (dst = _bss_start; dst< end; dst++)
    5353      *dst = 0;
    5454  }
  • c/src/lib/libbsp/m68k/gen68302/start/start.S

    r1e194112 r69537ca9  
    198198        |
    199199zerobss:
    200         moveal  # SYM (end),a0                | find end of .bss
    201         moveal  # SYM (bss_start),a1          | find beginning of .bss
     200        moveal  # SYM (_end),a0                | find end of .bss
     201        moveal  # SYM (_bss_start),a1          | find beginning of .bss
    202202        moveq   #0,d0
    203203
     
    206206        jlt     loop                    | loop until _end reached
    207207
    208         movel   # SYM (end),d0               | d0 = end of bss/start of heap
     208        movel   # SYM (_end),d0               | d0 = end of bss/start of heap
    209209        addl    # SYM (heap_size),d0          | d0 = end of heap
    210210        movel   d0, SYM (stack_start)  | Save for brk() routine
  • c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c

    r1e194112 r69537ca9  
    5757void bsp_pretasking_hook(void)
    5858{
    59     extern int end;
     59    extern int _end;
    6060    rtems_unsigned32        heap_start;
    6161
    62     heap_start = (rtems_unsigned32) &end;
     62    heap_start = (rtems_unsigned32) &_end;
    6363    if (heap_start & (CPU_ALIGNMENT-1))
    6464        heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
  • c/src/lib/libbsp/m68k/gen68340/start/start.S

    r1e194112 r69537ca9  
    502502        /* -- copy to address of the 68349 initialization code -- */
    503503
    504         lea.l           _copy_start(%pc),crt0_ptr3
    505         lea.l           _copy_end(%pc),crt0_ptr4
     504        lea.l           _copy_start_code(%pc),crt0_ptr3
     505        lea.l           _copy_end_code(%pc),crt0_ptr4
    506506        move.l          crt0_ptr4,crt0_temp
    507507        sub.l           crt0_ptr3,crt0_temp
     
    519519        /* -- start of initialization code -- */
    520520
    521 _copy_start:
     521_copy_start_code:
    522522        bra.l           _begin_68349_init
    523523
     
    710710        jmp.l           (_fill_test)                            | must be absolute long
    711711
    712 _copy_end:
     712_copy_end_code:
    713713
    714714/*-------------------------------------------------
     
    813813        PUBLIC (_CopyDataClearBSSAndStart)
    814814SYM(_CopyDataClearBSSAndStart):
    815         lea     copy_start,a0                                   | Get start of DATA in RAM
    816         lea     SYM(etext),a2                                   | Get start of DATA in ROM
     815        lea     SYM(_copy_start),a0                             | Get start of DATA in RAM
     816        lea     SYM(_etext),a2                                  | Get start of DATA in ROM
    817817        cmpl    a0,a2                                           | Are they the same?
    818818        beq.s   NOCOPY                                          | Yes, no copy necessary
    819         lea     copy_end,a1                                     | Get end of DATA in RAM
     819        lea     SYM(_copy_end),a1                               | Get end of DATA in RAM
    820820        bra.s   COPYLOOPTEST                                    | Branch into copy loop
    821821COPYLOOP:
     
    826826NOCOPY:
    827827
    828         lea     clear_start,a0                                  | Get start of BSS
    829         lea     clear_end,a1                                    | Get end of BSS
     828        lea     _clear_start,a0                                 | Get start of BSS
     829        lea     _clear_end,a1                                   | Get end of BSS
    830830        clrl    d0                                              | Value to set
    831831        bra.s   ZEROLOOPTEST                                    | Branch into clear loop
     
    836836        bcs.s   ZEROLOOP                                        | No, skip
    837837
    838         movel   #stack_init,a7                                  | set master stack pointer
     838        movel   #_stack_init,a7                                 | set master stack pointer
    839839        movel   d0,a7@-                                         | environp
    840840        movel   d0,a7@-                                         | argv
  • c/src/lib/libbsp/m68k/gen68360/start/start.S

    r1e194112 r69537ca9  
    395395        bcs.s   ZEROLOOP                | No, skip
    396396
    397         movel   #stack_init,a7          | set master stack pointer
     397        movel   #_stack_init,a7         | set master stack pointer
    398398        pea     env                     | envp
    399399        pea     arg                     | argv
  • c/src/lib/libbsp/m68k/gen68360/startup/Makefile.in

    r1e194112 r69537ca9  
    4343#
    4444
    45 DEFINES +=
     45DEFINES += -DUSE_INIT_FINI
    4646CPPFLAGS +=
    4747CFLAGS +=
  • c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.bootp

    r1e194112 r69537ca9  
    11/*
    22 * This file contains GNU linker directives for a generic MC68360 board.
    3  * Variations in hardware type and dynamic memory size can be made
    4  * by overriding some values with linker command-line arguments.
     3 * Variations in memory size and allocation can be made by
     4 * overriding some values with linker command-line arguments.
    55 *
    6  * These linker directives are for producing a PROM version.
     6 * These linker directives are for producing a bootstrap PROM version.
    77 * The data segment is placed at the end of the text segment in the PROM.
    88 * The start-up code takes care of copying this region to RAM.
     
    1212 * Saskatoon, Saskatchewan, CANADA
    1313 * eric@skatter.usask.ca
    14  *
     14 * 
    1515 *  $Id$
    1616 */
     
    1818/*
    1919 * Declare some sizes.
    20  * XXX: The assignment of ". += XyzSize;" fails in older gld's if the
    21  *      number used there is not constant.  If this happens to you, edit
    22  *      the lines marked XXX below to use a constant value.
    2320 */
    2421HeapSize = DEFINED(HeapSize) ? HeapSize : 0x10000;
     
    4441        rom : {
    4542                _RomBase = .;
    46                 __RomBase = .;
    4743        } >rom
    4844
     
    5248        ram : {
    5349                _RamBase = .;
    54                 __RamBase = .;
    5550        } >ram
    5651
     
    5853         * Text, data and bss segments
    5954         */
    60         .text : AT (0x00000000) {
    61                 CREATE_OBJECT_SYMBOLS
     55        .text : AT(0x0) {
    6256                *(.text)
    63                 . = ALIGN (16);
    64 
    65                 *(.eh_fram)
    66                 . = ALIGN (16);
    6757
    6858                /*
    69                  * C++ constructors
     59                 * C++ constructors/destructors
    7060                 */
    71                 __CTOR_LIST__ = .;
    72                 LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
     61                *(.gnu.linkonce.t.*)
     62
     63                /*
     64                 * Initialization and finalization code.
     65                 */
     66                PROVIDE (_init = .);
     67                *crti.o(.init)
     68                *(.init)
     69                *crtn.o(.init)
     70                PROVIDE (_fini = .);
     71                *crti.o(.fini)
     72                *(.fini)
     73                *crtn.o(.fini)
     74
     75                /*
     76                 * C++ constructors/destructors
     77                 */
     78                . = ALIGN (16);
     79                *crtbegin.o(.ctors)
    7380                *(.ctors)
    74                 LONG(0)
    75                 __CTOR_END__ = .;
    76                 __DTOR_LIST__ = .;
    77                 LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
     81                *crtend.o(.ctors)
     82                *crtbegin.o(.dtors)
    7883                *(.dtors)
    79                 LONG(0)
    80                 __DTOR_END__ = .;
     84                *crtend.o(.dtors)
    8185
    82                 . = ALIGN (16);
     86                /*
     87                 * Exception frame info
     88                 */
     89                . = ALIGN (16);
     90                *(.eh_frame)
    8391
    84                 etext = .;
    85                 _etext = .;
    86         } >rom
     92                /*
     93                 * Read-only data
     94                 */
     95                . = ALIGN (16);
     96                _rodata_start = . ;
     97                *(.rodata)
     98                *(.gnu.linkonce.r*)
     99
     100                 . = ALIGN (16);
     101                PROVIDE (etext = .);
     102        } >rom
    87103        .data : AT(SIZEOF(.text)) {
    88104                copy_start = .;
    89105                *(.data)
     106                *(.gnu.linkonce.d*)
     107                *(.gcc_except_table)
    90108                . = ALIGN (16);
    91                 _edata = .;
     109                PROVIDE (_edata = .);
    92110                copy_end = .;
    93111        } >myram
     
    100118                *(COMMON)
    101119                . = ALIGN (16);
    102                 _end = .;
     120                PROVIDE (end = .);
    103121
    104122                _HeapStart = .;
    105                 __HeapStart = .;
    106                 . += HeapSize;  /* XXX -- Old gld can't handle this */
    107                 . += StackSize; /* XXX -- Old gld can't handle this */
    108                 /* . += 0x10000; */ /* HeapSize for old gld */
    109                 /* . += 0x1000;  */ /* StackSize for old gld */
     123                . += HeapSize;
     124                . += StackSize;
    110125                . = ALIGN (16);
    111126                stack_init = .;
     
    113128
    114129                _WorkspaceBase = .;
    115                 __WorkspaceBase = .;
    116130        } >myram
    117131
  • c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.prom

    r1e194112 r69537ca9  
    11/*
    22 * This file contains GNU linker directives for a generic MC68360 board.
    3  * Variations in hardware type and dynamic memory size can be made
    4  * by overriding some values with linker command-line arguments.
     3 * Variations in memory size and allocation can be made by
     4 * overriding some values with linker command-line arguments.
    55 *
    66 * These linker directives are for producing a PROM version.
     
    1212 * Saskatoon, Saskatchewan, CANADA
    1313 * eric@skatter.usask.ca
    14  *
     14 * 
    1515 *  $Id$
    1616 */
     
    1818/*
    1919 * Declare some sizes.
    20  * XXX: The assignment of ". += XyzSize;" fails in older gld's if the
    21  *      number used there is not constant.  If this happens to you, edit
    22  *      the lines marked XXX below to use a constant value.
    2320 */
    2421HeapSize = DEFINED(HeapSize) ? HeapSize : 0x10000;
     
    4340        rom : {
    4441                _RomBase = .;
    45                 __RomBase = .;
    4642        } >rom
    4743
     
    5147        ram : {
    5248                _RamBase = .;
    53                 __RamBase = .;
    5449        } >ram
    5550
     
    5752         * Text, data and bss segments
    5853         */
    59         .text : AT (0x00000000) {
    60                 CREATE_OBJECT_SYMBOLS
     54        .text : AT(0x0) {
    6155                *(.text)
    62                 . = ALIGN (16);
    63 
    64                 *(.eh_fram)
    65                 . = ALIGN (16);
    6656
    6757                /*
    68                  * C++ constructors
     58                 * C++ constructors/destructors
    6959                 */
    70                 __CTOR_LIST__ = .;
    71                 LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
     60                *(.gnu.linkonce.t.*)
     61
     62                /*
     63                 * Initialization and finalization code.
     64                 */
     65                PROVIDE (_init = .);
     66                *crti.o(.init)
     67                *(.init)
     68                *crtn.o(.init)
     69                PROVIDE (_fini = .);
     70                *crti.o(.fini)
     71                *(.fini)
     72                *crtn.o(.fini)
     73
     74                /*
     75                 * C++ constructors/destructors
     76                 */
     77                . = ALIGN (16);
     78                *crtbegin.o(.ctors)
    7279                *(.ctors)
    73                 LONG(0)
    74                 __CTOR_END__ = .;
    75                 __DTOR_LIST__ = .;
    76                 LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
     80                *crtend.o(.ctors)
     81                *crtbegin.o(.dtors)
    7782                *(.dtors)
    78                 LONG(0)
    79                 __DTOR_END__ = .;
     83                *crtend.o(.dtors)
    8084
    81                 . = ALIGN (16);
     85                /*
     86                 * Exception frame info
     87                 */
     88                . = ALIGN (16);
     89                *(.eh_frame)
    8290
    83                 etext = .;
    84                 _etext = .;
    85         } >rom
     91                /*
     92                 * Read-only data
     93                 */
     94                . = ALIGN (16);
     95                _rodata_start = . ;
     96                *(.rodata)
     97                *(.gnu.linkonce.r*)
     98
     99                 . = ALIGN (16);
     100                PROVIDE (etext = .);
     101        } >rom
    86102        .data : AT(SIZEOF(.text)) {
    87103                copy_start = .;
    88104                *(.data)
     105                *(.gnu.linkonce.d*)
     106                *(.gcc_except_table)
    89107                . = ALIGN (16);
    90                 _edata = .;
     108                PROVIDE (_edata = .);
    91109                copy_end = .;
    92110        } >ram
     
    99117                *(COMMON)
    100118                . = ALIGN (16);
    101                 _end = .;
     119                PROVIDE (end = .);
    102120
    103121                _HeapStart = .;
    104                 __HeapStart = .;
    105                 . += HeapSize;  /* XXX -- Old gld can't handle this */
    106                 . += StackSize; /* XXX -- Old gld can't handle this */
    107                 /* . += 0x10000; */ /* HeapSize for old gld */
    108                 /* . += 0x1000;  */ /* StackSize for old gld */
     122                . += HeapSize;
     123                . += StackSize;
    109124                . = ALIGN (16);
    110125                stack_init = .;
     
    112127
    113128                _WorkspaceBase = .;
    114                 __WorkspaceBase = .;
    115129        } >ram
    116130
  • c/src/lib/libbsp/m68k/idp/startup/bspstart.c

    r1e194112 r69537ca9  
    6464void bsp_pretasking_hook(void)
    6565{
    66     extern int end;
     66    extern int _end;
    6767    rtems_unsigned32        heap_start;
    6868 
    69     heap_start = (rtems_unsigned32) &end;
     69    heap_start = (rtems_unsigned32) &_end;
    7070    if (heap_start & (CPU_ALIGNMENT-1))
    7171        heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
  • c/src/lib/libbsp/m68k/ods68302/start/reset.S

    r1e194112 r69537ca9  
    439439
    440440copy_data:
    441         moveal  #etext,%a0                      | find the end of .text
    442         moveal  #data_start,%a1                 | find the beginning of .data
    443         moveal  #edata,%a2                      | find the end of .data
     441        moveal  #_etext,%a0                     | find the end of .text
     442        moveal  #_copy_start,%a1                | find the beginning of .data
     443        moveal  #_edata,%a2                     | find the end of .data
    444444       
    445445copy_data_loop:
     
    455455zerobss:
    456456        moveal  #end,%a0                        | find end of .bss
    457         moveal  #bss_start,%a1                  | find beginning of .bss
     457        moveal  #_bss_start,%a1                 | find beginning of .bss
    458458        moveq   #0,%d0
    459459       
  • c/src/lib/libbsp/m68k/shared/start.S

    r1e194112 r69537ca9  
    6969        |
    7070zerobss:
    71         moveal  # SYM (end),a0          | find end of .bss
    72         moveal  # SYM (bss_start),a1    | find beginning of .bss
     71        moveal  # SYM (end),a0         | find end of .bss
     72        moveal  # SYM (_bss_start),a1   | find beginning of .bss
    7373        movel   #0,d0
    7474
     
    7777        jlt     loop                    | loop until _end reached
    7878
    79         movel   # SYM (stack_init),d0   | d0 = stop of stack
     79        movel   # SYM (_stack_init),d0  | d0 = stop of stack
    8080        andl    #0xffffffc0,d0          | align it on 16 byte boundary
    8181        movw    #0x3700,sr              | SUPV MODE,INTERRUPTS OFF!!!
Note: See TracChangeset for help on using the changeset viewer.