mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-02-28 21:37:56 +02:00
Generate a binary lzma-loader
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10661 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
299b1b9a54
commit
878684ff47
@ -33,11 +33,15 @@ $(PKG_BUILD_DIR)/vmlinux.lzma: $(KDIR)/vmlinux.lzma
|
|||||||
$(KDIR)/loader$(LOADER_TYPE).elf: $(PKG_BUILD_DIR)/lzma.elf
|
$(KDIR)/loader$(LOADER_TYPE).elf: $(PKG_BUILD_DIR)/lzma.elf
|
||||||
$(CP) $< $@
|
$(CP) $< $@
|
||||||
|
|
||||||
|
$(KDIR)/loader$(LOADER_TYPE).bin: $(PKG_BUILD_DIR)/lzma.bin
|
||||||
|
$(CP) $< $@
|
||||||
|
|
||||||
download:
|
download:
|
||||||
prepare: $(PKG_BUILD_DIR)/.prepared
|
prepare: $(PKG_BUILD_DIR)/.prepared
|
||||||
compile: $(KDIR)/loader$(LOADER_TYPE).elf
|
compile: $(KDIR)/loader$(LOADER_TYPE).elf $(KDIR)/loader$(LOADER_TYPE).bin
|
||||||
install:
|
install:
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(PKG_BUILD_DIR)
|
rm -rf $(PKG_BUILD_DIR)
|
||||||
rm -f $(KDIR)/loader.elf
|
rm -f $(KDIR)/loader.elf
|
||||||
|
rm -f $(KDIR)/loader.bin
|
||||||
|
@ -36,7 +36,7 @@ O_FORMAT = $(shell $(OBJDUMP) -i | head -2 | grep elf32)
|
|||||||
drop-sections = .reginfo .mdebug .comment
|
drop-sections = .reginfo .mdebug .comment
|
||||||
strip-flags = $(addprefix --remove-section=,$(drop-sections))
|
strip-flags = $(addprefix --remove-section=,$(drop-sections))
|
||||||
|
|
||||||
all : lzma.elf
|
all : lzma.elf lzma.bin
|
||||||
|
|
||||||
lzma.lds: lzma.lds.in
|
lzma.lds: lzma.lds.in
|
||||||
sed -e 's,@LOADADDR@,$(LOADADDR),g' -e 's,@ENTRY@,_start,g' $< >$@
|
sed -e 's,@LOADADDR@,$(LOADADDR),g' -e 's,@ENTRY@,_start,g' $< >$@
|
||||||
@ -44,6 +44,9 @@ lzma.lds: lzma.lds.in
|
|||||||
kernel.o: vmlinux.lzma lzma.lds
|
kernel.o: vmlinux.lzma lzma.lds
|
||||||
$(LD) -r -b binary --oformat $(O_FORMAT) -o $@ $<
|
$(LD) -r -b binary --oformat $(O_FORMAT) -o $@ $<
|
||||||
|
|
||||||
|
lzma.bin: lzma.elf
|
||||||
|
$(OBJCOPY) $< $@
|
||||||
|
|
||||||
ifeq ($(IMAGE_COPY),1)
|
ifeq ($(IMAGE_COPY),1)
|
||||||
LOADER_ENTRY ?= $(KERNEL_ENTRY)
|
LOADER_ENTRY ?= $(KERNEL_ENTRY)
|
||||||
lzma.o: decompress.o LzmaDecode.o kernel.o
|
lzma.o: decompress.o LzmaDecode.o kernel.o
|
||||||
@ -62,4 +65,4 @@ lzma.elf: start.o decompress.o LzmaDecode.o kernel.o
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o lzma.elf *.tmp *.lds
|
rm -f *.o lzma.elf lzma.bin *.tmp *.lds
|
||||||
|
Loading…
x
Reference in New Issue
Block a user