[LEDE-DEV] Build ar71xx / 4MB with IPv6, Luci, OpenVPN (PolarSSL), Command, Watchcat, relay and printk without debug ?

Martin Tippmann mt at i3o.de
Tue Sep 27 15:54:04 PDT 2016


On Tue, Sep 27, 2016 at 8:22 PM, Břetislav Kubesa
<bretislav.kubesa at gmail.com> wrote:
> Hi,
>
> sorry if this is not the right place to ask but there is currently no other
> as for LEDE and do not want to hijack other forum (of Openwrt). I'm trying
> already longer time to build myself a ar71xx variant (MR3020, WA850RE etc.)
> with combination of : IPv6, Luci, OpenVPN (PolarSSL), Command, Watchcat,
> relay and printk without debug,ppp,usb but I'm still little over sized by
> 8000-6000 bytes ;-) Is there some way, can you give me please some
> recommendation ? I don't want to get rid of some key components like mtd,
> uci, do not want really to touch busybox etc. and I have the good reasons
> why to keep the rest eventually.
>
> [mktplinkfw] *** error: images are too big by 6178 bytes
>
> Link to my config : http://pastebin.com/43xKZpif

Just some ideas what else to disable from your config:

CONFIG_DEFAULT_kmod-ledtrig-usbdev=y
CONFIG_DEFAULT_kmod-usb-core=y
CONFIG_DEFAULT_kmod-usb2=y

also as dependency:
CONFIG_PACKAGE_kmod-lib-crc-ccitt=y


If you don't need USB you could disable this. Removing all the USB
modules should give you at least 50k+


CONFIG_DEFAULT_ppp=y
CONFIG_DEFAULT_ppp-mod-pppoe=y
CONFIG_PACKAGE_luci-proto-ppp=y

There is a dependency from Luci on PPP last time I lookeed, you could
probably patch that out.

CONFIG_TARGET_ROOTFS_SQUASHFS=y
CONFIG_TARGET_SQUASHFS_BLOCK_SIZE=256

You could try setting the blocksize to 1024 - this should make a
noticeable difference as squashfs can compress better.

# CONFIG_STRIP_KERNEL_EXPORTS is not set

If you don't need to install  modules later via opkg you try this
option. However this might break something, might work through. This
gives a noticeable gain +100kb IIRC.

CONFIG_PACKAGE_MAC80211_MESH=y

if you don't use 802.11s disabling this option also gives you a few kbytes.


CONFIG_PACKAGE_wpad-mini=y

If you don't need WPA/WPA2 you could also skip this.

CONFIG_PACKAGE_opkg=y

If you never plan to use opkg on these routers you can skip it.

Beyond that it's getting more tricky, you could look into disabling
stuff from busybox but often scripts in base-files depend on it. If
you only ever need support for these devices you could poke around
https://git.lede-project.org/?p=source.git;a=blob;f=target/linux/ar71xx/config-4.4;h=f81a74c0c4ee33598e993cef3cb6586ef22f50c8;hb=HEAD
the ar711x config-4.4 files and disable support and drivers for other
routers, but this brings little gain for the effort - expect not more
than 50kbyte.

regards
Martin



More information about the Lede-dev mailing list