summaryrefslogtreecommitdiffstats
path: root/bootloader
diff options
context:
space:
mode:
authorMarcin Bukat <marcin.bukat@gmail.com>2012-02-22 09:01:09 +0100
committerMarcin Bukat <marcin.bukat@gmail.com>2012-02-22 09:01:09 +0100
commit164cb21fe5964a8bc3a78f9acbccea0ab7295ccf (patch)
treed774dfd07b79663b33c3c7eeffd10c531dcaee64 /bootloader
parentb4eab599513324dcaffa4c5693345ae11f3f9725 (diff)
downloadrockbox-164cb21fe5964a8bc3a78f9acbccea0ab7295ccf.tar.gz
rockbox-164cb21fe5964a8bc3a78f9acbccea0ab7295ccf.tar.bz2
rockbox-164cb21fe5964a8bc3a78f9acbccea0ab7295ccf.zip
unwarminder: fix bootloader builds
Change-Id: I045a4c9639ff17c96b514996574d41f586b5bd7c
Diffstat (limited to 'bootloader')
-rw-r--r--bootloader/bootloader.make14
1 files changed, 10 insertions, 4 deletions
diff --git a/bootloader/bootloader.make b/bootloader/bootloader.make
index 78b8b438c4..f57fac0e42 100644
--- a/bootloader/bootloader.make
+++ b/bootloader/bootloader.make
@@ -18,15 +18,21 @@ CLEANOBJS += $(BUILDDIR)/bootloader.*
.SECONDEXPANSION:
+ifeq (arm,$(ARCH))
+ UNWARMINDER_LINK := -lunwarminder -L$(BUILDDIR)/lib
+else
+ UNWARMINDER_LINK :=
+endif
+
$(BOOTLINK): $(BOOTLDS) $(CONFIGFILE)
$(call PRINTS,PP $(@F))
$(call preprocess2file,$<,$@,-DLOADADDRESS=$(LOADADDRESS))
-$(BUILDDIR)/bootloader.elf: $$(OBJ) $$(FIRMLIB) $$(BOOTLINK)
+$(BUILDDIR)/bootloader.elf: $$(OBJ) $$(FIRMLIB) $$(UNWARMINDER) $$(BOOTLINK)
$(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJ) \
- $(FIRMLIB) -lgcc -L$(BUILDDIR)/firmware -T$(BOOTLINK) \
- $(GLOBAL_LDOPTS) \
- -Wl,--gc-sections -Wl,-Map,$(BUILDDIR)/bootloader.map
+ $(FIRMLIB) $(UNWARMINDER_LINK) -lgcc -L$(BUILDDIR)/firmware \
+ -T$(BOOTLINK) $(GLOBAL_LDOPTS) \
+ -Wl,--gc-sections -Wl,-Map,$(BUILDDIR)/bootloader.map
$(BUILDDIR)/bootloader.bin : $(BUILDDIR)/bootloader.elf
$(call PRINTS,OBJCOPY $(@F))$(OC) $(if $(filter yes, $(USE_ELF)), -S -x, -O binary) $< $@