forked from Imagelibrary/rtems
@@ -20,11 +20,6 @@ CFLAGS_OPTIMIZE_V = -O2 -g
|
||||
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 >=
|
||||
@@ -36,23 +31,4 @@ LDFLAGS = -Wl,--gc-sections
|
||||
#+--------------------------------------------------------------------------+
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user