mirror of
				https://github.com/hzyitc/openwrt-redmi-ax3000
				synced 2025-10-30 07:50:32 +08:00 
			
		
		
		
	 fed2d31343
			
		
	
	fed2d31343
	
	
	
		
			
			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>
		
	
		
			
				
	
	
		
			45 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Makefile
		
	
	
	
	
	
| define Build/an7581-emmc-bl2-bl31-uboot
 | |
|   head -c $$((0x800)) /dev/zero > $@
 | |
|   cat $(STAGING_DIR_IMAGE)/an7581_$1-bl2.fip >> $@
 | |
|   dd if=$(STAGING_DIR_IMAGE)/an7581_$1-bl31-u-boot.fip of=$@ bs=1 seek=$$((0x20000)) conv=notrunc
 | |
| endef
 | |
| 
 | |
| define Build/an7581-preloader
 | |
|   cat $(STAGING_DIR_IMAGE)/an7581_$1-bl2.fip >> $@
 | |
| endef
 | |
| 
 | |
| define Build/an7581-bl31-uboot
 | |
|   cat $(STAGING_DIR_IMAGE)/an7581_$1-bl31-u-boot.fip >> $@
 | |
| endef
 | |
| 
 | |
| define Device/FitImageLzma
 | |
| 	KERNEL_SUFFIX := -uImage.itb
 | |
| 	KERNEL = kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(DEVICE_DTS).dtb
 | |
| 	KERNEL_NAME := Image
 | |
| endef
 | |
| 
 | |
| define Device/airoha_an7581-evb
 | |
|   $(call Device/FitImageLzma)
 | |
|   DEVICE_VENDOR := Airoha
 | |
|   DEVICE_MODEL := AN7581 Evaluation Board (SNAND)
 | |
|   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
 | |
|   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
 | |
|   ARTIFACTS := preloader.bin bl31-uboot.fip
 | |
| endef
 | |
| TARGET_DEVICES += airoha_an7581-evb
 | |
| 
 | |
| define Device/airoha_an7581-evb-emmc
 | |
|   DEVICE_VENDOR := Airoha
 | |
|   DEVICE_MODEL := AN7581 Evaluation Board (EMMC)
 | |
|   DEVICE_DTS := an7581-evb-emmc
 | |
|   DEVICE_PACKAGES := kmod-i2c-an7581
 | |
|   ARTIFACT/preloader.bin := an7581-preloader rfb
 | |
|   ARTIFACT/bl31-uboot.fip := an7581-bl31-uboot rfb
 | |
|   ARTIFACTS := preloader.bin bl31-uboot.fip
 | |
| endef
 | |
| TARGET_DEVICES += airoha_an7581-evb-emmc
 |