Cannot build image with modified kernel options (preemption, dynamic printk, profiling).
Kernel grows in size and partition is only 1344k. Kernel image is 1.41Mb
What can be done with that ?
I guess its all to preserve original parition scheme used by stock firmware ?
For Dlink DIR-825B2 also such problem existed but if normal build fails at least we have -fat image which can be flashed after normal.
Image Name: MIPS LEDE Linux-4.4.91
Created: Thu Oct 12 21:40:27 2017
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 1465129 Bytes = 1430.79 kB = 1.40 MB
Load Address: 80060000
Entry Point: 80060000
......
os-image partition too big (more than 1376256 bytes): Success
Pls correct me if i'm wrong. stock U-boot has hardcoded values for kernel partition location and size. Reads kernel from there. If we increase kernel partition size u-boot will not read full image and kernel will crash
Yes, its layout of special tplink image format used by their proprietary firmware upgrader.
Initial firmware uploaded via web interface must be in tplink factory format.
But afterwards, when we already have openwrt there.
Is it possible to change layout ?
In this device flash must be memory mapped. U-boot does not load anything, it just passes control to preconfigured address (may be some additional logic apply, I dont know).
Why not abandon tplink layout if stock firmware is not going to be ever used ?
Partitions do not exist on hardware level. Its abstraction used by linux kernel. Kernel takes partition locations and sizes are from hardcoded cmdline.
What stops us from changing parts as we want ?
The only 2 things that should be kept are u-boot+possibly its config fata and ART.
Believe me, this image is going to stop compile when 4.9 kernel is adopted for ar71xx. It always grows in size and will be moment when even with default options it won't fit
It would be reasonable to always build -fat image with our layout even regular fails. Then we first flash small temporary -factory and sysupgrade to -fat
@bolvan
In theory, image build script can take kernel length at a build time and calculate partitions layot on the next step. Can try to implement such behaviour in a makefile. Will be in my TODO list @pepe2k Is there anybody working on moving ar71xx target to dts?