ramips: only limit lzma dictionary size on mt7621
[openwrt/openwrt.git] / target / linux / ramips / image / Makefile
index 13934c5b060ea5f949c4581cc2fd33bcb6f4b76f..9cf64361a4b15c319198d88f67fd537b9d6013c6 100644 (file)
@@ -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 && \
@@ -92,11 +108,6 @@ define Build/poray-header
        mv $@.new $@
 endef
 
-define Build/senao-header
-       $(STAGING_DIR_HOST)/bin/mksenaofw $(1) -e $@ -o $@.new
-       mv $@.new $@
-endef
-
 define Build/seama
        $(STAGING_DIR_HOST)/bin/seama -i $@ $(1)
        mv $@.seama $@
@@ -131,6 +142,10 @@ define Build/mkdlinkfw-factory
        mv $@.new $@
 endef
 
+define Build/zyimage
+       $(STAGING_DIR_HOST)/bin/zyimage $(1) $@
+endef
+
 #
 # The real magic happens inside these templates
 #