mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-24 00:56:14 +02:00
ar71xx/image: relink loader.elf image to LOADADDR
This allows to load the resulting image directly from RouterBOOT. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34271 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
db9d0a7ff5
commit
7a2bd21d5b
@ -68,7 +68,7 @@ ifneq ($(BOARD_DEF),)
|
|||||||
CFLAGS += -DCONFIG_BOARD_$(BOARD_DEF)
|
CFLAGS += -DCONFIG_BOARD_$(BOARD_DEF)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all: loader.bin
|
all: loader.elf
|
||||||
|
|
||||||
# Don't build dependencies, this may die if $(CC) isn't gcc
|
# Don't build dependencies, this may die if $(CC) isn't gcc
|
||||||
dep:
|
dep:
|
||||||
@ -84,16 +84,22 @@ install:
|
|||||||
data.o: $(LOADER_DATA)
|
data.o: $(LOADER_DATA)
|
||||||
$(LD) -r -b binary --oformat $(O_FORMAT) -T lzma-data.lds -o $@ $<
|
$(LD) -r -b binary --oformat $(O_FORMAT) -T lzma-data.lds -o $@ $<
|
||||||
|
|
||||||
loader.bin: loader.elf
|
loader: $(OBJECTS)
|
||||||
|
$(LD) $(LDFLAGS) -o $@ $(OBJECTS)
|
||||||
|
|
||||||
|
loader.bin: loader
|
||||||
$(OBJCOPY) $(BIN_FLAGS) $< $@
|
$(OBJCOPY) $(BIN_FLAGS) $< $@
|
||||||
|
|
||||||
loader.elf: $(OBJECTS)
|
loader2.o: loader.bin
|
||||||
$(LD) $(LDFLAGS) -o $@ $(OBJECTS)
|
$(LD) -r -b binary --oformat $(O_FORMAT) -o $@ $<
|
||||||
|
|
||||||
|
loader.elf: loader2.o
|
||||||
|
$(LD) -e startup -T loader2.lds -Ttext $(LOADADDR) -o $@ $<
|
||||||
|
|
||||||
mrproper: clean
|
mrproper: clean
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.elf *.bin *.o
|
rm -f loader *.elf *.bin *.o
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
10
target/linux/ar71xx/image/lzma-loader/src/loader2.lds
Normal file
10
target/linux/ar71xx/image/lzma-loader/src/loader2.lds
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
OUTPUT_ARCH(mips)
|
||||||
|
SECTIONS {
|
||||||
|
.text : {
|
||||||
|
startup = .;
|
||||||
|
*(.text)
|
||||||
|
*(.text.*)
|
||||||
|
*(.data)
|
||||||
|
*(.data.*)
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user