source: rtems/make/custom/pc386.cfg @ 97dbdde1

4.104.114.84.95
Last change on this file since 97dbdde1 was 97dbdde1, checked in by Joel Sherrill <joel.sherrill@…>, on Dec 7, 2001 at 12:32:10 PM

2001-12-04 Ralf Corsepius <corsepiu@…>

  • custom/bare.cfg: Remove make-target-options.
  • custom/c4xsim.cfg: Ditto.
  • custom/cvme961.cfg: Ditto.
  • custom/efi68k.cfg: Ditto.
  • custom/gen68302.cfg: Ditto.
  • custom/gen68340.cfg: Ditto.
  • custom/genmongoosev.cfg: Ditto.
  • custom/gensh4.cfg: Remove make-target-options, remove GCC272 make-exe, remove empty lines.
  • custom/h8sim.cfg: Remove make-target-options.
  • custom/mcf5206elite.cfg: Ditto.
  • custom/mrm332.cfg: Ditto.
  • custom/mvme147.cfg: Ditto.
  • custom/ods68302.cfg: Ditto.
  • custom/p4000.cfg: Ditto.
  • custom/p4600.cfg: Ditto.
  • custom/p4650.cfg: Ditto.
  • custom/pc386.cfg: Ditto.
  • custom/portsw.cfg: Ditto.
  • custom/simsh4.cfg: Ditto.
  • Property mode set to 100644
File size: 4.2 KB
Line 
1#
2#  Config file for the PC 386 BSP
3#
4#  $Id$
5#
6
7include $(RTEMS_ROOT)/make/custom/default.cfg
8
9RTEMS_CPU=i386
10ifeq ($(RTEMS_CPU_MODEL),)
11RTEMS_CPU_MODEL=i386_fp
12endif
13
14# This is the actual bsp directory used during the build process.
15RTEMS_BSP_FAMILY=pc386
16
17#  This contains the compiler options necessary to select the CPU model
18#  and (hopefully) optimize for it.
19#
20# NOTE: CPU_CFLAGS is set by pc386 variants.
21# CPU_CFLAGS =
22
23# optimize flag: typically -0, could use -O4 or -fast
24# -O4 is ok for RTEMS
25# -fomit-frame-pointer breaks debugging and C++ exceptions
26CFLAGS_OPTIMIZE_V=-O4
27
28# Here is the rule to actually build a $(ARCH)/foo.exe
29# It also builds $(ARCH)/foo.sr and $(ARCH)/foo.nm
30# Usage ref: src/tests/sptest/sp1/Makefile
31
32#+--------------------------------------------------------------------------+
33#| Set the value of RELOCADDR to the address where you want your image to
34#| load. If you'll be using GRUB to load the images it will have to be >=
35#| 0x100000 (1024K). If you are using NetBoot to load the images it can be
36#| >= 0x10000 (64K) AND <= 0x97C00 (607K) OR >= 0x100000 (1024K). The memory
37#| top is of course another limit. Make sure there is enough space before the
38#| upper memory limits for the image and the memory allocated by it to fit.
39#| Make sure the value you choose is aligned to 4 bytes.
40#+--------------------------------------------------------------------------+
41  RELOCADDR=0x00100000
42
43START16FILE=$(PROJECT_RELEASE)/lib/start16$(LIB_VARIANT).bin
44START16ADDR=0x00097C00
45HEADERADDR=0x00097E00
46
47# The following are definitions of make-exe which will work using ld as
48# is currently required.  It is expected that as of gcc 2.8, the end user
49# will be able to override parts of the compilers specs and link using gcc.
50
51ifeq ($(RTEMS_USE_GCC272),yes)
52define make-exe
53        $(LD) -N -T $(LINKCMDS) -Ttext $(RELOCADDR) -e start -nostdlib \
54           -o $(basename $@).obj \
55           $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
56        $(OBJCOPY) -O a.out-i386 \
57            --remove-section=.rodata \
58            --remove-section=.comment \
59            --remove-section=.note \
60            --strip-unneeded $(basename $@).obj $@
61        $(OBJCOPY) -O binary $(basename $@).obj $(basename $@).bin
62        $(BIN2BOOT) -v $(basename $@).bt $(HEADERADDR)\
63          $(START16FILE) $(START16ADDR) 0 $(basename $@).bin $(RELOCADDR) 0
64        $(NM) -g -n $(basename $@).obj > $(basename $@).num
65        $(SIZE) $(basename $@).obj
66#       test -d ${PROJECT_RELEASE}/BootImgs \
67#         || mkdir ${PROJECT_RELEASE}/BootImgs
68#        cp $(basename $@).bt \
69#           ${PROJECT_RELEASE}/BootImgs/$(basename $@)$(LIB_VARIANT).bt
70#       chmod 755 \
71#         ${PROJECT_RELEASE}/BootImgs/$(basename $@)$(LIB_VARIANT).bt
72endef
73else
74define make-exe
75        $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -Wl,-Ttext,$(RELOCADDR) \
76            -o $(basename $@).obj \
77            $(LINK_OBJS) $(LINK_LIBS)
78        $(OBJCOPY) -O elf32-i386 \
79            --remove-section=.rodata \
80            --remove-section=.comment \
81            --remove-section=.note \
82            --strip-unneeded $(basename $@).obj $@
83        $(OBJCOPY) -O binary $(basename $@).obj $(basename $@).bin
84        $(PROJECT_TOOLS)/bin2boot -v $(basename $@).bt $(HEADERADDR)\
85          $(START16FILE) $(START16ADDR) 0 $(basename $@).bin $(RELOCADDR) 0
86        $(NM) -g -n $(basename $@).obj > $(basename $@).num
87        $(SIZE) $(basename $@).obj
88#       test -d ${PROJECT_RELEASE}/BootImgs \
89#         || mkdir ${PROJECT_RELEASE}/BootImgs
90#       f=`basename $@ .exe`; \
91#        cp $(basename $@).bt \
92#           ${PROJECT_RELEASE}/BootImgs/$${f}$(LIB_VARIANT).bt \
93#       && chmod 755 \
94#         ${PROJECT_RELEASE}/BootImgs/$${f}$(LIB_VARIANT).bt
95#       $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -Wl,-Ttext,$(RELOCADDR) \
96#           -o $@ $(LINK_OBJS) $(LINK_LIBS)
97endef
98define make-cxx-exe
99        $(LINK.cc) $(AM_CFLAGS) $(AM_CXXFLAGS) $(AM_LDFLAGS) \
100           -Wl,-Ttext,$(RELOCADDR) -o $(basename $@).obj \
101            $(LINK_OBJS) $(LINK_LIBS)
102        $(OBJCOPY) -O elf32-i386 \
103            --remove-section=.rodata \
104            --remove-section=.comment \
105            --remove-section=.note \
106            --strip-unneeded $(basename $@).obj $@
107        $(OBJCOPY) -O binary $(basename $@).obj $(basename $@).bin
108        $(PROJECT_TOOLS)/bin2boot -v $(basename $@).bt $(HEADERADDR)\
109          $(START16FILE) $(START16ADDR) 0 $(basename $@).bin $(RELOCADDR) 0
110        $(NM) -g -n $(basename $@).obj > $(basename $@).num
111        $(SIZE) $(basename $@).obj
112endef
113endif
114
115# Miscellaneous additions go here
116
117# BSP-specific tools
118BIN2BOOT=$(PROJECT_TOOLS)/bin2boot
Note: See TracBrowser for help on using the repository browser.