source: rtems/make/custom/pc386.cfg @ c6eba79

4.104.114.84.9
Last change on this file since c6eba79 was c6eba79, checked in by Joel Sherrill <joel.sherrill@…>, on May 10, 2007 at 5:36:19 PM

2007-05-10 Joel Sherrill <joel.sherrill@…>

  • custom/gba.cfg, custom/gp32.cfg, custom/i386ex.cfg, custom/pc386.cfg, custom/sim68000.cfg, custom/ts_386ex.cfg: Clean up to use .nxe extension instead of BSP unique ones.
  • Property mode set to 100644
File size: 3.1 KB
RevLine 
[bffb938]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
[6d3ab0f]10ifeq ($(RTEMS_CPU_MODEL),)
[bffb938]11RTEMS_CPU_MODEL=i386_fp
[6d3ab0f]12endif
[bffb938]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#
[6d3ab0f]20# NOTE: CPU_CFLAGS is set by pc386 variants.
21# CPU_CFLAGS =
[bffb938]22
[0c642539]23# optimize flag: typically -O2
[7d12e020]24CFLAGS_OPTIMIZE_V = -O2 -g
[bffb938]25
26# Here is the rule to actually build a $(ARCH)/foo.exe
27# It also builds $(ARCH)/foo.sr and $(ARCH)/foo.nm
28# Usage ref: src/tests/sptest/sp1/Makefile
29
30#+--------------------------------------------------------------------------+
[96d56b3]31#| Set the value of RELOCADDR to the address where you want your image to
32#| load. If you'll be using GRUB to load the images it will have to be >=
33#| 0x100000 (1024K). If you are using NetBoot to load the images it can be
34#| >= 0x10000 (64K) AND <= 0x97C00 (607K) OR >= 0x100000 (1024K). The memory
35#| top is of course another limit. Make sure there is enough space before the
36#| upper memory limits for the image and the memory allocated by it to fit.
37#| Make sure the value you choose is aligned to 4 bytes.
[bffb938]38#+--------------------------------------------------------------------------+
[96d56b3]39  RELOCADDR=0x00100000
40
[d6f28200]41START16FILE=$(PROJECT_RELEASE)/lib/start16$(LIB_VARIANT).bin
[2d7d605]42START16ADDR=0x00097C00
[0e3c0096]43HEADERADDR=0x00097E00
[bffb938]44
45# The following are definitions of make-exe which will work using ld as
[d2d3482]46# is currently required.
[bffb938]47
48define make-exe
[df49c60]49        $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -Wl,-Ttext,$(RELOCADDR) \
[c6eba79]50            -o $(basename $@).nxe \
[98100d2]51            $(LINK_OBJS) $(LINK_LIBS)
[9e7d42dd]52        $(OBJCOPY) -O elf32-i386 \
[5f92a6a3]53            --remove-section=.rodata \
54            --remove-section=.comment \
55            --remove-section=.note \
[c6eba79]56            --strip-unneeded $(basename $@).nxe $@
57        $(OBJCOPY) -O binary $(basename $@).nxe $(basename $@).bin
[96d56b3]58        $(PROJECT_TOOLS)/bin2boot -v $(basename $@).bt $(HEADERADDR)\
59          $(START16FILE) $(START16ADDR) 0 $(basename $@).bin $(RELOCADDR) 0
[c6eba79]60        $(NM) -g -n $(basename $@).nxe > $(basename $@).num
61        $(SIZE) $(basename $@).nxe
[511374e4]62#       test -d ${PROJECT_RELEASE}/BootImgs \
63#         || mkdir ${PROJECT_RELEASE}/BootImgs
64#       f=`basename $@ .exe`; \
65#        cp $(basename $@).bt \
66#           ${PROJECT_RELEASE}/BootImgs/$${f}$(LIB_VARIANT).bt \
67#       && chmod 755 \
68#         ${PROJECT_RELEASE}/BootImgs/$${f}$(LIB_VARIANT).bt
69#       $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -Wl,-Ttext,$(RELOCADDR) \
70#           -o $@ $(LINK_OBJS) $(LINK_LIBS)
[bffb938]71endef
[9e7d42dd]72define make-cxx-exe
[df49c60]73        $(LINK.cc) $(AM_CFLAGS) $(AM_CXXFLAGS) $(AM_LDFLAGS) \
[c6eba79]74           -Wl,-Ttext,$(RELOCADDR) -o $(basename $@).nxe \
[9e7d42dd]75            $(LINK_OBJS) $(LINK_LIBS)
76        $(OBJCOPY) -O elf32-i386 \
77            --remove-section=.rodata \
78            --remove-section=.comment \
79            --remove-section=.note \
[c6eba79]80            --strip-unneeded $(basename $@).nxe $@
81        $(OBJCOPY) -O binary $(basename $@).nxe $(basename $@).bin
[9e7d42dd]82        $(PROJECT_TOOLS)/bin2boot -v $(basename $@).bt $(HEADERADDR)\
83          $(START16FILE) $(START16ADDR) 0 $(basename $@).bin $(RELOCADDR) 0
[c6eba79]84        $(NM) -g -n $(basename $@).nxe > $(basename $@).num
85        $(SIZE) $(basename $@).nxe
[9e7d42dd]86endef
[bffb938]87
88# Miscellaneous additions go here
[011677f]89
90# BSP-specific tools
91BIN2BOOT=$(PROJECT_TOOLS)/bin2boot
Note: See TracBrowser for help on using the repository browser.