source: rtems/bsps/i386/pc386/config/pc386.cfg @ f004ace8

5
Last change on this file since f004ace8 was adb85dd, checked in by Sebastian Huber <sebastian.huber@…>, on 04/21/18 at 08:22:08

bsps: Move make/custom/* files to bsps

Adjust various build files. Remove automatic generation of the
c/src/lib/libbsp/*/acinclude.m4 files from bootstrap script.

This patch is a part of the BSP source reorganization.

Update #3285.

  • Property mode set to 100644
File size: 2.0 KB
Line 
1#
2#  Config file for the PC 386 BSP
3#
4
5include $(RTEMS_ROOT)/make/custom/default.cfg
6
7RTEMS_CPU=i386
8
9#  This contains the compiler options necessary to select the CPU model
10#  and (hopefully) optimize for it.
11#
12# NOTE: CPU_CFLAGS is set by pc386 variants.
13ifeq ($(CPU_CFLAGS),)
14  CPU_CFLAGS = -mtune=i386
15endif
16
17# optimize flag: typically -O2
18CFLAGS_OPTIMIZE_V = -O2 -g
19# Per function sections disabled per https://devel.rtems.org/ticket/2638
20CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
21 
22LDFLAGS = -Wl,--gc-sections
23
24# Here is the rule to actually build a $(ARCH)/foo$(EXEEXT)
25# It also builds $(ARCH)/foo.sr and $(ARCH)/foo.nm
26# Usage ref: src/tests/sptest/sp1/Makefile
27
28#+--------------------------------------------------------------------------+
29#| Set the value of RELOCADDR to the address where you want your image to
30#| load. If you'll be using GRUB to load the images it will have to be >=
31#| 0x100000 (1024K). If you are using NetBoot to load the images it can be
32#| >= 0x10000 (64K) AND <= 0x97C00 (607K) OR >= 0x100000 (1024K). The memory
33#| top is of course another limit. Make sure there is enough space before the
34#| upper memory limits for the image and the memory allocated by it to fit.
35#| Make sure the value you choose is aligned to 4 bytes.
36#+--------------------------------------------------------------------------+
37  RELOCADDR=0x00100000
38
39START16FILE=$(PROJECT_RELEASE)/lib/start16$(LIB_VARIANT).bin
40START16ADDR=0x00097C00
41HEADERADDR=0x00097E00
42
43LDFLAGS += -Wl,-Ttext,$(RELOCADDR)
44
45define bsp-post-link
46        $(default-bsp-post-link)
47        $(OBJCOPY) -O elf32-i386 \
48            --remove-section=.comment \
49            --remove-section=.note \
50            --strip-unneeded $(basename $@)$(EXEEXT) $(basename $@).nxe
51        $(OBJCOPY) -O binary $(basename $@).nxe $(basename $@).bin
52        $(PROJECT_TOOLS)/bin2boot -v $(basename $@)$(DOWNEXT) $(HEADERADDR)\
53          $(START16FILE) $(START16ADDR) 0 $(basename $@).bin $(RELOCADDR) 0
54        rm -f $(basename $@).nxe
55endef
56
57# BSP-specific tools
58BIN2BOOT=$(PROJECT_TOOLS)/bin2boot
Note: See TracBrowser for help on using the repository browser.