diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-12-05 21:56:56 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-12-05 21:56:56 +0000 |
commit | e1108ab7e6dd4dcf11676fbf9f3de34b476bf8c7 (patch) | |
tree | 7f9a513e7d226fc3a1e6b0d0042ddab343e38efb /apps | |
parent | 0099061b903a4a1367b7375248013e0635396361 (diff) | |
download | rockbox-e1108ab7e6dd4dcf11676fbf9f3de34b476bf8c7.tar.gz rockbox-e1108ab7e6dd4dcf11676fbf9f3de34b476bf8c7.zip |
Adjusted the decompressor work to build a compressed image for the Archos
targets in case it is too big to fit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8158 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/Makefile | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/apps/Makefile b/apps/Makefile index 4fa225033b..278e1c7118 100644 --- a/apps/Makefile +++ b/apps/Makefile @@ -107,9 +107,23 @@ $(OBJDIR)/rombox.bin : $(OBJDIR)/rombox.elf $(OBJDIR)/rockbox.asm: $(OBJDIR)/rockbox.bin $(TOOLSDIR)/sh2d -sh1 $< > $@ -$(BUILDDIR)/$(BINARY) : $(OBJDIR)/rockbox.bin +# +# If there's a flashfile defined for this target (rockbox.ucl for Archos +# models) Then check if the mkfirmware script fails, as then it is (likely) +# because the image is too big and we need to create a compressed image +# instead. +# +$(BUILDDIR)/$(BINARY) : $(OBJDIR)/rockbox.bin $(FLASHFILE) @echo "Build firmware file" - $(SILENT)$(MKFIRMWARE) $< $@ + $(SILENT)($(MKFIRMWARE) $< $@; \ + stat=$$?; \ + if test -n "$(FLASHFILE)"; then \ + if test "$$stat" -ne 0; then \ + echo "Image too big, making a compressed version!"; \ + $(MAKE) -C $(FIRMDIR)/decompressor OBJDIR=$(BUILDDIR)/firmware/decompressor; \ + $(MKFIRMWARE) $(BUILDDIR)/firmware/decompressor/compressed.bin $@; \ + fi \ + fi ) else # this is a simulator build |