source: rtems/make/custom/pc386.cfg @ 2d7d605

4.104.114.84.95
Last change on this file since 2d7d605 was 2d7d605, checked in by Joel Sherrill <joel.sherrill@…>, on 08/19/98 at 14:41:23

Patch from Aleksey <qqi@…>:

It fixes netboot build problem, KA9Q configuration
for pc386, some compiler wardning, it also removed some stuff
ifdef'ed with '#if 0'.

  • Property mode set to 100644
File size: 3.8 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
10RTEMS_CPU_MODEL=i386_fp
11
12# This is the actual bsp directory used during the build process.
13RTEMS_BSP_FAMILY=pc386
14
15#  This contains the compiler options necessary to select the CPU model
16#  and (hopefully) optimize for it.
17#
18CPU_CFLAGS =
19
20# optimize flag: typically -0, could use -O4 or -fast
21# -O4 is ok for RTEMS
22CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
23
24# Define this to yes if this target supports multiprocessor environments.
25HAS_MP=no
26
27#  This section makes the target dependent options file.
28
29#  NDEBUG (C library)
30#     if defined asserts do not generate code.  This is commonly used
31#     as a command line option.
32#
33#  RTEMS_TEST_NO_PAUSE (RTEMS tests)
34#     do not pause between screens of output in the rtems tests
35#
36#  RTEMS_DEBUG (RTEMS)
37#     If defined, debug checks in RTEMS and support library code are enabled.
38
39define make-target-options
40        @echo "/* #define NDEBUG 1 */ "                     >>$@
41        @echo "/* #define RTEMS_TEST_NO_PAUSE 1 */"         >>$@
42        @echo "/* #define RTEMS_DEBUG  1 */"                >>$@
43endef
44
45# Here is the rule to actually build a $(ARCH)/foo.exe
46# It also builds $(ARCH)/foo.sr and $(ARCH)/foo.nm
47# Usage ref: src/tests/sptest/sp1/Makefile
48
49#+--------------------------------------------------------------------------+
50#| Set the value of RELOCADDR to the address where you want your image to
51#| load. If you'll be using GRUB to load the images it will have to be >=
52#| 0x100000 (1024K). If you are using NetBoot to load the images it can be
53#| >= 0x10000 (64K) AND <= 0x97C00 (607K) OR >= 0x100000 (1024K). The memory
54#| top is of course another limit. Make sure there is enough space before the
55#| upper memory limits for the image and the memory allocated by it to fit.
56#| Make sure the value you choose is aligned to 4 bytes.
57#+--------------------------------------------------------------------------+
58  RELOCADDR=0x00100000
59
60START16FILE=$(PROJECT_RELEASE)/lib/start16.bin
61START16ADDR=0x00097C00
62HEADERADDR=0x00097E00
63
64# The following are definitions of make-exe which will work using ld as
65# is currently required.  It is expected that as of gcc 2.8, the end user
66# will be able to override parts of the compilers specs and link using gcc.
67
68ifeq ($(RTEMS_USE_GCC272),yes)
69define make-exe
70        $(LD) -N -T $(LINKCMDS) -Ttext $(RELOCADDR) -e start -nostdlib \
71           -o $(basename $@).obj \
72           $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
73        $(OBJCOPY) -O a.out-i386 \
74            --remove-section=.rodata \
75            --remove-section=.comment \
76            --remove-section=.note \
77            --strip-unneeded $(basename $@).obj $@
78        $(OBJCOPY) -O binary $(basename $@).obj $(basename $@).bin
79        $(PROJECT_TOOLS)/bin2boot -v $(basename $@).bt $(HEADERADDR)\
80          $(START16FILE) $(START16ADDR) 0 $(basename $@).bin $(RELOCADDR) 0
81        $(NM) -g -n $(basename $@).obj > $(basename $@).num
82        $(SIZE) $(basename $@).obj
83        $(INSTALL_VARIANT) -m 555 $(basename $@).bt ${PROJECT_RELEASE}/BootImgs
84endef
85else
86define make-exe
87        $(CC) $(CFLAGS) $(CFLAGS_LD) -Wl,-Ttext,$(RELOCADDR) \
88            -Wl,--oformat,elf32-i386 -o $(basename $@).obj \
89            -o $(basename $@).obj \
90            $(LINK_OBJS) $(LINK_LIBS)
91        $(OBJCOPY) -O a.out-i386 \
92            --remove-section=.rodata \
93            --remove-section=.comment \
94            --remove-section=.note \
95            --strip-unneeded $(basename $@).obj $@
96        $(OBJCOPY) -O binary $(basename $@).obj $(basename $@).bin
97        $(PROJECT_TOOLS)/bin2boot -v $(basename $@).bt $(HEADERADDR)\
98          $(START16FILE) $(START16ADDR) 0 $(basename $@).bin $(RELOCADDR) 0
99        $(NM) -g -n $(basename $@).obj > $(basename $@).num
100        $(SIZE) $(basename $@).obj
101        $(INSTALL_VARIANT) -m 555 $(basename $@).bt ${PROJECT_RELEASE}/BootImgs
102        $(CC) $(CFLAGS) $(CFLAGS_LD) -Wl,-Ttext,$(RELOCADDR) \
103            -o $(basename $@).coff $(LINK_OBJS) $(LINK_LIBS)
104endef
105endif
106
107# Miscellaneous additions go here
Note: See TracBrowser for help on using the repository browser.