TP-Link WR740N v4 (with increased flash and RAM) - compile latest Openwrt

Hi,

Mainly for educational reasons, I decided to upgrade my old TP-Link WR740N-V4 router to the latest version of OpenWRT. I don't hide that if successful, I might still find some use for it. And I have a few of them...
In the router, I changed the flash to 16MB and the RAM to 64MB.
To the point:
The router was running OpenWRT 18.06.9.
The new flash was programmed using Ch341a (the old flash was read, ART partition was moved to the end to make WiFi work).

Now it's time to build OpenWRT 23.05.3. Below are the steps I took:

git clone https://www.github.com/openwrt/openwrt -b master
cd openwrt
./scripts/feeds update -a
./scripts/feeds install -a

then I edit file ar9331_tplink_tl-wr741nd-v4.dtsi:
changed:

firmware: partition@20000 {
    compatible = "tplink,firmware";
    reg = <0x20000 0x3d0000>;
    label = "firmware";
};

art: partition@3f0000 {
    reg = <0x3f0000 0x10000>;
    label = "art";
    read-only;
};

to:

firmware: partition@20000 {
    compatible = "tplink,firmware";
    reg = <0x20000 0xfd0000>;
    label = "firmware";
};

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

and file tiny-tp-link.mk:
changed:

define Device/tplink_tl-wr740n-v4
  $(Device/tplink-4mlzma)
  SOC := ar9331
  DEVICE_MODEL := TL-WR740N
  DEVICE_VARIANT := v4
  TPLINK_HWID := 0x07400004
  SUPPORTED_DEVICES += tl-wr741nd-v4
endef

to:

define Device/tplink_tl-wr740n-v4
  $(Device/tplink-16mlzma)
  SOC := ar9331
  DEVICE_MODEL := TL-WR740N
  DEVICE_VARIANT := v4
  TPLINK_HWID := 0x07400004
  SUPPORTED_DEVICES += tl-wr741nd-v4
endef

after that I follow rest of the commands:

make menuconfig and set "Target System: ath79", "Subtarget: devices with small flash", "Target Profile: WR-740n v4"
make defconfig
make download
make -j$(nproc)

Sysupgrade and factory images were built successfully.
Using sysupgrade via Luci, I performed a software upgrade without preserving configuration files. Unfortunately, the router didn't boot up (the gear icon kept blinking slowly). I recovered the router by flashing the 18.06.9 backup using Ch341a.

What did I do wrong that the latest OpenWRT image isn't working for this router?
How can I fix the settings to build propper openwrt images?

1 Like