source: rtems/make/custom/pc386.cfg @ 5d18fb0

4.104.114.84.95
Last change on this file since 5d18fb0 was 5d18fb0, checked in by Joel Sherrill <joel.sherrill@…>, on 06/27/98 at 18:51:49

PC386 BSP enhancements from Aleksey Romanov (Quality Quorum
<qqi@…>). Unfortunately after merging these,
the pc386 will not boot using grub for for. It still does not
work using netboot for me. Here is his summary of changes:

rtems/c/src/lib/libbsp/i386/pc386/Makefile.in

Added support for new sub-directory

rtems/c/src/lib/libbsp/i386/pc386/bsp_specs

Made possible to build COFF image

rtems/c/src/lib/libbsp/i386/pc386/console/console.c

Added support for serial consoles, selectable by patching
binary image, added assert(), use _IBMPC_inch_sleep()
instaed of _IMBPC_inch()

rtems/c/src/lib/libbsp/i386/pc386/console/inch.c

Added _IMBPC_inch_sleep()

rtems/c/src/lib/libbsp/i386/pc386/console/outch.c

Oops - just formatting

rtems/c/src/lib/libbsp/i386/pc386/include/Makefile.in

Added support for new files

rtems/c/src/lib/libbsp/i386/pc386/include/bsp.h

Added support for new features

rtems/c/src/lib/libbsp/i386/pc386/include/pc386uart.h

New file: definitions for serial ports

rtems/c/src/lib/libbsp/i386/pc386/include/pcibios.h

New file: definitions for PCI BIOS

rtems/c/src/lib/libbsp/i386/pc386/pc386dev/Makefile.in

New file: makefile in new directory

rtems/c/src/lib/libbsp/i386/pc386/pc386dev/i386-stub-glue.c

New file: i386-stub interface

rtems/c/src/lib/libbsp/i386/pc386/pc386dev/i386-stub.c

New file: i386-stub itself

rtems/c/src/lib/libbsp/i386/pc386/pc386dev/pc386uart.c

New file: serial ports

rtems/c/src/lib/libbsp/i386/pc386/pc386dev/pcibios.c

New file: PCI BIOS support

rtems/c/src/lib/libbsp/i386/pc386/start/start.s

Commented out DEBUG_EARLY stuff, everything is working fine

rtems/c/src/lib/libbsp/i386/pc386/start/start16.s

Cleaned up

rtems/c/src/lib/libbsp/i386/pc386/startup/bspstart.c

Added call to console_resereve_resources

rtems/c/src/lib/libbsp/i386/pc386/startup/exit.c

Added support for serial console

rtems/c/src/lib/libbsp/i386/pc386/startup/ldsegs.s

Fixed typo in comments

rtems/c/src/lib/libbsp/i386/pc386/tools/Makefile.in

Changed to reflect cnages in code

rtems/c/src/lib/libbsp/i386/pc386/tools/bin2boot.c

Trivialized, problem - I do not know how to make patch
remove obsolete files - there are a lot of them there

rtems/c/src/lib/libbsp/i386/pc386/tools/binpatch.c

New file: utility to do binary patches

rtems/c/src/lib/libbsp/i386/pc386/wrapup/Makefile.in

Added support for new directory

rtems/make/custom/pc386.cfg

Add COFF image building

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