1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Daniel Stenberg 2005-12-05 21:56:56 +00:00
parent 0099061b90
commit e1108ab7e6
2 changed files with 41 additions and 24 deletions

View file

@ -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