From 363256ce994b3f5ecb6242146200a6cd633d92e4 Mon Sep 17 00:00:00 2001 From: Sheikh Faisal Date: Mon, 24 Aug 2026 13:05:39 +0530 Subject: [PATCH] mediatek: add support for JioRouter AX6000 JIDU6J01 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit | Component | Details | |------------------|------------------------------------------------| | **SoC** | MediaTek MT7986A (4× ARM Cortex-A53 @ 2.0 GHz) | | **RAM** | 512 MB | | **Flash** | 256 MB NAND | | **Ethernet** | 5× 10/100/1000 Mbps (1 WAN + 4 LAN) | | **WLAN 2.4 GHz** | MediaTek MT7976GN — 802.11b/g/n/ax, 4×4 MIMO | | **WLAN 5 GHz** | MediaTek MT7976AN — 802.11n/ac/ax, 4×4 MIMO | | **LEDs** | 1× RGB LED (GPIO-controlled) | | **Button** | 1× Reset | | **USB** | Yes | **MAC Addresses:** | Interface | Source | |------------|-------------------------------------------------| | WAN/Label | MFG MTD partition (variant-specific fallback) | | LAN | WAN + 1 | | 2.4 GHz | WAN + 2 | | 5 GHz | WAN + 3 | Supported variants and MAC source: - JIDU6J01,JIDU6201: binary at offset 0x00 - JIDU6401: binary at offset 0x20 - JIDU6601: ASCII text at offset 0x1d0 - JIDU6701: ASCII mac= key --- **1. Extracting U-Boot Credentials** The U-Boot username and password are stored in the `MFG` partition. To retrieve them: - With root access on stock OS: Read directly from the MFG partition. - Without root access: Dump the NAND flash first, then extract the credentials from the dump. **2. Prepare TFTP server** - Set a static IP on the ethernet interface of your computer (e.g. default: ip `192.168.1.2`, gateway `192.168.1.1`). - Download the initramfs image and host it with the TFTP server. **3. Interrupt boot** Attach UART and power on the router. When the boot menu appears, select **Failsafe Mode**, then press `Ctrl-C` to interrupt and enter the credentials extracted from `MFG` partition. **4. Load and run initramfs image** ```sh setenv ipaddr 192.168.1.1 setenv serverip 192.168.1.2 tftpboot 0x46000000 openwrt-mediatek-filogic-jiorouter_ax6000-jidu6j01-initramfs-kernel.bin fdt addr $(fdtcontroladdr) fdt rm /signature bootm ``` **5. Flash sysupgrade image** Place the sysupgrade image in `/tmp`, then run: ```sh sysupgrade /tmp/openwrt-mediatek-filogic-jiorouter_ax6000-jidu6j01-squashfs-sysupgrade.bin ``` Alternatively, use the sysupgrade option in LuCI. Signed-off-by: Sheikh Faisal Link: https://github.com/openwrt/openwrt/pull/23510 (cherry picked from commit 552e617bd0ae18fce68fa1b9add4c4cc50da7d87) Link: https://github.com/openwrt/openwrt/pull/25095 Signed-off-by: Jonas Jelonek --- .../uboot-envtools/files/mediatek_filogic | 3 +- .../dts/mt7986a-jiorouter-ax6000-jidu6j01.dts | 53 +++++++++++++++++++ .../filogic/base-files/etc/board.d/02_network | 24 +++++++++ .../etc/hotplug.d/ieee80211/11_fix_wifi_mac | 22 ++++++++ .../base-files/lib/upgrade/platform.sh | 6 ++- target/linux/mediatek/image/filogic.mk | 27 ++++++++++ 6 files changed, 132 insertions(+), 3 deletions(-) create mode 100644 target/linux/mediatek/dts/mt7986a-jiorouter-ax6000-jidu6j01.dts diff --git a/package/boot/uboot-tools/uboot-envtools/files/mediatek_filogic b/package/boot/uboot-tools/uboot-envtools/files/mediatek_filogic index 27e703070a3..fac81e7d69a 100644 --- a/package/boot/uboot-tools/uboot-envtools/files/mediatek_filogic +++ b/package/boot/uboot-tools/uboot-envtools/files/mediatek_filogic @@ -141,7 +141,8 @@ gatonetworks,gdsp) glinet,gl-mt3000) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x20000" ;; -jiorouter,ax6000-jidu6101) +jiorouter,ax6000-jidu6101|\ +jiorouter,ax6000-jidu6j01) . /lib/upgrade/nand.sh envubi=$(nand_find_ubi ubi) envdev=/dev/$(nand_find_volume "$envubi" u-boot-env) diff --git a/target/linux/mediatek/dts/mt7986a-jiorouter-ax6000-jidu6j01.dts b/target/linux/mediatek/dts/mt7986a-jiorouter-ax6000-jidu6j01.dts new file mode 100644 index 00000000000..7e53a77f689 --- /dev/null +++ b/target/linux/mediatek/dts/mt7986a-jiorouter-ax6000-jidu6j01.dts @@ -0,0 +1,53 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) + +/dts-v1/; +#include "mt7986a-jiorouter-common.dtsi" + +/ { + compatible = "jiorouter,ax6000-jidu6j01", "mediatek,mt7986a"; + model = "JioRouter AX6000 JIDU6J01"; +}; + +&switch { + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + label = "wan"; + }; + + port@1 { + reg = <1>; + label = "lan1"; + }; + + port@2 { + reg = <2>; + label = "lan2"; + }; + + port@3 { + reg = <3>; + label = "lan3"; + }; + + port@4 { + reg = <4>; + label = "lan4"; + }; + + port@6 { + reg = <6>; + ethernet = <&gmac0>; + phy-mode = "2500base-x"; + + fixed-link { + speed = <2500>; + full-duplex; + pause; + }; + }; + }; +}; diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network index 0d7b0321dd0..b60e3062dd8 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network @@ -285,6 +285,30 @@ mediatek_setup_macs() wan_mac=$label_mac lan_mac=$(macaddr_add "$label_mac" 1) ;; + jiorouter,ax6000-jidu6j01) + local mfg_dev + local model + mfg_dev=$(find_mtd_chardev "MFG") + [ -z "$mfg_dev" ] && return + model=$(dd if="$mfg_dev" bs=1024 count=1 2>/dev/null | strings | grep -o -m1 'JIDU[0-9A-Z][0-9A-Z]*') + case "$model" in + JIDU6401) + label_mac=$(get_mac_binary "$mfg_dev" 0x20) + ;; + JIDU6601) + label_mac=$(mtd_get_mac_text "MFG" 0x1d0) + ;; + JIDU6701) + label_mac=$(mtd_get_mac_ascii "MFG" mac) + ;; + *) + label_mac=$(get_mac_binary "$mfg_dev" 0) + ;; + esac + [ -n "$label_mac" ] || return + wan_mac=$label_mac + lan_mac=$(macaddr_add "$label_mac" 1) + ;; mercusys,mr80x-v3|\ mercusys,mr85x) mac_dirty=$(cat "/tmp/tp_data/default-mac" | sed -n 's/^'"MAC"'://p') diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac index d3b84ce6edc..730d674f62a 100644 --- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac +++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac @@ -176,6 +176,28 @@ case "$board" in [ "$PHYNBR" = "0" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress [ "$PHYNBR" = "1" ] && macaddr_add $addr 3 > /sys${DEVPATH}/macaddress ;; + jiorouter,ax6000-jidu6j01) + mfg_dev=$(find_mtd_chardev "MFG") + [ -z "$mfg_dev" ] && exit 0 + model=$(dd if="$mfg_dev" bs=1024 count=1 2>/dev/null | strings | grep -o -m1 'JIDU[0-9A-Z][0-9A-Z]*') + case "$model" in + JIDU6401) + label_mac=$(get_mac_binary "$mfg_dev" 0x20) + ;; + JIDU6601) + label_mac=$(mtd_get_mac_text "MFG" 0x1d0) + ;; + JIDU6701) + label_mac=$(mtd_get_mac_ascii "MFG" mac) + ;; + *) + label_mac=$(get_mac_binary "$mfg_dev" 0) + ;; + esac + [ -n "$label_mac" ] || exit 0 + [ "$PHYNBR" = "0" ] && macaddr_add $label_mac 2 > /sys${DEVPATH}/macaddress + [ "$PHYNBR" = "1" ] && macaddr_add $label_mac 3 > /sys${DEVPATH}/macaddress + ;; keenetic,kap-630|\ keenetic,kn-3711|\ keenetic,kn-3811|\ diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh index 1d6f79ed7c8..f7cbd40a65e 100644 --- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh @@ -236,7 +236,8 @@ platform_do_upgrade() { cudy,wr3000p-v1|\ huasifei,wh3000-pro-nand|\ huasifei,wh3000r-nand|\ - jiorouter,ax6000-jidu6101) + jiorouter,ax6000-jidu6101|\ + jiorouter,ax6000-jidu6j01) CI_UBIPART="ubi" nand_do_upgrade "$1" ;; @@ -487,7 +488,8 @@ platform_pre_upgrade() { buffalo,wsr-6000ax8) buffalo_initial_setup ;; - jiorouter,ax6000-jidu6101) + jiorouter,ax6000-jidu6101|\ + jiorouter,ax6000-jidu6j01) jiorouter_initial_setup ;; xiaomi,mi-router-ax3000t|\ diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk index 1714da677ee..1696036692b 100644 --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk @@ -2099,6 +2099,33 @@ define Device/jiorouter_ax6000-jidu6101 endef TARGET_DEVICES += jiorouter_ax6000-jidu6101 +define Device/jiorouter_ax6000-jidu6j01 + DEVICE_VENDOR := JioRouter + DEVICE_MODEL := AX6000 + DEVICE_VARIANT := JIDU6J01 + DEVICE_ALT0_VENDOR := JioRouter + DEVICE_ALT0_MODEL := AX6000 + DEVICE_ALT0_VARIANT := JIDU6201 + DEVICE_ALT1_VENDOR := JioRouter + DEVICE_ALT1_MODEL := AX6000 + DEVICE_ALT1_VARIANT := JIDU6401 + DEVICE_ALT2_VENDOR := JioRouter + DEVICE_ALT2_MODEL := AX6000 + DEVICE_ALT2_VARIANT := JIDU6601 + DEVICE_ALT3_VENDOR := JioRouter + DEVICE_ALT3_MODEL := AX6000 + DEVICE_ALT3_VARIANT := JIDU6701 + DEVICE_DTS := mt7986a-jiorouter-ax6000-jidu6j01 + DEVICE_DTS_DIR := ../dts + DEVICE_PACKAGES := kmod-usb3 kmod-mt7915e kmod-mt7986-firmware mt7986-wo-firmware + UBINIZE_OPTS := -E 5 + UBOOTENV_IN_UBI := 1 + BLOCKSIZE := 128k + PAGESIZE := 2048 + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata +endef +TARGET_DEVICES += jiorouter_ax6000-jidu6j01 + define Device/kebidumei_ax3000-u22 DEVICE_VENDOR := Kebidumei DEVICE_MODEL := AX3000-U22