mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2025-11-02 22:21:16 +00:00
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>
32 lines
924 B
Makefile
32 lines
924 B
Makefile
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)
|
|
KERNEL_NAME := Image
|
|
KERNEL = kernel-bin | lzma | \
|
|
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
|
|
IMAGES := sysupgrade.bin
|
|
IMAGE/sysupgrade.bin := append-kernel | pad-to 128k | append-rootfs | \
|
|
pad-rootfs | append-metadata
|
|
endef
|
|
|
|
include $(SUBTARGET).mk
|
|
|
|
define Image/Build
|
|
$(call Image/Build/$(1),$(1))
|
|
endef
|
|
|
|
$(eval $(call BuildImage))
|