mediatek: fix image building
authorJohn Crispin <john@phrozen.org>
Mon, 4 May 2020 14:28:11 +0000 (16:28 +0200)
committerJohn Crispin <john@phrozen.org>
Mon, 4 May 2020 14:28:46 +0000 (16:28 +0200)
Signed-off-by: John Crispin <john@phrozen.org>
target/linux/mediatek/image/Makefile
target/linux/mediatek/image/mt7622.mk
target/linux/mediatek/image/mt7623.mk
target/linux/mediatek/image/mt7629.mk

index ddf4e435c71e82e24ff70d1db17117f2e82c1032..385277fd3dec26aa2c50eebf3e51788f56ee3950 100644 (file)
@@ -8,18 +8,6 @@
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
-# for arm
-KERNEL_LOADADDR := 0x80008000
-
-# for arm64
-ifeq ($(SUBTARGET),mt7622)
-KERNEL_LOADADDR = 0x41080000
-endif
-
-ifeq ($(SUBTARGET),mt7629)
-KERNEL_LOADADDR = 0x40008000
-endif
-
 define Build/sysupgrade-emmc
        rm -f $@.recovery
        mkfs.fat -C $@.recovery 3070
@@ -37,7 +25,7 @@ define Device/Default
   FILESYSTEMS := squashfs
   DEVICE_DTS_DIR := $(DTS_DIR)
   IMAGES := sysupgrade.bin
-  IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
+  IMAGE/sysupgrade.bin := append-kernel | pad-to 128k | append-rootfs | pad-rootfs | append-metadata
   SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
 ifeq ($(SUBTARGET),mt7623)
   KERNEL_NAME := zImage
@@ -50,17 +38,7 @@ else
 endif
 endef
 
-ifeq ($(SUBTARGET),mt7622)
-include mt7622.mk
-endif
-
-ifeq ($(SUBTARGET),mt7623)
-include mt7623.mk
-endif
-
-ifeq ($(SUBTARGET),mt7629)
-include mt7629.mk
-endif
+include $(SUBTARGET).mk
 
 define Image/Build
        $(call Image/Build/$(1),$(1))
index 1d44539a71c4a04ec182dd5bf047623629a1c2f8..a386bf1ee28bc49166d18c25676110ec9d9f550d 100644 (file)
@@ -1,3 +1,5 @@
+KERNEL_LOADADDR := 0x41080000
+
 define Device/mediatek_mt7622-rfb1
   DEVICE_VENDOR := MediaTek
   DEVICE_MODEL := MTK7622 rfb1 AP
index 4c3c927439a24a60adeb3fce173ed12ef7bd3844..a4a9fff2b70cef54227b9923aa67354e524c5da1 100644 (file)
@@ -1,3 +1,5 @@
+KERNEL_LOADADDR := 0x80008000
+
 define Device/unielec_u7623-02-emmc-512m
   DEVICE_VENDOR := UniElec
   DEVICE_MODEL := U7623-02
index ef4b75235170391b14f8c9cad96e46a8deece750..754ce974b19c8e2c2293c9d84d4110b1751e90b9 100644 (file)
@@ -1,3 +1,5 @@
+KERNEL_LOADADDR := 0x40008000
+
 define Device/mediatek_mt7629-rfb
   DEVICE_VENDOR := MediaTek
   DEVICE_MODEL := MT7629 rfb AP