From 4c385148ac4a2f4959ec39841c20eaeb42ace668 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Wed, 30 Nov 2005 00:05:40 +0000 Subject: Self-extracting loader: Cleaner method for inclusion of the UCL-compressed image. The input image is now checked for correctness and converted to C source. The Makefile still needs fixing... git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8109 a1c6a512-1295-4272-9138-f99709370657 --- firmware/decompressor/Makefile | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'firmware/decompressor/Makefile') diff --git a/firmware/decompressor/Makefile b/firmware/decompressor/Makefile index 29a78523ea..4136eafdb7 100644 --- a/firmware/decompressor/Makefile +++ b/firmware/decompressor/Makefile @@ -18,13 +18,14 @@ OBJDIR := . # FIXME: get proper value from build system MEMORYSIZE = 2 - LDS := link.lds LINKFILE = $(OBJDIR)/linkage.lds -OBJS := $(OBJDIR)/decompressor.o $(OBJDIR)/rockboxucl.o $(OBJDIR)/startup.o +OBJS := $(OBJDIR)/decompressor.o $(OBJDIR)/uclimage.o $(OBJDIR)/startup.o CFLAGS = -O -W -Wall -m1 -nostdlib -ffreestanding -Wstrict-prototypes -fomit-frame-pointer -fschedule-insns +all: $(OBJDIR)/compressed.bin + $(OBJDIR)/compressed.bin : $(OBJDIR)/compressed.elf @echo "OBJCOPY "`basename $@` @$(OC) -O binary $< $@ @@ -37,6 +38,12 @@ $(LINKFILE): $(LDS) @echo "Build LDS file" @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@ -$(OBJDIR)/rockboxucl.o: $(OBJDIR)/rockbox.ucl - @echo "OBJCOPY rockbox.ucl" - @$(OC) -I binary -O elf32-sh -B sh --rename-section .data=.image,alloc,load,data,contents $< $@ +$(OBJDIR)/decompressor.o : $(OBJDIR)/uclimage.h + +$(OBJDIR)/uclimage.c : $(OBJDIR)/rockbox.ucl $(TOOLSDIR)/ucl2src.pl + @echo "UCL2SRC" + @perl -s $(TOOLSDIR)/ucl2src.pl -p=uclimage $< $@ + +$(OBJDIR)/uclimage.h : $(OBJDIR)/rockbox.ucl $(TOOLSDIR)/ucl2src.pl + @echo "UCL2SRC" + @perl -s $(TOOLSDIR)/ucl2src.pl -p=uclimage $< $@ -- cgit v1.2.3