aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek/image
diff options
context:
space:
mode:
authorFurong Xu <xfr@outlook.com>2022-12-22 10:40:26 +0800
committerDaniel Golle <daniel@makrotopia.org>2022-12-29 03:00:31 +0000
commit8bac5dc18a139e13338956e83d8dc4948824a82f (patch)
tree29b580f3f599ae0251d3aa28ed7bd12a6888ca79 /target/linux/mediatek/image
parent045baca10b157fcc57461392cf27838d147ae5bd (diff)
downloadupstream-8bac5dc18a139e13338956e83d8dc4948824a82f.tar.gz
upstream-8bac5dc18a139e13338956e83d8dc4948824a82f.tar.bz2
upstream-8bac5dc18a139e13338956e83d8dc4948824a82f.zip
mediatek: add new layout for Xiaomi Redmi Router AX6000 for OpenWrt U-Boot
This new layout is only bootable with OpenWrt U-Boot. It reuses the two crash partions and expands the ubi partion to the end of whole flash. Do not use this layout with stock U-Boot! Signed-off-by: Furong Xu <xfr@outlook.com>
Diffstat (limited to 'target/linux/mediatek/image')
-rw-r--r--target/linux/mediatek/image/filogic.mk29
1 files changed, 29 insertions, 0 deletions
diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk
index 4e3399d120..4b16cff56e 100644
--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -157,3 +157,32 @@ endif
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
endef
TARGET_DEVICES += xiaomi_redmi-router-ax6000-stock
+
+define Device/xiaomi_redmi-router-ax6000-ubootmod
+ DEVICE_VENDOR := Xiaomi
+ DEVICE_MODEL := Redmi Router AX6000 (OpenWrt U-Boot layout)
+ DEVICE_DTS := mt7986a-xiaomi-redmi-router-ax6000-ubootmod
+ DEVICE_DTS_DIR := ../dts
+ DEVICE_PACKAGES := kmod-leds-ws2812b
+ KERNEL_INITRAMFS_SUFFIX := -recovery.itb
+ IMAGES := sysupgrade.itb
+ KERNEL_LOADADDR := 0x48000000
+ UBINIZE_OPTS := -E 5
+ BLOCKSIZE := 128k
+ PAGESIZE := 2048
+ KERNEL_IN_UBI := 1
+ UBOOTENV_IN_UBI := 1
+ KERNEL := kernel-bin | gzip
+ KERNEL_INITRAMFS := kernel-bin | lzma | \
+ fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
+ IMAGE/sysupgrade.itb := append-kernel | \
+ fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-static-with-rootfs | append-metadata
+ ARTIFACTS := preloader.bin bl31-uboot.fip
+ ARTIFACT/preloader.bin := bl2 spim-nand-ddr4
+ ARTIFACT/bl31-uboot.fip := bl31-uboot xiaomi_redmi-router-ax6000
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+ ARTIFACTS += initramfs-factory.ubi
+ ARTIFACT/initramfs-factory.ubi := append-image-stage initramfs-recovery.itb | ubinize-kernel
+endif
+endef
+TARGET_DEVICES += xiaomi_redmi-router-ax6000-ubootmod