mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 23:42:43 +00:00
ar71xx: add relocation loader
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
This commit is contained in:
parent
fce0b5d893
commit
0d1fb72241
@ -78,6 +78,15 @@ define Build/loader-okli
|
||||
mv "$@.new" "$@"
|
||||
endef
|
||||
|
||||
define Build/relocate-kernel
|
||||
( \
|
||||
dd if=$(KDIR)/relocate.bin bs=32 conv=sync && \
|
||||
perl -e '@s = stat("$@"); print pack("N", @s[7])' && \
|
||||
cat "$@" \
|
||||
) > "$@.new"
|
||||
mv "$@.new" "$@"
|
||||
endef
|
||||
|
||||
define Build/copy-file
|
||||
cat "$(1)" > "$@"
|
||||
endef
|
||||
|
@ -1103,6 +1103,12 @@ ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
|
||||
$(call Image/BuildLoader,generic,elf,,,-initramfs)
|
||||
endif
|
||||
$(call Image/BuildLoader,generic,elf)
|
||||
|
||||
# Note: not only used for legacy images
|
||||
rm -rf $(KDIR)/relocate
|
||||
$(CP) ../../generic/image/relocate $(KDIR)
|
||||
$(MAKE) -C $(KDIR)/relocate KERNEL_ADDR=$(KERNEL_LOADADDR) CROSS_COMPILE=$(TARGET_CROSS)
|
||||
$(CP) $(KDIR)/relocate/loader.bin $(KDIR)/relocate.bin
|
||||
endef
|
||||
|
||||
define Image/Prepare/Profile
|
||||
|
Loading…
Reference in New Issue
Block a user