[sloved]How to build 8M image for tl-wr841n

I have a tl-wr841n V8 router, I want to build lede for it. But the source only can build 4M image, if the size is over 4M will get message "images are too big...."
But my router has 8M flash and 64M Memory , I want to build 8M image for it, how can I compile it?

I am not familiar with that specific device, but likely you need to do some research, modify source code, and then re-compile the firmware. The flash size is rather deeply in the firmware binaries, so there is no way to avoid recompiling.

These old forum discussions may help you. They concern other TP-Link devices, so depending on the exact architecture, target etc., the needed steps for your device might be similar. The links are to Openwrt forum and links in messages point to rather old source code, but similar source files are also in the current LEDE.
https://forum.openwrt.org/viewtopic.php?pid=300283#p300283
https://forum.openwrt.org/viewtopic.php?id=43785

edit the target/linux/ar71xx/image/tp-link.mk
search for v8 and instead of $(Device/tplink-4mlzma) try $(Device/tplink-8mlzma)

2 Likes

I found this in Makefile
define Device/tl-wr841n-v8
$(Device/tplink-4mlzma)
BOARDNAME := TL-WR841N-v8
DEVICE_PROFILE := TLWR841
TPLINK_HWID := 0x08410008
and I've changed the $(Device/tplink-4mlzma) to $(Device/tplink-8mlzma) ,but still can't build the image successly

Thanks for your help, I rebuild image, remove some unnecessary package, the image size reduce to 7.2M,it's work now.

thanks, I solved it