$(KDIR)/loader$(LOADER_TYPE).elf: $(PKG_BUILD_DIR)/lzma.elf
$(CP) $< $@
+$(KDIR)/loader$(LOADER_TYPE).bin: $(PKG_BUILD_DIR)/lzma.bin
+ $(CP) $< $@
+
download:
prepare: $(PKG_BUILD_DIR)/.prepared
-compile: $(KDIR)/loader$(LOADER_TYPE).elf
+compile: $(KDIR)/loader$(LOADER_TYPE).elf $(KDIR)/loader$(LOADER_TYPE).bin
install:
clean:
rm -rf $(PKG_BUILD_DIR)
rm -f $(KDIR)/loader.elf
+ rm -f $(KDIR)/loader.bin
drop-sections = .reginfo .mdebug .comment
strip-flags = $(addprefix --remove-section=,$(drop-sections))
-all : lzma.elf
+all : lzma.elf lzma.bin
lzma.lds: lzma.lds.in
sed -e 's,@LOADADDR@,$(LOADADDR),g' -e 's,@ENTRY@,_start,g' $< >$@
kernel.o: vmlinux.lzma lzma.lds
$(LD) -r -b binary --oformat $(O_FORMAT) -o $@ $<
+lzma.bin: lzma.elf
+ $(OBJCOPY) $< $@
+
ifeq ($(IMAGE_COPY),1)
LOADER_ENTRY ?= $(KERNEL_ENTRY)
lzma.o: decompress.o LzmaDecode.o kernel.o
endif
clean:
- rm -f *.o lzma.elf *.tmp *.lds
+ rm -f *.o lzma.elf lzma.bin *.tmp *.lds