From 86da72e1f00414eacf331a7b9a9b84548bcd7f0f Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Sun, 10 Oct 2021 22:11:38 +0800 Subject: [PATCH] ath79: tweak partition for xwrt-csac Signed-off-by: Tianling Shen --- target/linux/ath79/dts/qca9563_xwrt_csac.dts | 39 ++++++++++++-------- target/linux/ath79/image/generic.mk | 15 +++++--- 2 files changed, 33 insertions(+), 21 deletions(-) diff --git a/target/linux/ath79/dts/qca9563_xwrt_csac.dts b/target/linux/ath79/dts/qca9563_xwrt_csac.dts index 1aef53e924..33df8716a0 100644 --- a/target/linux/ath79/dts/qca9563_xwrt_csac.dts +++ b/target/linux/ath79/dts/qca9563_xwrt_csac.dts @@ -3,12 +3,13 @@ #include #include +#include #include "qca956x.dtsi" / { model = "XWRT CSAC"; - compatible = "xwrt,csac", "qca,qca9563"; + compatible = "xwrt,csac2", "qca,qca9563"; aliases { led-boot = &led_sys; @@ -102,22 +103,30 @@ }; partition@50000 { + label = "loader1"; + reg = <0x050000 0x010000>; + }; + + partition@60000 { + compatible = "openwrt,uimage", "denx,uimage"; + openwrt,ih-magic = ; label = "firmware"; + reg = <0x060000 0xe20000>; + }; + + partition@e80000 { + label = "loader2"; + reg = <0xe80000 0x010000>; + }; + + partition@e90000 { + label = "unused"; + reg = <0xe90000 0x160000>; + }; + + partition@1 { + label = "oem_firmware"; reg = <0x050000 0xfa0000>; - - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "rootfs"; - reg = <0x000000 0xe30000>; - }; - - partition@e30000 { - label = "kernel"; - reg = <0xe30000 0x170000>; - }; }; art: partition@ff0000 { diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 9c95443892..9eae0c49d8 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -2394,15 +2394,18 @@ endef TARGET_DEVICES += xiaomi_mi-router-4q define Device/xwrt_csac + $(Device/loader-okli-uimage) SOC := qca9563 DEVICE_VENDOR := XWRT DEVICE_MODEL := CSAC - KERNEL_SIZE := 1472k - IMAGE_SIZE := 16000k - IMAGES += factory-10.bin factory-05.bin - IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | pad-to 14528k | append-kernel | append-metadata | check-size - IMAGE/factory-10.bin := $$(IMAGE/sysupgrade.bin) | xwrt_csac10-factory $(1) - IMAGE/factory-05.bin := $$(IMAGE/sysupgrade.bin) | xwrt_csac05-factory $(1) + IMAGE_SIZE := 14464k + LOADER_FLASH_OFFS := 0x60000 + KERNEL := kernel-bin | append-dtb | lzma | uImage lzma -M 0x4f4b4c49 + IMAGES += breed-factory.bin factory-10.bin factory-05.bin + IMAGE/breed-factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | \ + prepad-okli-kernel $(1) | pad-to 14528k | append-okli-kernel $(1) + IMAGE/factory-10.bin := $$(IMAGE/breed-factory.bin) | xwrt_csac10-factory $(1) + IMAGE/factory-05.bin := $$(IMAGE/breed-factory.bin) | xwrt_csac05-factory $(1) DEVICE_PACKAGES := kmod-leds-reset kmod-ath10k-ct ath10k-firmware-qca9888-ct kmod-usb-core kmod-usb2 endef TARGET_DEVICES += xwrt_csac