source: rtems/make/custom/pc386.cfg @ 913f3e9

4.104.115
Last change on this file since 913f3e9 was fb2205a, checked in by Joel Sherrill <joel.sherrill@…>, on 09/09/08 at 16:30:27

2008-09-09 Joel Sherrill <joel.sherrill@…>

  • leaf.cfg, compilers/gcc-target-default.cfg, custom/bf537Stamp.cfg, custom/gen5200.cfg, custom/gen83xx.cfg, custom/genmcf548x.cfg, custom/mbx8xx.cfg, custom/mpc55xx.cfg, custom/nds.cfg, custom/pc386.cfg, custom/tqm8xx.cfg: Remove use of AM_LDFLAGS. Ensure LDFLAGS works all the time. Clean up BSPs which defined their own make-exe rules inappropriately.
  • Property mode set to 100644
File size: 2.0 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.
21ifeq ($(CPU_CFLAGS),)
22  CPU_CFLAGS = -mtune=i386
23endif
24
25# optimize flag: typically -O2
26CFLAGS_OPTIMIZE_V = -O2 -g
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
47LDFLAGS += -Wl,-Ttext,$(RELOCADDR)
48
49define bsp-post-link
50        $(default-bsp-post-link)
51        $(OBJCOPY) -O elf32-i386 \
52            --remove-section=.rodata \
53            --remove-section=.comment \
54            --remove-section=.note \
55            --strip-unneeded $(basename $@).exe $(basename $@).nxe
56        $(OBJCOPY) -O binary $(basename $@).nxe $(basename $@).bin
57        $(PROJECT_TOOLS)/bin2boot -v $(basename $@)$(DOWNEXT) $(HEADERADDR)\
58          $(START16FILE) $(START16ADDR) 0 $(basename $@).bin $(RELOCADDR) 0
59        rm -f $(basename $@).nxe
60endef
61
62# BSP-specific tools
63BIN2BOOT=$(PROJECT_TOOLS)/bin2boot
Note: See TracBrowser for help on using the repository browser.