Cudy X6 / AX 1800, how to flash successfully?

Hi,

I recently bought a Cudy X6. From what I'm reading, 22.03 should support those devices. Looking into the commit message it should be at first flashed the vendor OpenWRT image, which can be obtained from their website. It seems there are different revisions in the wild, but it's possible to identify them.
As it seems I've a V1 (serial includes an 'EU1.0), I downloaded the X6 (V1) OpenWRT and uploaded the included openwrt-ramips-mt7621-cudy-x6-flash.bin which worked well.
As documented, I used NOT the option to keep settings and flashed openwrt-22.03.2-ramips-mt7621-cudy_x6-squashfs-sysupgrade.bin.

The systems rebootes and the device get stuck, the timeline after powering up:

0s: short all NIC-LED lighting
1s: short all NIC-LED lighting
4s: connected NIC-LED shows activity
8s: short all NIC-LED lighting, active NIC-LED turns off
followed by 2s nothing => starting again at 0s

I tried both, via LuCI and CLI, no difference. Did I miss something or did something wrong? Reading through the forum and google seems to indicate it SHOULD work but somehow I managed to get it not working. Any ideas?

Many thanks, Jan

it's always the same problem, shoul be:

spi0 {
	status = "okay";

	flash@0 {
		compatible = "jedec,spi-nor";
		reg = <0>;
		spi-max-frequency = <80000000>;
		m25p,fast-read;

but in openwrt dts is:

&spi0 {
           status = "okay";
   
           flash@0 {
                   compatible = "jedec,spi-nor";
                   reg = <0>;
                   spi-max-frequency = <50000000>;

then open a bug or better a github PR

1 Like

In which way does this help me to flash the "stock" firmware image?

i need open a bug report? i do not have the device
i said what should be done inthis tread.

yes please open an issue here with these details https://github.com/openwrt/openwrt/issues

Here we go.

1 Like

anyway .... https://github.com/waja/openwrt-cudy-x6-firmware/blob/669048fac38311f3e148b4d4a01c6a586f35d4f7/mt7621_cudy_x6_fix_dts.patch does NOT fix the issue.

have you read what i wrote?

spi0 {
	status = "okay";

	flash@0 {
		compatible = "jedec,spi-nor";
		reg = <0>;
		spi-max-frequency = <80000000>;
		m25p,fast-read;

Hi,

https://github.com/waja/openwrt-cudy-x6-firmware/blob/f44241ad4b7905abf2843918496c11ccf17995a8/mt7621_cudy_x6_fix_dts_2.patch results into:

Error: ../dts/mt7621_cudy_x6.dts:56.1-5 syntax error

So I don't understand, what exactly you want to point out.

that i don't know ypour problem for me compile just fine.

Trying https://github.com/waja/openwrt-cudy-x6-firmware/blob/62f18bfccd2aa1c22810499d9332d6ae285e6fa9/mt7621_cudy_x6_fix_dts_2.patch (WITH the '&' in front of 'spi0' but with the two last lines changed) compiles fine, but makes no different in the way the router is behaving after flashing it: It's bricked as described in Cudy X6 / AX 1800, how to flash successfully?

I can't imagine, that no one got a Cudy X6 to work with the recent stable release firmware, but asking me, what is different here with my device / way flashing it.

but are you sure it's v1?

It's written on the backside "EU1.0" right beside the S/N. I'm recovering successful with the "X6 V1" image from https://www.cudytech.com/x6_software_download and flashing Cudy patched OpenWRT from https://www.cudytech.com/openwrt_software_download for the "V1", while the image "V2" is rejected.

So I would say I'm very confident, that's a so called "V1". Is there a way to get the exactly DTS definition from a running OpenWRT system?

please try this

// SPDX-License-Identifier: GPL-2.0-or-later OR MIT

#include "mt7621.dtsi"

#include <dt-bindings/input/input.h>
#include <dt-bindings/gpio/gpio.h>

/ {
	compatible = "cudy-x6", "mediatek,mt7621-soc";
	model = "CUDY X6";

	memory@0 {
		device_type = "memory";
		reg = <0x0 0x10000000>;
	};

	chosen {
		bootargs = "console=ttyS0,115200";
	};

	keys {
		compatible = "gpio-keys";

		reset {
			label = "reset";
			gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_RESTART>;
		};

		wps {
			label = "wps";
			gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_WPS_BUTTON>;
		};
	};

	leds {
		compatible = "gpio-leds";

		led_blue: blue {
			label = "blue";
			gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
		};

		led_red: red {
			label = "red";
			gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
		};
	};

};

&spi0 {
	status = "okay";

	flash@0 {
		compatible = "jedec,spi-nor";
		reg = <0>;
		spi-max-frequency = <80000000>;
		m25p,fast-read;

		partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;

			partition@0 {
				label = "u-boot";
				reg = <0x0 0x30000>;
				read-only;
			};

			partition@30000 {
				label = "u-boot-env";
				reg = <0x30000 0x10000>;
				read-only;
			};

			factory: partition@40000 {
				label = "factory";
				reg = <0x40000 0x10000>;
			};

			debug: partition@1fd0000 {
				label = "debug";
				reg = <0x1fd0000 0x10000>;
			};

			backup: partition@1fe0000 {
				label = "backup";
				reg = <0x1fe0000 0x10000>;
			};

			bdinfo: partition@ff0000 {
				label = "bdinfo";
				reg = <0x1ff0000 0x10000>;
				read-only;
			};

			firmware: partition@50000 {
				compatible = "denx,uimage";
				label = "firmware";
				reg = <0x50000 0x1f80000>;
			};
		};
	};
};

&pcie {
	status = "okay";
};

&pcie1 {
	wifi@0,0 {
		compatible = "mediatek,mt76";
		reg = <0x0000 0 0 0 0>;
		mediatek,mtd-eeprom = <&factory 0x0000>;
	};
};

&gmac0 {
	mtd-mac-address = <&bdinfo 0xDE00>;
};

&switch0 {
	ports {
		port@0 {
			status = "okay";
			label = "lan1";
		};

		port@1 {
			status = "okay";
			label = "lan2";
		};

		port@2 {
			status = "okay";
			label = "lan3";
		};

		port@3 {
			status = "okay";
			label = "lan4";
		};

		port@4 {
			status = "okay";
			label = "wan";
			mtd-mac-address = <&factory 0xA>;
		};
	};
};

&state_default {
	gpio {
		groups = "i2c", "wdt";
		function = "gpio";
	};
};

Looks like the one from the Cudy customized OpenWRT firmware image. Build is running ... If I remember correct, I tried that too, but lets see ... maybe it works (this time).

it will work 100x100

Unfortunately this did not work as expected. I flashed the sysupgrade firmware from https://github.com/waja/openwrt-cudy-x6-firmware/releases/tag/2022.11.28-1555 build with this pipeline with this commit.

I think there is something other spooky issue. The X6 can not successfully flashed with stable and the SNAPSHOT firmware. Every adjustment I made to the DTS file didn't help yet.

If there is a brokeness in general, there would be a couple more ppl report issues, wouldn't them?

but i do not see other people complain about that, so something is on your side

Okay ... even a second device has the same issue.

What I'm doing?