IPQ4019: Adding support for TP-Link Deco M5

Hi @Tomer no I do not, but you can always mount the partition in chroot I believe to extra the hash or set a new hash from a working flash. Sometime in the updates they introduced a "locked" root account. Don't know which one.

Havent checked in in a while, but how Is the build from master going? Im still running 22_03 on my test deco, can't create a working master yet, but time is sparse from my side on this topic.

Your device seems to have more partitions.. so you need to add them to the dts file (target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-deco-m5-eu-v3.0.dts) and that might fix your problem.

@Rikbruggink I actually managed to create an image that boots simply by removing certain packages from the kernel instead of changing the partition sizes, but something with the networking is messed up
and the device is not accessible, unfortunately uart isnt working for me either (I can see the boot log but can not send commands).
Regarding the root password, my device is locked, and when booting into recovery the partition is ro and does not allow to make any changes to it so I can't change the password.

[    1.061915] spi-nor spi0.0: en25qh256 (32768 Kbytes)
[    1.066726] 16 fixed-partitions partitions found on MTD device spi0.0
[    1.071634] Creating 16 MTD partitions on "spi0.0":
[    1.077935] 0x000000000000-0x000000030000 : "0:SBL1"
[    1.083234] 0x000000030000-0x000000040000 : "0:BOOTCONFIG"
[    1.088300] 0x000000040000-0x000000050000 : "0:MIBIB"
[    1.093670] 0x000000050000-0x000000060000 : "0:BOOTCONFIG1"
[    1.098709] 0x000000060000-0x0000000c0000 : "0:QSEE"
[    1.104295] 0x0000000c0000-0x0000000d0000 : "0:CDT"
[    1.109570] 0x0000000d0000-0x0000000e0000 : "0:DDRPARAMS"
[    1.113962] 0x0000000e0000-0x0000000f0000 : "0:APPSBLENV"
[    1.119546] 0x0000000f0000-0x000000170000 : "0:APPSBL"
[    1.124860] 0x000000170000-0x000000180000 : "0:ART"
[    1.129917] 0x000000180000-0x000000240000 : "OPAQUE"
[    1.134683] 0x000000240000-0x000000540000 : "0:HLOS"
[    1.139920] 0x000000540000-0x000000d10000 : "0:rootfs"
[    1.144826] 0x000000d10000-0x000000d90000 : "0:APPSBL_1"
[    1.149926] 0x000000d90000-0x000001190000 : "1:HLOS"
[    1.155347] 0x000001190000-0x000002000000 : "1:rootfs"
[    1.199209] ESS reset ok!
[    1.273509] ESS reset ok!
[    1.595234] PHY 0 single test PSGMII issue happen!
[    1.660947] PHY 1 single test PSGMII issue happen!
[    1.924401] PHY0 test see issue!
[    1.928922] PHY1 test see issue!
[    2.016730] ESS reset ok!
[    2.687627] EDMA using MAC@ - using
[    2.687644] e2:64:0f:e8:56:47
[    2.690849] EDMA using MAC@ - using
[    2.690862] a6:3e:2c:60:ba:34
[    2.862948] i2c /dev entries driver
[    2.863211] i2c_qup 78b7000.i2c: using default clock-frequency 100000
[    2.867747] sdhci: Secure Digital Host Controller Interface driver
[    2.871950] sdhci: Copyright(c) Pierre Ossman
[    2.877922] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.885791] NET: Registered protocol family 10
[    2.889731] Segment Routing with IPv6
[    2.892414] NET: Registered protocol family 17
[    2.896118] 8021q: 802.1Q VLAN Support v1.8
[    2.900555] Registering SWP/SWPB emulation handler
[    2.916905] Waiting for root device /dev/mtdblock16...

Partition Table looks the same now, but still, no cigar.
I tried this line: compatible = "denx,fit";
on the HLOS partition, ass well as the 1:rootfs, but this message:

no rootfs found after FIT image in "firmware"

comes after the partition with that line. This last log is with that line commented out...
[edit]
I changed this to 15:
bootargs-append = " root=/dev/mtdblock15";
and got this:

[    2.887853] List of all partitions:
[    2.887903] 1f00             192 mtdblock0 
[    2.887908]  (driver?)
[    2.894323] 1f01              64 mtdblock1 
[    2.894327]  (driver?)
[    2.900914] 1f02              64 mtdblock2 
[    2.900919]  (driver?)
[    2.907341] 1f03              64 mtdblock3 
[    2.907345]  (driver?)
[    2.913854] 1f04             384 mtdblock4 
[    2.913858]  (driver?)
[    2.920383] 1f05              64 mtdblock5 
[    2.920394]  (driver?)
[    2.926874] 1f06              64 mtdblock6 
[    2.926878]  (driver?)
[    2.933383] 1f07              64 mtdblock7 
[    2.933387]  (driver?)
[    2.939910] 1f08             512 mtdblock8 
[    2.939914]  (driver?)
[    2.946404] 1f09              64 mtdblock9 
[    2.946408]  (driver?)
[    2.952932] 1f0a             768 mtdblock10 
[    2.952936]  (driver?)
[    2.959789] 1f0b            3072 mtdblock11 
[    2.959794]  (driver?)
[    2.966370] 1f0c            8000 mtdblock12 
[    2.966374]  (driver?)
[    2.972985] 1f0d             512 mtdblock13 
[    2.972989]  (driver?)
[    2.979582] 1f0e            4096 mtdblock14 
[    2.979586]  (driver?)
[    2.986160] 1f0f           14784 mtdblock15 
[    2.986163]  (driver?)
[    2.992770] No filesystem could mount root, tried: 
[    2.992775]  squashfs
[    2.994926] 
[    3.002131] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,15)

Looking at your logs the from the original firmware boot arguments are :

root=mtd:1:rootfs rootfstype=squashfs rootwait clk_ignore_unused

It doesnt specify the root block at all

I am playing around with this...

	chosen {
		#bootargs-append = " root=/dev/mtdblock16";
		#bootargs = "root=mtd:1:rootfs rootfstype=squashfs rootwait clk_ignore_unused";
		bootargs = "root=/dev/mtdblock15 rootfstype=squashfs rootwait clk_ignore_unused";
		bootargs-append = " rootfstype=squashfs rootwait clk_ignore_unused";
	};

It does do the append part, but won't overwrite the bootargs.

Kernel command line: root=mtd:1:rootfs rootfstype=squashfs rootwait rootfstype=squashfs rootwait clk_ignore_unused

It still is fun to play around with, but I don't get any further...

Hello Everyone, is there a guide for DECO M5 V3.0 US? i want o install openwrt on this

When i try to compile with the Deco-M5 3.0 EU it gives me an error
Im using Debian Buster as OS to compile

make[2]: Entering directory '/home/cbcalica05/openwrt/scripts/config'
make[2]: 'conf' is up to date.
make[2]: Leaving directory '/home/cbcalica05/openwrt/scripts/config'
 make[1] world
 make[2] tools/compile
 make[3] -C tools/flock compile
 make[3] -C tools/xz compile
 make[3] -C tools/sed compile
 make[3] -C tools/tar compile
    ERROR: tools/tar failed to build.
make -r world: build failed. Please re-run make with -j1 V=s or V=sc for a higher verbosity level to see what's going on

make: *** [/home/cbcalica05/openwrt/include/toplevel.mk:230: world] Error 1

also i use this git clone https://github.com/TomerCo/openwrt

Like the message says.. run make V=s and check out which part fails (if you don't see anything try with V=sc).

First of all, thanks to everyone involved in making this possible. I'm currently running OpenWRT 22.03 (built from TomerCo's repo) in 4 different Deco M5 units and I'm pretty happy with the results.

There are two things that slightly bother me, though, and since I have never used OpenWRT before I thought I might ask:

  1. I can only get ~250Mbps/200Mbps via 5GHz even though speedtest-netperf.sh acknowledges speeds of 500Mbps/200Mbps. I tried fiddling with some of the wireless options but to no avail. Can it be the case that the units are just not powerful enough to deliver the full speed to wireless clients? When running the stock firmware they did deliver the 500Mbps/200Mbps just fine, but I'm guessing OpenWRT may add some extra overhead or just not have same-quality drivers?

  2. I tried enabling 802.11r but it doesn't work super-well, as sometimes the client won't migrate between APs until it completely loses signal—but I essentially just ticked the box and set a value for "Mobility Domain", nothing else. Wondering what everyone else's experience with this is.

Thanks in advance!

@bmcustodio I also get the speed reduced via 5GHz, most visibly through the secondary routers in my mesh (where I never get over 30-35Mbps). Per Tomer's comment on post #219 I investigated the wi-fi channels and tried many different alternatives, for no success.

The 802.11r works like a charm for me, much better than stock firmware. In my previous setup, with networks with the same SSID for both 2Ghz and 5Ghz, it was a little bit erratic. When I started out configuration again, keeping only the 5GHz only, it worked well.

What is the correct way to revert to stock firmware? I downloaded the stock firmware at TP-Link site (my unit is 1.1/US, so I downloaded the 1.0 firmware). I renamed it to M5v1_tp_recovery.bin, set the IP of my machine to 192.168.0.66 and uploaded it through TFtp... But the red light always blinks. I read about "stripping" the bootloader and tried to do that, to no success. Is there a catch on reverting to good old TP-Link firmware? Thanks!

@ricardok that's something that I don't know, but with respect to the speed issue one thing that helped greatly, and that I only found out yesterday, was to install and configure irqbalance. I noticed that only one core was being used during a speed test, and that close to 100% CPU was being taken by ksoftirq, and irqbalance apparently helps a lot in distributing that across the three remaining cores. I'm now close to the speed of the stock firmware. Maybe you can try checking if that helps in your case?

1 Like

Hello to all,

Thank you very much for all the effort involved in bringing OpenWRT to the Deco M5. I am facing all the issues regarding interferences with the stock firmware for not beeing able to choose WiFi channels and I also would like to benefit of multiple SSID's for segmenting my home network. The idea is to use the Deco's only as AP's but with the VLAN capabilities to use multiple SSID's like I mentioned.
My devices are the ones from the picture below:

I already managed to flash a xiaomi router with OpenWRT two years ago with all the info available. This time there is compilation involved and I am not at ease with that path yet so I kindly ask, if possible, to someone who already has a complied image, beeing of 19.07 or 22.03 (as per my reading both work, right?) if you could be so kind and provide it to me so that I can try it out, following the flash instructions provided in post 136.

Looking forward for starting this journey.

Thank you very much in advanced for all your help.

Best regards.

Hello again guys,

Tried to give a go to compiling the firmware. I followed the steps suggested by @yugami on post #136 updated with the work from @Tomer release and also following @nielsnl-nielsnl-nl advice in post #210. I have an error that I could not solve

make makeconfig
make[2]: Entering directory '/home/windowsubuntuuser/openwrt/scripts/config'
make[2]: 'conf' is up to date.
make[2]: Leaving directory '/home/windowsubuntuuser/openwrt/scripts/config'
 make[1] makeconfig
make -r makeconfig: build failed. Please re-run make with -j1 V=s or V=sc for a higher verbosity level to see what's going on
make: *** [/home/windowsubuntuuser/openwrt/include/toplevel.mk:230: makeconfig] Error 1

Tried the suggestion with -j1 V=sc and have the following error that I can not solve also:

make makeconfig -j1 V=sc
make[2]: Entering directory '/home/windowsubuntuuser/openwrt/scripts/config'
make[2]: 'conf' is up to date.
make[2]: Leaving directory '/home/windowsubuntuuser/openwrt/scripts/config'
make[1]: Entering directory '/home/windowsubuntuuser/openwrt'
make[1]: *** No rule to make target 'makeconfig'.  Stop.
make[1]: Leaving directory '/home/windowsubuntuuser/openwrt'
make: *** [/home/windowsubuntuuser/openwrt/include/toplevel.mk:230: makeconfig] Error 2

I am using windows and wsl2 running Ubuntu 22.04 LTS. Sorry to ask, but I am little lost right now. Could someone please give me hand with this?

Thank you in advanced for all you help and support.

Best regards.

The command is make menuconfig and not make makeconfig ..

Hello @Tomer ,

Thank you very much for your prompt help.
Tried as you mentioned and at the moment it seems to be compiling and until no no error has appeared. As soon as it finished I report back how it went.
One thing, in post #136 mentiones that we should do this:

go to the dl directory and use 7zip to open firmware-utils-2022-02-28-002cfaf0.tar.xz
double click on the tar file go into the main directory and src
drop in tplink-safeloader.c from openwrt\tools\firmware-utils\src
Click Yes when it asks if you are sure
Click Up 3 times
It will ask if you want to update the archive - hit OK
Close 7zip

I did not do it because the firmware-utils file was dated from 10/2022 so I assumed it was updated, right?

Than you very much for your help.

Best regards.

if you cloned my repository then you dont need to do it as it uses a patched firmware-utils version, you can tell by whether or not a factory.bin file was created for you or not (if you only have sysupgrade one then you didn't used a patched firmware-utils version).

Thanks again for your prompt reply. I did clone your repository so I think I am safe :slight_smile: .

Compilation has finished and I got these files so I guess all good, right?

Thanks again for all your support.

Best Regards.

Yes it seems ok, good luck flashing it