From adb85dd473af5c9a72e9da9b7fe013d1b216abc3 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Sat, 21 Apr 2018 10:22:08 +0200 Subject: 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. --- bsps/i386/pc386/config/pc386.cfg | 58 ++++++++++++++++++++++++++++++++++++ bsps/i386/pc386/config/pc486.cfg | 10 +++++++ bsps/i386/pc386/config/pc586-sse.cfg | 9 ++++++ bsps/i386/pc386/config/pc586.cfg | 10 +++++++ bsps/i386/pc386/config/pc686.cfg | 10 +++++++ bsps/i386/pc386/config/pcp4.cfg | 17 +++++++++++ 6 files changed, 114 insertions(+) create mode 100644 bsps/i386/pc386/config/pc386.cfg create mode 100644 bsps/i386/pc386/config/pc486.cfg create mode 100644 bsps/i386/pc386/config/pc586-sse.cfg create mode 100644 bsps/i386/pc386/config/pc586.cfg create mode 100644 bsps/i386/pc386/config/pc686.cfg create mode 100644 bsps/i386/pc386/config/pcp4.cfg (limited to 'bsps/i386') diff --git a/bsps/i386/pc386/config/pc386.cfg b/bsps/i386/pc386/config/pc386.cfg new file mode 100644 index 0000000000..dd7f554cbc --- /dev/null +++ b/bsps/i386/pc386/config/pc386.cfg @@ -0,0 +1,58 @@ +# +# Config file for the PC 386 BSP +# + +include $(RTEMS_ROOT)/make/custom/default.cfg + +RTEMS_CPU=i386 + +# This contains the compiler options necessary to select the CPU model +# and (hopefully) optimize for it. +# +# NOTE: CPU_CFLAGS is set by pc386 variants. +ifeq ($(CPU_CFLAGS),) + CPU_CFLAGS = -mtune=i386 +endif + +# optimize flag: typically -O2 +CFLAGS_OPTIMIZE_V = -O2 -g +# Per function sections disabled per https://devel.rtems.org/ticket/2638 +CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections + +LDFLAGS = -Wl,--gc-sections + +# Here is the rule to actually build a $(ARCH)/foo$(EXEEXT) +# It also builds $(ARCH)/foo.sr and $(ARCH)/foo.nm +# Usage ref: src/tests/sptest/sp1/Makefile + +#+--------------------------------------------------------------------------+ +#| Set the value of RELOCADDR to the address where you want your image to +#| load. If you'll be using GRUB to load the images it will have to be >= +#| 0x100000 (1024K). If you are using NetBoot to load the images it can be +#| >= 0x10000 (64K) AND <= 0x97C00 (607K) OR >= 0x100000 (1024K). The memory +#| top is of course another limit. Make sure there is enough space before the +#| upper memory limits for the image and the memory allocated by it to fit. +#| Make sure the value you choose is aligned to 4 bytes. +#+--------------------------------------------------------------------------+ + RELOCADDR=0x00100000 + +START16FILE=$(PROJECT_RELEASE)/lib/start16$(LIB_VARIANT).bin +START16ADDR=0x00097C00 +HEADERADDR=0x00097E00 + +LDFLAGS += -Wl,-Ttext,$(RELOCADDR) + +define bsp-post-link + $(default-bsp-post-link) + $(OBJCOPY) -O elf32-i386 \ + --remove-section=.comment \ + --remove-section=.note \ + --strip-unneeded $(basename $@)$(EXEEXT) $(basename $@).nxe + $(OBJCOPY) -O binary $(basename $@).nxe $(basename $@).bin + $(PROJECT_TOOLS)/bin2boot -v $(basename $@)$(DOWNEXT) $(HEADERADDR)\ + $(START16FILE) $(START16ADDR) 0 $(basename $@).bin $(RELOCADDR) 0 + rm -f $(basename $@).nxe +endef + +# BSP-specific tools +BIN2BOOT=$(PROJECT_TOOLS)/bin2boot diff --git a/bsps/i386/pc386/config/pc486.cfg b/bsps/i386/pc386/config/pc486.cfg new file mode 100644 index 0000000000..baab16dc32 --- /dev/null +++ b/bsps/i386/pc386/config/pc486.cfg @@ -0,0 +1,10 @@ +# +# Configuration file for a PC using an i486DX Class CPU +# + +# This contains the compiler options necessary to select the CPU model +# and (hopefully) optimize for it. +CPU_CFLAGS = -mtune=i486 + +include $(RTEMS_ROOT)/make/custom/pc386.cfg + diff --git a/bsps/i386/pc386/config/pc586-sse.cfg b/bsps/i386/pc386/config/pc586-sse.cfg new file mode 100644 index 0000000000..764c40c44e --- /dev/null +++ b/bsps/i386/pc386/config/pc586-sse.cfg @@ -0,0 +1,9 @@ +# +# Configuration file for a PC using a Pentium Class CPU +# + +# This configuration is useful for SMP testing on Qemu +CPU_CFLAGS = -mtune=pentium -march=pentium -msse2 + +include $(RTEMS_ROOT)/make/custom/pc386.cfg + diff --git a/bsps/i386/pc386/config/pc586.cfg b/bsps/i386/pc386/config/pc586.cfg new file mode 100644 index 0000000000..35733a3cde --- /dev/null +++ b/bsps/i386/pc386/config/pc586.cfg @@ -0,0 +1,10 @@ +# +# Configuration file for a PC using a Pentium Class CPU +# + +# This contains the compiler options necessary to select the CPU model +# and (hopefully) optimize for it. +CPU_CFLAGS = -mtune=pentium -march=pentium + +include $(RTEMS_ROOT)/make/custom/pc386.cfg + diff --git a/bsps/i386/pc386/config/pc686.cfg b/bsps/i386/pc386/config/pc686.cfg new file mode 100644 index 0000000000..fc63cde789 --- /dev/null +++ b/bsps/i386/pc386/config/pc686.cfg @@ -0,0 +1,10 @@ +# +# Configuration file for a PC using a PentiumPro Class CPU +# + +# This contains the compiler options necessary to select the CPU model +# and (hopefully) optimize for it. +CPU_CFLAGS = -mtune=pentiumpro -march=pentium + +include $(RTEMS_ROOT)/make/custom/pc386.cfg + diff --git a/bsps/i386/pc386/config/pcp4.cfg b/bsps/i386/pc386/config/pcp4.cfg new file mode 100644 index 0000000000..75ec7d4666 --- /dev/null +++ b/bsps/i386/pc386/config/pcp4.cfg @@ -0,0 +1,17 @@ +# +# Configuration file for a PC using a Pentium Class CPU +# + +# Note: We give the -mtune=pentium option here only so that at least the +# variant optimized for pentium (w/o using any pentium-specific +# features) is used (assuming you use the vanilla RTEMS multilibs). +# +# And: The only sse-related feature the RTEMS support really needs is +# fxsave/fxrstor. You can build with -msse, -msse2 or -msse3, +# depending on your CPU. +# There are run-time checks resulting in a 'panic' if code +# compiled for e.g. -msse3 is executed on a CPU that only +# supports sse2, though. +CPU_CFLAGS = -mtune=pentium4 -march=pentium4 -msse3 + +include $(RTEMS_ROOT)/make/custom/pc386.cfg -- cgit v1.2.3