R7800 image fails to compile - uImage too big

Hi,

While waiting for my R7800 delivery I'm trying to compile LEDE image for it.
Basically only Adblock included on top of the base config for R7800.
Same config compiles ok for my WNDR3700.

Getting following error at the very end of whole compilation after which it fails.
WARNING: Image file /home/gram/r7800/source/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x/R7800-uImage is too big

There was one mail in LEDE-DEV mailing list by Ben Greer on the same issue for R7800 but no responses for that.
http://lists.infradead.org/pipermail/lede-dev/2016-October/003674.html

Any clue what's wrong ?

[edit] That R7800 compilation generates lede-ipq806x-vmlinux.elf image and the size 26M is huge compared to same WNDR3700 image of lede-ar71xx-generic-vmlinux.elf with 5M.
26683020 Nov 11 21:48 lede-ipq806x-vmlinux.elf

Br,
-Gram-

Have you started the .config from scratch?

(you are not starting from an old WNDR3700 .config file? As they have different target architecture, wifi drivers etc, trying to continue from WDNR3700 .config may produce some weird settings.)

LEDE buildbot seems to build ipq806x ok, so it is likely something in your buildhost and/or .config
http://phase1.builds.lede-project.org/builders/ipq806x%2Fgeneric

I have built and flashed my R7800 a bit over 260 times with different LEDE versions, and I have not seen that error. I currently use Ubuntu 17.10 x64 in Virtualbox as the buildhost.

Hi @hnyman,

Yes, scratch compilation for R7800, I have a separate build directory for R7800.
Using Fedora 26 64bit in VMware player for building images.

Same package selection works for my WNDR3700 compilation.

I'll try to compile just basic R7800 without any modification in menuconfig to see how it goes.

Br,
-Gram-

Hi,

After adding menuconfig parameters one at the time found the below parameter under kmod-mac80211 is the one causing the "uImage too big" issue.
[*] Enable tracing (mac80211 and supported drivers)

Same parameter compiles ok for WNDR3700.

Anyhow not needing that. Just a habit to add all the debug/tracing related inside.

Br,
-Gram-

That's because of 2mb kernel size limit.
https://github.com/dissent1/r7800/commit/18b149dbbcd744fad7dd35f7e45bc9b559eda8ef
This commit will make images incompatible with lede download site but allow bigger kernel size

Any particular reason why it's limited to 2MB ?

The stock firmware uses 17 blocks by 128k as max kernel size


It was made according to that on all netgear ipq806x devices. But now it comes to an understanding that higher kernel size is needed, but it is going to cause backwards compatibility issues - ppl won't be able to sysupgrade because of different partition layout.
If someone makes a workaround sysupgrade script that checks kernel part size and cuts sysupgrade image and pads it to different kernel and rootfs layout - then I guess it's good to push it upstream.

Ok, thanks for explanation.
I guess I'll live with the limitation but good to know there's a workaround if ever needed.