source: rtems/make/custom/pc386.cfg @ 7d04202

4.104.115
Last change on this file since 7d04202 was 1b5e552, checked in by Joel Sherrill <joel.sherrill@…>, on 11/20/08 at 15:26:37

2008-11-20 Daron Chabot <daronchabot@…>

PR 1337/bsps

  • custom/pc386.cfg: Stripping .rodata section produces unusable executables for the i386-rtems target.
  • 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=.comment \
53            --remove-section=.note \
54            --strip-unneeded $(basename $@).exe $(basename $@).nxe
55        $(OBJCOPY) -O binary $(basename $@).nxe $(basename $@).bin
56        $(PROJECT_TOOLS)/bin2boot -v $(basename $@)$(DOWNEXT) $(HEADERADDR)\
57          $(START16FILE) $(START16ADDR) 0 $(basename $@).bin $(RELOCADDR) 0
58        rm -f $(basename $@).nxe
59endef
60
61# BSP-specific tools
62BIN2BOOT=$(PROJECT_TOOLS)/bin2boot
Note: See TracBrowser for help on using the repository browser.