ramips: merge relocate compile into build recipe
Compile the loader if the relocate-kernel image recipe is used and get rid of the legacy build code to do so. Signed-off-by: Mathias Kresin <dev@kresin.me>
This commit is contained in:
parent
465d57370f
commit
78ca6a5578
2 changed files with 5 additions and 10 deletions
|
@ -74,12 +74,16 @@ define Build/loader-kernel
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/relocate-kernel
|
define Build/relocate-kernel
|
||||||
|
rm -rf $@.relocate
|
||||||
|
$(CP) ../../generic/image/relocate $@.relocate
|
||||||
|
$(MAKE) -C $@.relocate KERNEL_ADDR=$(KERNEL_LOADADDR) CROSS_COMPILE=$(TARGET_CROSS)
|
||||||
( \
|
( \
|
||||||
dd if=$(KDIR)/loader.bin bs=32 conv=sync && \
|
dd if=$@.relocate/loader.bin bs=32 conv=sync && \
|
||||||
perl -e '@s = stat("$@"); print pack("V", @s[7])' && \
|
perl -e '@s = stat("$@"); print pack("V", @s[7])' && \
|
||||||
cat $@ \
|
cat $@ \
|
||||||
) > $@.new
|
) > $@.new
|
||||||
mv $@.new $@
|
mv $@.new $@
|
||||||
|
rm -rf $@.relocate
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define MkCombineduImage
|
define MkCombineduImage
|
||||||
|
|
|
@ -558,12 +558,3 @@ define Device/zbt-wg3526-32M
|
||||||
kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
|
kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
|
||||||
endef
|
endef
|
||||||
TARGET_DEVICES += zbt-wg3526-32M
|
TARGET_DEVICES += zbt-wg3526-32M
|
||||||
|
|
||||||
# FIXME: is this still needed?
|
|
||||||
define Image/Prepare
|
|
||||||
#define Build/Compile
|
|
||||||
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)/loader.bin
|
|
||||||
endef
|
|
||||||
|
|
Loading…
Reference in a new issue