Update from Pedro Romano <pmcnr@camoes.rnl.ist.utl.pt>.

This commit is contained in:
Joel Sherrill
1998-04-27 18:42:04 +00:00
parent 0c508af979
commit 96d56b3690
12 changed files with 312 additions and 844 deletions

View File

@@ -42,7 +42,7 @@ HAS_KA9Q=no
define make-target-options
@echo "/* #define NDEBUG 1 */ " >>$@
@echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
@echo "/* #define RTEMS_TEST_NO_PAUSE 1 */" >>$@
@echo "/* #define RTEMS_DEBUG 1 */" >>$@
endef
@@ -51,13 +51,19 @@ endef
# Usage ref: src/tests/sptest/sp1/Makefile
#+--------------------------------------------------------------------------+
#| Relocation address. Set this to the linear address where you want your code
#| to start. It should abide to the following constraints:
#| RELOCADDR >= 0x10200
#| RELOCADDR + 'image file size' < 0xA0000
#| RELOCADDR % 4 = 0 (i.e. aligned on a 4 byte boundary)
#| 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=0x00020200
RELOCADDR=0x00100000
START16FILE=$(PROJECT_RELEASE)/lib/start16.bin
START16ADDR=0x00097C00
HEADERADDR=0x00097E00
# The following are definitions of make-exe which will work using ld as
# is currently required. It is expected that as of gcc 2.8, the end user
@@ -66,20 +72,28 @@ RELOCADDR=0x00020200
ifeq ($(RTEMS_USE_GCC272),yes)
define make-exe
$(LD) -N -T $(LINKCMDS) -Ttext $(RELOCADDR) -e start -nostdlib \
-o $(basename $@).elf \
-o $(basename $@).obj \
$(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
$(OBJCOPY) -O binary --set-start $(RELOCADDR) $(basename $@).elf $@
$(PROJECT_TOOLS)/bin2boot -v $@ $(basename $@).bin -s $(RELOCADDR)
$(NM) -g -n $(basename $@).elf > $(basename $@).num
$(SIZE) $(basename $@).elf
$(OBJCOPY) -O a.out-i386 --remove-section=.rodata --strip-unneeded \
$(basename $@).obj $@
$(OBJCOPY) -O binary $(basename $@).obj $(basename $@).bin
$(PROJECT_TOOLS)/bin2boot -v $(basename $@).bin $(HEADERADDR)\
$(START16FILE) $(START16ADDR) 0 $(basename $@).bin $(RELOCADDR) 0
$(NM) -g -n $(basename $@).obj > $(basename $@).num
$(SIZE) $(basename $@).obj
$(INSTALL_VARIANT) -m 555 $(basename $@).bt ${PROJECT_RELEASE}/BootImgs
endef
else
define make-exe
$(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).elf $(LINK_OBJS)
$(OBJCOPY) -O binary --set-start $(RELOCADDR) $(basename $@).elf $@
$(PROJECT_TOOLS)/bin2boot -v $@ $(basename $@).bin -s $(RELOCADDR)
$(NM) -g -n $(basename $@).elf > $(basename $@).num
$(SIZE) $(basename $@).elf
$(CC) $(CFLAGS) $(CFLAGS_LD) -Ttext $(RELOCADDR) -o $(basename $@).obj $(LINK_OBJS)
$(OBJCOPY) -O a.out-i386 --remove-section=.rodata --strip-unneeded \
$(basename $@).obj $@
$(OBJCOPY) -O binary $(basename $@).obj $(basename $@).bin
$(PROJECT_TOOLS)/bin2boot -v $(basename $@).bt $(HEADERADDR)\
$(START16FILE) $(START16ADDR) 0 $(basename $@).bin $(RELOCADDR) 0
$(NM) -g -n $(basename $@).obj > $(basename $@).num
$(SIZE) $(basename $@).obj
$(INSTALL_VARIANT) -m 555 $(basename $@).bt ${PROJECT_RELEASE}/BootImgs
endef
endif