Skip to content

Commit

Permalink
qualcommax: ipq60xx: add Redmi AX5 JDCloud
Browse files Browse the repository at this point in the history
tools/mkimage: update to v2024.04

Update to latest version.

Refresh patches:
- 030-allow-to-use-different-magic.patch
- 095-tools-disable-TOOLS_FIT_FULL_CHECK.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>

qualcommax: ipq60xx: add Redmi AX5 JDCloud
  • Loading branch information
breeze303 committed Apr 6, 2024
1 parent 54b2506 commit d62bdca
Show file tree
Hide file tree
Showing 11 changed files with 53 additions and 26 deletions.
1 change: 1 addition & 0 deletions package/boot/uboot-envtools/files/qualcommax_ipq60xx
Original file line number Diff line number Diff line change
Expand Up @@ -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" ] && \
Expand Down
4 changes: 3 additions & 1 deletion package/firmware/ipq-wifi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ ALLWIFIBOARDS:= \
qnap_301w \
qihoo_v6 \
redmi_ax5 \
redmi_ax5-jdcloud \
redmi_ax6 \
wallys_dr40x9 \
xiaomi_ax1800 \
Expand All @@ -63,7 +64,7 @@ ALLWIFIBOARDS:= \
zte_mf269 \
zte_mf287 \
zte_mf287plus \
zyxel_nbg7815 \
zyxel_nbg7815

ALLWIFIPACKAGES:=$(foreach BOARD,$(ALLWIFIBOARDS),ipq-wifi-$(BOARD))

Expand Down Expand Up @@ -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))
Expand Down
Original file line number Diff line number Diff line change
@@ -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";
};
14 changes: 14 additions & 0 deletions target/linux/qualcommax/image/ipq60xx.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
;;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ platform_do_upgrade() {
netgear,wax214)
nand_do_upgrade "$1"
;;
redmi,ax5-jdcloud|\
jdc,ax1800-pro)
kernelname="0:HLOS"
rootfsname="rootfs"
Expand Down
4 changes: 2 additions & 2 deletions tools/mkimage/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions tools/mkimage/patches/030-allow-to-use-different-magic.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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[] =
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d62bdca

Please sign in to comment.