I have TL-WR1043ND v1 modded to 16Mb Flash (and 64MB ram).
As "ar71xx uses dynamic partition table in case of your device which is no longer available in ath79 target".
Can your "kernel_patcher.py" script file to be used with my device?
What I found:
1043nd is by default: $(Device/tplink-8m), no lzma
i can make a $(Device/tplink-16m) definition and use it in the .mk configuration, but
i "think" this way the script is not compatible.
In case of your router it is not so simply as in case with WR703N. Your router has precompilled loader in kernel module + OpenWrt kernel packed with lzma. You should not replace 16m with 16mlzma and vice versa, because it is a different technology of forming kernel module. If you familiar with restore the bricked router I will spend some time to analyze how the kernel module is packed and write other script for your model.
Unpack ImageBuilder - tar xvf openwrt-imagebuilder-19.07.1-ath79-generic.Linux-x86_64.tar.xz
Download, rename and replace kernel image (~/openwrt-imagebuilder-19.07.1-ath79-generic.Linux-x86_64/build_dir/target-mips_24kc_musl/linux-ath79_generic/tplink_tl-wr1043nd-v1-kernel.bin) tplink_tl-wr1043nd-v1-kernel_19.07.1_16mb
Replace $(Device/tplink-8m) with $(Device/tplink-16m) in image definition file
Build your own image make image PROFILE=tplink_tl-wr1043nd-v1
Crossfingers
P.S. I've got no factory image was built when I replaced $(Device/tplink-8m) with $(Device/tplink-16m).
But if I leave default $(Device/tplink-8m) I successfully build an image. Try it anyway.
taras@taras-VirtualBox:~/openwrt-imagebuilder-19.07.1-ath79-generic.Linux-x86_64$ ls -la build_dir/target-mips_24kc_musl/linux-ath79_generic/tmp/
total 11612
drwxr-xr-x 2 taras taras 4096 feb 3 22:26 .
drwxr-xr-x 4 taras taras 20480 feb 3 22:20 ..
-rw-r--r-- 1 taras taras 8126464 feb 3 22:26 openwrt-19.07.1-ath79-generic-tplink_tl-wr1043nd-v1-squashfs-factory.bin
-rw-r--r-- 1 taras taras 3735822 feb 3 22:26 openwrt-19.07.1-ath79-generic-tplink_tl-wr1043nd-v1-squashfs-sysupgrade.bin
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.)
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"
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.
@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.
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.
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
@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
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:
@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.