Using release ATH79 19.07.0 kernel and packages on hardware modded TP-Link WR703N (16MB/64MB) without SNAPSHOT compilation

It is done.
This thing is working. (I think, even the ART partition was came back, i have wifi.)

Made a few changes in the generic and common tp-link definition file. (added 16M definition).
Factory image was built. (Not tested by me.)
Sysupgrade image was bulit. (Personaly i used this, after a "failed" openwrt-ath97-sysupgrade.)

http://s000.tinyupload.com/index.php?file_id=63999568473426190687

Thank you!

Had one problem:
In the definition file i added luci, but it was compiled without it (?why?), had to add trought ssh.

I'm glad that all works fine for you. Not all definition files are used during ImageBuilder work. You should add required packages through command line. Example

make image PROFILE=tplink_tl-wr1043nd-v1 PACKAGES="luci luci-ssl"

Put Like to topic post, if you wish.

1 Like

Dear Tarask1n,

I am planing to refresh https://openwrt.org/toh/tp-link/tl-wr1043nd "Flash Mod" section regarding the new ATH79 target informations. (no overlay autoresize, ATH79 build instructions, ect)

My question is:
When new/updated openwrt version came out to the device (1043NDv1/ATH79), how can the user get/produce the 16M modified kernel?

@keleticsaba, I'll write the similar 'kernel_patcher' script for 1043ND devices on weekend. Great that you could confirm what that method works for other devices. I'm thinking about some universal solution script, but I'm not sure that we will have big enough amount of volunteers who can test that approach on other devices.

1 Like

I have discovered a much universal way to generate kernel with modified device tree as described here.

@Tarask1n, could you scriptify this rather than making your script device specific?

@Hirsupp The way you proposed requires linux kernel re-compilation. It requires much more resources. My way is much more simpler just patch kernel without any compilation.

@keleticsaba As I promised the script for TP-Link wr1043nd v1:
tl_wr1043nd_v1_kernel_patcher

taras@taras-VirtualBox:~/openwrt_extender$ python3.8 wr1043v1_kernel_patcher.py tplink_tl-wr1043nd-v1-kernel.bin 
2020-02-08 08:32:23,446 INFO TP-Link WR1043 v1 Openwrt kernel DTS partition resizer v 0.9
2020-02-08 08:32:23,449 INFO Processing kernel image file: tplink_tl-wr1043nd-v1-kernel.bin
2020-02-08 08:32:23,449 INFO Build info:  MIPS OpenWrt Linux-4.14.167
2020-02-08 08:32:23,449 INFO Kernel ofs:  0x00001e40
2020-02-08 08:32:23,449 INFO Kernel size: 0x00185868
2020-02-08 08:32:23,449 INFO Extracting kernel...
2020-02-08 08:32:23,455 INFO Decompressing kernel...
2020-02-08 08:32:23,619 INFO Decompressed kernel size: 0x004c6d88
2020-02-08 08:32:23,619 INFO Resizing kernel DTS...
2020-02-08 08:32:23,622 INFO Found DTS partition table at: 0x004c63c4
2020-02-08 08:32:23,622 INFO Compressing kernel...
2020-02-08 08:32:26,295 INFO Compressed kernel size: 0x00185869
2020-02-08 08:32:26,296 WARNING Re-compressed kernel is bigger than original.
2020-02-08 08:32:26,296 INFO Assembling new image...
2020-02-08 08:32:26,297 INFO Done

Thank You!

I am trying to replicate the method, but (i have to confess) i am a bit of noob in linux/openwrt.
(And my goal is to make an "Avarage Joe" howto to the openwrt 1043 wiki.)
On ubuntu bionic, updated pyton3 to 3.8 using snap update ... no problemo. (evaded shity ppa's)

But i am in trouble with the recommended lzma utility "LZMA 4.65 : Igor Pavlov".
The one I found is on sourceforge/7zip (version 4.65 is popular), but it is MS .exe and source files.
Could you help a bit?

Seting the env value is not that complicated as i googled.

where is the origin dts to modify if compile from source?

@keleticsaba I suggested the LZMA SDK is used from that repository LZMA SDK 4.65 with patches from here OpenWrt LZMA SDK patches.

Originally I cloned OpenWrt current repository and make menuconfig. In this case you can find the LZMA utility by path ~/openwrt/build_dir/host/lzma-4.65/CPP/7zip/Compress/LZMA_Alone/lzma_alone/lzma

1 Like

@youxiaojie You can find DTS description at OpenWrt repository OpenWrt ath79 dts. Look for your corresponding model description file <your_router_model>.dtsi

Success!
Now, next week I can update the wiki.
The hardest part for a beginner is to compile the openwrt patched lzma utility.
... so many missing package

1 Like

19.07.2 Tplink tl-wr703n 16/64Mb

Can't get work my modded wr703n 16/64Mb. After flashing your firmware I get fast blinking led. Laptop can't get ip from router via ethernet, so I can't get connection with it. Same result with image and kernel 19.07.0, 19.07.1, 19.07.2 patched by myself or from attachments.
So I try to make my own patch for compiling from source of official repository:

diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi b/target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi
index 2bacd08245..e821eab264 100644
--- a/target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi
+++ b/target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi
@@ -67,12 +67,12 @@
 
 			partition@20000 {
 				compatible = "tplink,firmware";
-				reg = <0x20000 0x3d0000>;
+				reg = <0x20000 0xfd0000>;
 				label = "firmware";
 			};
 
-			art: partition@3f0000 {
-				reg = <0x3f0000 0x10000>;
+			art: partition@ff0000 {
+				reg = <0xff0000 0x10000>;
 				label = "art";
 				read-only;
 			};
diff --git a/target/linux/ath79/image/tiny-tp-link.mk b/target/linux/ath79/image/tiny-tp-link.mk
index c533de3f4c..96d6664df6 100644
--- a/target/linux/ath79/image/tiny-tp-link.mk
+++ b/target/linux/ath79/image/tiny-tp-link.mk
@@ -160,7 +160,7 @@ endef
 TARGET_DEVICES += tplink_tl-wa901nd-v2
 
 define Device/tplink_tl-wr703n
-  $(Device/tplink-4mlzma)
+  $(Device/tplink-16mlzma)
   SOC := ar9331
   DEVICE_MODEL := TL-WR703N
   DEVICE_PACKAGES := kmod-usb-chipidea2

All works great but not usb. Can't get usb flash drive or 4g modem working.. Even led on them is not blinking... Any suggestions?

1 Like

@Tarask1n
Would you make please the script for a 16/64MB TL-MR3020 please.
Another thing, would you also please post the exact ram memory you used to mod/upgrade your router.

@knightrider007
Sorry for delayed reply, exactly I used Hynix HY5DU121622CTP-J desoldered from laptop SO-DIMM DDR 512Mb 4 chip module.

I used Hynix HYMD532646CP6J-D43 desolder from PC DDR (PC3200 256Mb 400MHz) with 4 chips on one side.

Tested
Hynix HY5DU121622DTP-D43 (Mustang DDR-SODIMM 512Mb)
Hynix HY5DU121622CTP-D43 (Hynix SODIMM DDR-PC2700S-25330 512Mb DDR 333 CL 2.5, 400 MGz marked with "D43").
Infineon HYB25D512160BE (Infineon DDR-SODIMM 512Mb)

Not tested:
PC400 HY5DU121622DTP-D43-C Hynix
PC400 H5DU5162ETR-E3C Hynix
PC400 K4H511638G-LCCC Samsung
PC400 K4H511638J-LCCC Samsung
PC400 A3S12D40ETP-G5 Zentel
PC400 NT5DS32M16BS-5Т Nanya
PC400 P3S12D40ETP-GUTT Mira
PC333 MT46V32M16TG-6T:F Micron
PC333 MT46V32M16P-6T:F Micron
PC333 EDD5116ADTA-6B-E Elpida
PC333 HYB25D512160CE-6 Qimonda
PC333 HYB25D512160CEL-6 Qimonda
PC333 HYB25D512160DE-6 Qimonda

19.07.3 TP-Link TL-WR703N 16/64 Mb

1 Like

Hi,

Any chance of someone sharing a 19.07.4-16Mb-enabled compiled image for WR703N?
I get LZMA errors trying to apply this patch to compile my own image.

Regards.

1 Like

Hi,

I succeed with patching kernel using @Tarask1n script and build an images.

Patched kernel - https://www.sendspace.com/file/dzdm2b
Images - https://www.sendspace.com/file/l8wpoz

Note that images are built with following package options

make image PROFILE=tplink_tl-wr703n PACKAGES="uhttpd luci luci-ssl"
1 Like