RouterBOOT and image size issues (help needed)

Hi,

I've ported a RouterBoard 493G to ath79 (pull request here) and it all works great except when I come to build a image with LuCI in, as it seems to run into some size related issue.

Image that works (i.e. built without LuCI):

DECIMAL       HEXADECIMAL     DESCRIPTION                                                                                              
--------------------------------------------------------------------------------                                                       
0             0x0             ELF, 32-bit MSB MIPS-I executable, MIPS, version 1 (SYSV)                                                
9532          0x253C          Copyright string: "Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>"                                  
9740          0x260C          LZMA compressed data, properties: 0x6D, dictionary size: 8388608 bytes, uncompressed size: 8396454 bytes 

Image that wont boot (i.e. LuCI added):

DECIMAL       HEXADECIMAL     DESCRIPTION                                                                                             
--------------------------------------------------------------------------------                                                      
0             0x0             ELF, 32-bit MSB MIPS-I executable, MIPS, version 1 (SYSV)                                               
9532          0x253C          Copyright string: "Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>"                                 
9740          0x260C          LZMA compressed data, properties: 0x6D, dictionary size: 8388608 bytes, uncompressed size: 8693713 bytes

The uncompressed size increased by almost 300k and that was enough to halt the boot process at the end of the lzma-loader stage:

RouterBOOT booter 6.41

RouterBoard 493G

CPU frequency: 680 MHz
  Memory size: 256 MiB
    NAND size: 128 MiB

Press any key within 2 seconds to enter setup..
trying bootp protocol..... OK
Got IP address: 192.168.1.104
resolved mac address 00:0E:C6:D9:92:35
Gateway: 192.168.1.10
transfer started .................................. transfer ok, time=2.16s
setting up elf image... OK
jumping to kernel code


OpenWrt kernel loader for AR7XXX/AR9XXX
Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
Decompressing kernel... done!
Starting kernel at 80060000...

I can see there was a recent change to the lzma-loader, and I wonder if I need to adjust it again?

Or perhaps I'm overwriting something else in memory?

Or perhaps this is some Mikrotik hard limit being hit? :frowning:

Thanks.