ramips: define lzma loader platform in target
authorChuanhong Guo <gch981213@gmail.com>
Tue, 14 Apr 2020 03:17:47 +0000 (11:17 +0800)
committerChuanhong Guo <gch981213@gmail.com>
Tue, 14 Apr 2020 03:17:47 +0000 (11:17 +0800)
Loader platform is a per-soc variable instead of a per-device one.
Determine corresponding loader platform at the beginning of image
Makefile.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
target/linux/ramips/image/Makefile
target/linux/ramips/image/mt7621.mk

index 29db341e9b8d86447136e0eff72e7db815d7804c..bc5de7d8d009c6ca82f888587e0e1ebd64fd5b88 100644 (file)
@@ -18,7 +18,11 @@ loadaddr-y := 0x80000000
 loadaddr-$(CONFIG_TARGET_ramips_rt288x) := 0x88000000
 loadaddr-$(CONFIG_TARGET_ramips_mt7621) := 0x80001000
 
+ldrplatform-y := ralink
+ldrplatform-$(CONFIG_TARGET_ramips_mt7621) := mt7621
+
 KERNEL_LOADADDR := $(loadaddr-y)
+LOADER_PLATFORM := $(ldrplatform-y)
 
 KERNEL_DTB = kernel-bin | append-dtb | lzma
 define Device/Default
@@ -68,7 +72,7 @@ define Build/loader-common
        $(MAKE) -C lzma-loader \
                PKG_BUILD_DIR="$@.src" \
                TARGET_DIR="$(dir $@)" LOADER_NAME="$(notdir $@)" \
-               BOARD="$(BOARDNAME)" PLATFORM="$(PLATFORM)" \
+               BOARD="$(BOARDNAME)" PLATFORM="$(LOADER_PLATFORM)" \
                LZMA_TEXT_START=0x82000000 LOADADDR=$(KERNEL_LOADADDR) \
                $(1) compile loader.$(LOADER_TYPE)
        mv "$@.$(LOADER_TYPE)" "$@"
index 806286b0bb5cef39334b32c358a976c67f11d3d1..8980ff70d49d94a9f31af7cf693eb97334b9134b 100644 (file)
@@ -504,7 +504,6 @@ define Device/MikroTik
   IMAGE_SIZE := 16128k
   DEVICE_PACKAGES := kmod-usb3
   LOADER_TYPE := elf
-  PLATFORM := mt7621
   KERNEL := $(KERNEL_DTB) | loader-kernel
   IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 | \
        pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | append-metadata | \