Cudy WR1300 support?

Cudy WR-1300:
SoC: MediaTek MT7621AN
RAM: 128M (Winbond W631GG6KB-15)
FLASH: 16MB (Spansion S25FL128SA)
WiFi: MediaTek MT7603EN bgn 2SS
WiFi: MediaTek MT7612EN nac 2SS

4x 5dBi external antennae, 300Mbps on 2.4GHz and 867Mbps on 5GHz.

Glad to know there is progress on the matter. To be sure I follow: do you already have a functional target for this, or is the one giving you kernel panic?

I have a working image, I sysupgrade-ed from the Cudy provided openwrt image, but I assume it should also work via tftp.

When I compile with this change (my last commit on my branch), I get a panic:

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

I don't have a spare UART cable to inspect the boot logs when the panic happens. This is at best a weekend side project, and this is my first time taking a stab at openwrt internals. I'll try to chip away at it today and tomorrow, my hope is that I am doing something silly that someone with more familiarity can point out.

It looks like you are modifying the Cudy dts. I would start with a dts from ^master git pull for several reasons:

  1. If you get something and want to commit your work, they only accept new devices to master
  2. There have been changes in naming devices in the *.dts
  3. The main things from Cudy's dts are the partition start and erase size, particularly u-boot, u-boot-env and the firmware.

You can peruse the list of mt7621_*.dts for a similar dts (16MB spi flash, MT7612EN, single usb3 port, u-boot + u-boot-env, etc) in one tab and the hardware database in a second. Put the Cudy partition scheme into the closest ^master *dts you can find. You can also insert Cudy's gpio pins, names and led color.

https://git.openwrt.org/?p=openwrt/openwrt.git;a=tree;f=target/linux/ramips/dts;h=e606346d1f2199adf1b900e524492f1c33c708af;hb=HEAD

After you pick a ^master dts as a template, go back and look at the commits for that device to see what other edits may be needed as far as board.d and image/mt7621.mk entries.

One question i have for this.... after loading the image as i stated earlier, the kernel log shows 1 usb3 port and 1 usb2 port. physically there is only 1 usb3 port on the back of this device. I am wondering if possibly there might be a header inside on the board for the usb2 port that may be capable of being used. If so i would like to use the usb2 port for tethering my phone and perhaps figure out a way of hacking some type of usb3 SSD inside the device to give it some storage space for nas application.

This has been done although it is not pretty:
https://www.google.com/search?q=router%20hack%20add%20usb%20port

Can you share the working image? I tried compiling but I'm new at this and the file size looks to be too small.

hey guys, any progress on this ?

Can you try this image?


It's fully compatible with 19.07.3 openwrt release
UPD. Archive is updated Aug 17

Any plans to make official support? It would be great to see as official release.

Thanks!

Did you compile it by your own ?

I don't have the board. So I just try to fix errors in published dts-file and check it correctness now. Did you test this image?

You cann't test or are afraid to test image from unknown source, can you?
My mom taught me that it is impolite to answer a question with a question :slight_smile: so I've used official released 19.07.3 imagebuilder to make this firmware.

I don't have the router yet because I would like to see it officially supported before buying it. My intention with my question was just to know if that was a official release or not, but I realized later that you compiled it by your own since I didn't find anything regarding this unit on the develop branch of openwrt.

Thx, I understand you.

No, I don't compile firmware myself. I've built firmware from already compiled official binaries with official released imagebuilder 19.07.3. There are enough info in this topic to do that.
See:
https://openwrt.org/docs/guide-user/additional-software/imagebuilder

I tried to flash the image as an upgrade from Cudy's own 19.07 build. It told me it wasn't compatible, and if I tried to force upgrade, it got stuck in a boot-loop.

Trying to upgrade from Cudy's 18.06 build, it told me that it's not a supported format. Stock firmware did much the same. TFTP flashing seemed to reject it as well, falling back to its previous firmware.

Unfortunately I don't have any debugging tools to see why it would boot-loop.

Thanks for testing.
I've corrected flash partittioning and updated image.
Now archive contain corrected for 19.07.3 version dts-file too.
Can you check again?

I tried the new firmware image you released, and it doesn't seem to work either. It gave no error when trying to flash it this time. Instead of boot-looping, it looks like it hangs during startup? Here's a video of the lights. The SYS light blinks for a while, then stops. The computer never gets a DHCP address. Is there any way to debug it further without a serial console?

Just to make sure I have it right, this is how I'm flashing the firmware:
Starting with factory firmware, I flash Cudy's own 19.07 build (which fills the entire flash, they added too much) via the web interface. Then, once that is running, I flashed your new build in LuCI, telling it not to keep any settings.

Thanks again!

It's good! Firmware start correctly. But (sorry, my fault) there is wrong internal switch configuration.
I've corrected switch config and enabled wifi by default (SSID "OpenWrt w/o password in both bands).

Yes. It's the simplest way of loading new openwrt firmware.

The archive is updated. Check again, pls.

Thanks, it looks like that build works! When I get the chance I'll test everything else out, I'll post back soon.

Pls, check that LEDs work correctly,