aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips
diff options
context:
space:
mode:
authorTobias Schramm <tobleminer@gmail.com>2018-05-03 18:44:27 +0200
committerMathias Kresin <dev@kresin.me>2018-06-21 06:54:42 +0200
commitc0167abcb0ef049db8eba7891e1c47123a2ed8e2 (patch)
tree1b96621a254a30011321ebe7b35f0f6e864b5d3a /target/linux/ramips
parent4fa85a625f33c4602511dc5b2ee406329bf289c2 (diff)
downloadupstream-c0167abcb0ef049db8eba7891e1c47123a2ed8e2.tar.gz
upstream-c0167abcb0ef049db8eba7891e1c47123a2ed8e2.tar.bz2
upstream-c0167abcb0ef049db8eba7891e1c47123a2ed8e2.zip
ramips: Add lzma-loader targets
Signed-off-by: Tobias Schramm <tobleminer@gmail.com>
Diffstat (limited to 'target/linux/ramips')
-rw-r--r--target/linux/ramips/image/Makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
index 13934c5b06..8ab8aa3a6c 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -57,6 +57,22 @@ define Build/trx
-a 4 -f $(IMAGE_ROOTFS)
endef
+define Build/loader-common
+ rm -rf $@.src
+ $(MAKE) -C lzma-loader \
+ PKG_BUILD_DIR="$@.src" \
+ TARGET_DIR="$(dir $@)" LOADER_NAME="$(notdir $@)" \
+ BOARD="$(BOARDNAME)" PLATFORM="$(PLATFORM)" \
+ LZMA_TEXT_START=0x82000000 LOADADDR=$(KERNEL_LOADADDR) \
+ $(1) compile loader.$(LOADER_TYPE)
+ mv "$@.$(LOADER_TYPE)" "$@"
+ rm -rf $@.src
+endef
+
+define Build/loader-kernel
+ $(call Build/loader-common,LOADER_DATA="$@")
+endef
+
define Build/relocate-kernel
( \
dd if=$(KDIR)/loader.bin bs=32 conv=sync && \