IPQ4019: Adding support for TP-Link Deco M5

@ts54 - I've used the generic instructions for the build (here: https://openwrt.org/docs/guide-developer/toolchain/use-buildsystem)

@undisputed-seraphim - I gave it a go and used the generated sysupgrade image (via Luci upgrade from 22.03), but it failed to boot afterwards (i.e. reverted to stock/failsafe TP-Link image)


I see. I will try to flash it onto my own devices when I can find the time - kinda busy these couple of days. Anyone who knows the solution, please let me know.

@pawlik13 Please try again but this time remove the top commit (the one where I rearranged some parts of the device tree), see if that solves anything.

I've updated the pull request for tplink-safeloader. This should be near the final revision, I think.


I'm afraid even with removing this commit, it still doesn't produce the -factory image.

Has your build succeed for that?

Okay, Deco-M5 support for firmware-utils has been merged into master, and I will find time to test again shortly


hey everyone, anyone else tested this yet? cheers and thanks for the awesome work!

For my information. To test this I can just clone Openwrt master and apply the two patches from your Deco-M5-rebased-23.05 branch and take the usual compilation steps?

I tried "Deco-M5-rebased-23.05" branch, but like @pawlik13, only the sysupgrade is generated, not the factory one.
It seems to be releated to tplink-safeloader that does not generate the image, I'm currently trying to use the one from last @undisputed-seraphim merged pull request

1 Like

Did you succeed in this?

I used the same branch (M5-rebased-23-05) from @undisputed-seraphim with the firmware-utils from Openwrt master but it didn't produce a factory image.

Unfortunately no.
The new tplink-safeloader fails with "os-image@1 partition too big (more than 4194304 bytes): Success".
I first tried to reduce the size of image by limiting the number of embedded packages, with no success.
Looks like device tree from M5-rebased-23-05 doesn't match with tplink-safeloader : "os-image@1" does not exist in "qcom-ipq4019-deco-m5-v2.dts" file. All my attempts to modify OpenWrt device tree failed with same error.
I'm new to OpenWrt buildsystem, especially device tree, and i don't really know how to hack/debug this.

1 Like

For some reason the Deco M5 does not show up in menuconfig (Cloned @undisputed-seraphim branch) Any pointers how to compile for Deco?

Current workarounds :

  • The "4194304 bytes" issue comes from linux (5.15.127) kernel size being to big: changing compression algorithm makes it fit
  • @undisputed-seraphim rework of device tree prevents from mounting root filesystem on early boot, my current workaround is to re-add ad-hoc root linux boot option

Good news :

  • firmware can be builded, uploaded and booted
  • looks like wireless is working

Bad news :

  • eth0, eth1 are NOT working, i don't know the root cause
  • Currently soldering serial port is mandatory to enable wireless & luci access

source code:

I'm still a newbie on adding device to OpenWRT : Any help would be appreciated :slight_smile:


You can download my current images if you want to help on debug (using serial port)

To make your own minimal build
follow generic build instructions :

  • on clone step : use custom repo (mine for example :innocent: )
  • on checkout step : use custom branch (mine for example :innocent: )
  • on make menuconfig step, select :
    Target System : Qualcomm Atheros IPQ40XX
    Subtarget : Generic
    Target Profile : TP-Link Deco-M5
    enable : LuCI -> Collection -> luci

Dear, thank you all for the hardwork.
@gpapaure you were pretty close. I've been able to build a working solution with VLAN filtering support. I've merged your source with 13.05 of github and used the dts file of @frankveltmans. Made minor correction and it seems to be working.
Both ethernet come up when plugged.
Sources: https://github.com/satarex/openwrt


I have got this working nicely and I even can upload it through tftp without hacking serial. Before I was struggling with ethernet like @gpapaure. Great job!

1 Like

These build is not for the Deco m5 v3 EU correct? It gives a warning before installing. Is there a specific change needed for the V3 version to work with https://github.com/satarex/openwrt branch?

Hi, you need to add the XMC patch from sb0037 to be able to boot the v3 EU version.
With the latest release I'm now also able to get the full network speed on this device.

Can you show me how? Not sure if it needs to be put in before the build or after. (Or what path)

Figured it out. Had to build at least once. Then patch xmc.c in the build_dir. Then build again. Worked out fine!

1 Like