diff --git a/package/boot/uboot-envtools/files/qualcommax_ipq60xx b/package/boot/uboot-envtools/files/qualcommax_ipq60xx index 8f5da361d11..38135b855e2 100644 --- a/package/boot/uboot-envtools/files/qualcommax_ipq60xx +++ b/package/boot/uboot-envtools/files/qualcommax_ipq60xx @@ -26,6 +26,7 @@ netgear,wax214) [ -n "$idx" ] && \ ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000" "2" ;; +redmi,ax5-jdcloud|\ jdc,ax1800-pro) mmcpart="$(find_mmc_part 0:APPSBLENV)" [ -n "$mmcpart" ] && \ diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile index 1894d569753..2b677a82abb 100644 --- a/package/firmware/ipq-wifi/Makefile +++ b/package/firmware/ipq-wifi/Makefile @@ -51,6 +51,7 @@ ALLWIFIBOARDS:= \ qnap_301w \ qihoo_v6 \ redmi_ax5 \ + redmi_ax5-jdcloud \ redmi_ax6 \ wallys_dr40x9 \ xiaomi_ax1800 \ @@ -63,7 +64,7 @@ ALLWIFIBOARDS:= \ zte_mf269 \ zte_mf287 \ zte_mf287plus \ - zyxel_nbg7815 \ + zyxel_nbg7815 ALLWIFIPACKAGES:=$(foreach BOARD,$(ALLWIFIBOARDS),ipq-wifi-$(BOARD)) @@ -177,6 +178,7 @@ $(eval $(call generate-ipq-wifi-package,qnap_301w,QNAP 301w)) $(eval $(call generate-ipq-wifi-package,prpl_haze,prpl Haze)) $(eval $(call generate-ipq-wifi-package,qihoo_v6,Qihoo V6)) $(eval $(call generate-ipq-wifi-package,redmi_ax5,Redmi AX5)) +$(eval $(call generate-ipq-wifi-package,redmi_ax5-jdcloud,Redmi AX5 JDCloud)) $(eval $(call generate-ipq-wifi-package,redmi_ax6,Redmi AX6)) $(eval $(call generate-ipq-wifi-package,wallys_dr40x9,Wallys DR40X9)) $(eval $(call generate-ipq-wifi-package,xiaomi_ax1800,Xiaomi AX1800)) diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-ax5-jdcloud.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-ax5-jdcloud.dts new file mode 100644 index 00000000000..f3fe09c4c3e --- /dev/null +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-ax5-jdcloud.dts @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +/dts-v1/; + +#include "ipq6018-xiaomi.dtsi" + +/ { + model = "Redmi AX5 JDCloud"; + compatible = "redmi,ax5-jdcloud", "qcom,ipq6018"; + + chosen { + bootargs-append = " rootfstype=squashfs,ext4 swiotlb=1 coherent_pool=2M"; + }; +}; + +&sdhc_1 { + status = "okay"; + + // reference: https://github.com/openwrt/openwrt/blob/c1ad783/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-301w.dts#L311-L317 + /delete-property/ mmc-hs400-1_8v; + mmc-hs200-1_8v; + mmc-ddr-1_8v; +}; + +&wifi { + qcom,ath11k-calibration-variant = "Redmi-AX5-JDCloud"; +}; diff --git a/target/linux/qualcommax/image/ipq60xx.mk b/target/linux/qualcommax/image/ipq60xx.mk index 0ebe064856c..2a1a7ebd0dc 100644 --- a/target/linux/qualcommax/image/ipq60xx.mk +++ b/target/linux/qualcommax/image/ipq60xx.mk @@ -88,6 +88,20 @@ define Device/redmi_ax5 endef TARGET_DEVICES += redmi_ax5 +define Device/redmi_ax5-jdcloud + $(call Device/FitImage) + $(call Device/EmmcImage) + DEVICE_VENDOR := Redmi + DEVICE_MODEL := AX5 JDCloud + DEVICE_DTS_CONFIG := config@cp03-c1 + SOC := ipq6018 + DEVICE_PACKAGES := ipq-wifi-redmi_ax5-jdcloud + #BLOCKSIZE := 64k + KERNEL_SIZE := 6144k + IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-rootfs | append-metadata +endef +TARGET_DEVICES += redmi_ax5-jdcloud + define Device/xiaomi_ax1800 $(call Device/FitImage) $(call Device/UbiFit) diff --git a/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/01_leds b/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/01_leds index 0cf7ba291e0..03454ead3f1 100644 --- a/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/01_leds +++ b/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/01_leds @@ -17,6 +17,7 @@ case "$board" in ucidef_set_led_netdev "wlan2g" "WLAN2G" "blue:wlan2g" "wlan1" ucidef_set_led_netdev "wlan5g" "WLAN5G" "blue:wlan5g" "wlan0" ;; + redmi,ax5-jdcloud|\ jdc,ax1800-pro) ucidef_set_led_netdev "wan" "WAN" "net_blue" "eth3" ;; diff --git a/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11-caldata b/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11-caldata index c4b77a627e1..011c327c422 100644 --- a/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11-caldata +++ b/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11-caldata @@ -22,6 +22,7 @@ case "$FIRMWARE" in xiaomi,ax1800) caldata_extract "0:art" 0x1000 0x10000 ;; + redmi,ax5-jdcloud|\ jdc,ax1800-pro) caldata_extract_mmc "0:ART" 0x1000 0x10000 ;; diff --git a/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata b/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata deleted file mode 100644 index 8f4716b071d..00000000000 --- a/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -[ -e /lib/firmware/$FIRMWARE ] && exit 0 - -. /lib/functions/caldata.sh - -board=$(board_name) - -case "$FIRMWARE" in -"ath11k/IPQ6018/hw1.0/cal-ahb-c000000.wifi.bin") - case $(board_name) in - glinet,gl-axt1800|\ - glinet,gl-ax1800) - caldata_extract "0:art" 0x1000 0x10000 - ;; - *) - exit 1 - ;; - esac -esac diff --git a/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh b/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh index 3d1f8317254..14bccd65912 100644 --- a/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh @@ -43,6 +43,7 @@ platform_do_upgrade() { netgear,wax214) nand_do_upgrade "$1" ;; + redmi,ax5-jdcloud|\ jdc,ax1800-pro) kernelname="0:HLOS" rootfsname="rootfs" diff --git a/tools/mkimage/Makefile b/tools/mkimage/Makefile index ae744f9bf3d..6d2cc5f7643 100644 --- a/tools/mkimage/Makefile +++ b/tools/mkimage/Makefile @@ -7,14 +7,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mkimage -PKG_VERSION:=2024.01 +PKG_VERSION:=2024.04 PKG_SOURCE:=u-boot-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:= \ https://mirror.cyberbits.eu/u-boot \ https://ftp.denx.de/pub/u-boot \ ftp://ftp.denx.de/pub/u-boot -PKG_HASH:=b99611f1ed237bf3541bdc8434b68c96a6e05967061f992443cb30aabebef5b3 +PKG_HASH:=18a853fe39fad7ad03a90cc2d4275aeaed6da69735defac3492b80508843dd4a HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/u-boot-$(PKG_VERSION) diff --git a/tools/mkimage/patches/030-allow-to-use-different-magic.patch b/tools/mkimage/patches/030-allow-to-use-different-magic.patch index f2f57965f60..bcbdc4d6cd1 100644 --- a/tools/mkimage/patches/030-allow-to-use-different-magic.patch +++ b/tools/mkimage/patches/030-allow-to-use-different-magic.patch @@ -24,7 +24,7 @@ This patch makes it possible to set a custom image magic. " -a ==> set load address to 'addr' (hex)\n" " -e ==> set entry point to 'ep' (hex)\n" " -n ==> set image name to 'name'\n" -@@ -159,7 +161,7 @@ static int add_content(int type, const c +@@ -160,7 +162,7 @@ static int add_content(int type, const c } static const char optstring[] = @@ -33,7 +33,7 @@ This patch makes it possible to set a custom image magic. static const struct option longopts[] = { { "load-address", required_argument, NULL, 'a' }, -@@ -302,6 +304,14 @@ static void process_args(int argc, char +@@ -303,6 +305,14 @@ static void process_args(int argc, char case 'l': params.lflag = 1; break; diff --git a/tools/mkimage/patches/095-tools-disable-TOOLS_FIT_FULL_CHECK.patch b/tools/mkimage/patches/095-tools-disable-TOOLS_FIT_FULL_CHECK.patch index f2e3b9b0530..ed6824b11a8 100644 --- a/tools/mkimage/patches/095-tools-disable-TOOLS_FIT_FULL_CHECK.patch +++ b/tools/mkimage/patches/095-tools-disable-TOOLS_FIT_FULL_CHECK.patch @@ -14,7 +14,7 @@ https://github.com/u-boot/u-boot/commit/3f04db891a353f4b127ed57279279f851c6b4917 --- a/tools/Kconfig +++ b/tools/Kconfig -@@ -31,7 +31,7 @@ config TOOLS_FIT +@@ -36,7 +36,7 @@ config TOOLS_FIT Enable FIT support in the tools builds. config TOOLS_FIT_FULL_CHECK