]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
airoha: adjust and default the loadaddr 20470/head
authorZiyang Huang <hzyitc@outlook.com>
Mon, 20 Oct 2025 15:10:19 +0000 (23:10 +0800)
committerChristian Marangi <ansuelsmth@gmail.com>
Wed, 29 Oct 2025 13:48:00 +0000 (14:48 +0100)
Similar to e92b153e99 ("mediatek: introduce KERNEL_LOADADDR to Device/Default template"),
let's move the default loadaddr to Device/Default.

What's more, use 0x80200000 instead of the SDK default value 0x80088000
to avoid the following error which may overwrite TZ memory and cause crash:

    [    0.000000] [Firmware Bug]: Kernel image misaligned at boot, please fix your bootloader!
    [    0.000000] OF: reserved mem: Reserved memory: failed to reserve memory for node 'atf@80000000': base 0x0000000080000000, size 2 MiB

Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
[ fix spelling mistake ]
Link: https://github.com/openwrt/openwrt/pull/20470
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
target/linux/airoha/image/Makefile
target/linux/airoha/image/an7581.mk
target/linux/airoha/image/en7523.mk

index 823714309dd1be44ac7bdf3e36e3f425bc857c95..52fcaaad54dc2f7b8e439684c11f04986fc178b3 100644 (file)
@@ -1,6 +1,10 @@
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
+loadaddr-$(CONFIG_TARGET_airoha_an7581) := 0x80200000
+loadaddr-$(CONFIG_TARGET_airoha_an7583) := 0x80200000
+loadaddr-$(CONFIG_TARGET_airoha_en7523) := 0x80200000
+
 # default all platform image(fit) build
 define Device/Default
   PROFILES = Default $$(DEVICE_NAME)
@@ -9,6 +13,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
+  KERNEL_LOADADDR = $(loadaddr-y)
   FILESYSTEMS := squashfs
   DEVICE_DTS = $$(SOC)-$(lastword $(subst _, ,$(1)))
   DEVICE_DTS_DIR := ../dts
index fcd19e413ca0227596d13067a4b11d1a44df774c..497c7acacfd2ef4c0bedd3b639cb5d1042f88155 100644 (file)
@@ -25,7 +25,6 @@ define Device/airoha_an7581-evb
   DEVICE_PACKAGES := kmod-leds-pwm kmod-i2c-an7581 kmod-pwm-airoha kmod-input-gpio-keys-polled
   DEVICE_DTS := an7581-evb
   DEVICE_DTS_CONFIG := config@1
-  KERNEL_LOADADDR := 0x80088000
   IMAGE/sysupgrade.bin := append-kernel | pad-to 128k | append-rootfs | pad-rootfs | append-metadata
   ARTIFACT/preloader.bin := an7581-preloader rfb
   ARTIFACT/bl31-uboot.fip := an7581-bl31-uboot rfb
index e116ce925547936c57679f7256e6d965aac65f53..9cbe7594df63b20494e186491cf1f2050a5bff4d 100644 (file)
@@ -1,5 +1,3 @@
-KERNEL_LOADADDR := 0x80208000
-
 define Target/Description
        Build firmware images for Airoha EN7523 ARM based boards.
 endef