mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-18 07:23:59 +00:00
mediatek: introduce KERNEL_LOADADDR to Device/Default template
We need to reset KERNEL_LOADADDR if we use it on a per-device base. Otherwise the previous value will be kept in case a device doesn't define KERNEL_LOADADDR and relies on the default. Move initializing KERNEL_LOADADDR to target/linux/mediatek/image/Makefile, similar to how it's done also on the ramips target. This fixes image size related breakage on devices which rely on the default value of KERNEL_LOADADDR. While at it use 0x48000000 which is more common than the previous default 0x44000000 for the filogic subtarget. Fixed: e7c399bee6 ("filogic: add support for ASUS TUF-AX4200") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
parent
98539e91b2
commit
4552e6a16c
target/linux/mediatek/image
@ -6,6 +6,11 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/image.mk
|
||||
|
||||
loadaddr-$(CONFIG_TARGET_mediatek_mt7622) := 0x44000000
|
||||
loadaddr-$(CONFIG_TARGET_mediatek_mt7623) := 0x80008000
|
||||
loadaddr-$(CONFIG_TARGET_mediatek_mt7629) := 0x40008000
|
||||
loadaddr-$(CONFIG_TARGET_mediatek_filogic) := 0x48000000
|
||||
|
||||
# default all platform image(fit) build
|
||||
define Device/Default
|
||||
PROFILES = Default $$(DEVICE_NAME)
|
||||
@ -14,6 +19,7 @@ define Device/Default
|
||||
fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
|
||||
KERNEL_INITRAMFS = kernel-bin | lzma | \
|
||||
fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd
|
||||
KERNEL_LOADADDR = $(loadaddr-y)
|
||||
FILESYSTEMS := squashfs
|
||||
DEVICE_DTS_DIR := $(DTS_DIR)
|
||||
IMAGES := sysupgrade.bin
|
||||
|
@ -1,7 +1,5 @@
|
||||
DTS_DIR := $(DTS_DIR)/mediatek
|
||||
|
||||
KERNEL_LOADADDR := 0x44000000
|
||||
|
||||
define Image/Prepare
|
||||
# For UBI we want only one extra block
|
||||
rm -f $(KDIR)/ubi_mark
|
||||
@ -46,7 +44,6 @@ define Device/asus_tuf-ax4200
|
||||
DEVICE_DTS_LOADADDR := 0x47000000
|
||||
DEVICE_PACKAGES := kmod-usb3
|
||||
IMAGES := sysupgrade.bin
|
||||
KERNEL_LOADADDR := 0x48000000
|
||||
KERNEL := kernel-bin | lzma | \
|
||||
fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
|
||||
KERNEL_INITRAMFS := kernel-bin | lzma | \
|
||||
@ -65,6 +62,7 @@ define Device/bananapi_bpi-r3
|
||||
DEVICE_DTS_DIR := ../dts
|
||||
DEVICE_PACKAGES := kmod-hwmon-pwmfan kmod-i2c-gpio kmod-sfp kmod-usb3 e2fsprogs f2fsck mkf2fs
|
||||
IMAGES := sysupgrade.itb
|
||||
KERNEL_LOADADDR := 0x44000000
|
||||
KERNEL_INITRAMFS_SUFFIX := -recovery.itb
|
||||
ARTIFACTS := \
|
||||
emmc-preloader.bin emmc-bl31-uboot.fip \
|
||||
@ -145,7 +143,6 @@ TARGET_DEVICES += mediatek_mt7986b-rfb
|
||||
define Device/tplink_tl-common
|
||||
DEVICE_VENDOR := TP-Link
|
||||
DEVICE_DTS_DIR := ../dts
|
||||
KERNEL_LOADADDR := 0x48000000
|
||||
UBINIZE_OPTS := -E 5
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
@ -174,7 +171,6 @@ define Device/xiaomi_redmi-router-ax6000
|
||||
DEVICE_DTS := mt7986a-xiaomi-redmi-router-ax6000
|
||||
DEVICE_DTS_DIR := ../dts
|
||||
DEVICE_PACKAGES := kmod-leds-ws2812b
|
||||
KERNEL_LOADADDR := 0x48000000
|
||||
UBINIZE_OPTS := -E 5
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
|
@ -1,11 +1,5 @@
|
||||
DTS_DIR := $(DTS_DIR)/mediatek
|
||||
|
||||
ifdef CONFIG_LINUX_5_4
|
||||
KERNEL_LOADADDR := 0x44080000
|
||||
else
|
||||
KERNEL_LOADADDR := 0x44000000
|
||||
endif
|
||||
|
||||
define Image/Prepare
|
||||
# For UBI we want only one extra block
|
||||
rm -f $(KDIR)/ubi_mark
|
||||
|
@ -1,4 +1,3 @@
|
||||
KERNEL_LOADADDR := 0x80008000
|
||||
DEVICE_VARS += UBOOT_TARGET UBOOT_OFFSET UBOOT_IMAGE
|
||||
|
||||
# The bootrom of MT7623 expects legacy MediaTek headers present in
|
||||
|
@ -1,5 +1,3 @@
|
||||
KERNEL_LOADADDR := 0x40008000
|
||||
|
||||
define Device/mediatek_mt7629-rfb
|
||||
DEVICE_VENDOR := MediaTek
|
||||
DEVICE_MODEL := MT7629 rfb AP
|
||||
|
Loading…
Reference in New Issue
Block a user