freifunk-berlin / firmware

DEPRECATED: Build system for Berlin firmware. Please user the pinned falter-repos instead
https://berlin.freifunk.net
GNU General Public License v3.0
74 stars 34 forks source link

reduce size of firmware #92

Closed cholin closed 10 years ago

cholin commented 10 years ago

Right now our firmware is really big with 4.2MB. I talked to @stargieg and he recommended the following options:

What do you think about disableing these DEBUG flags? Moreover it would be cool to be able to have multiple package lists (see https://github.com/freifunk-berlin/firmware/issues/39 ).

booo commented 10 years ago

What do you mean by "reduce coverage of busybox binaries"?

I suggest we create a branch and compare the size to builds from the master branch. If the change is significant we shold disable flags and maybe reduce coverage of busybox binaries.

I don't think we should target 4mb routers if this means we have to drop features, e.g. usefull binaries.

cholin commented 10 years ago

I removed the debug flags in https://github.com/freifunk-berlin/firmware/tree/configs/remove_debug_flags. Let's see how much we would save with this.

booo commented 10 years ago

No real improvement as far as I can see:

http://buildbot.berlin.freifunk.net/buildbot/unstable/ar71xx/250/ http://buildbot.berlin.freifunk.net/builders/ar71xx/builds/250

http://buildbot.berlin.freifunk.net/builders/ar71xx/builds/251

cholin commented 10 years ago

You are comparing the wrong builds. Removing debug symbols saved us around 100kB but by removing the OpenSSL-broken patch the binary size increased. Maybe this is related to: https://www.mail-archive.com/openwrt-devel@lists.openwrt.org/msg26293.html

3dfxatwork commented 10 years ago

Hi the first comment suggests to remove the CONFIG_KERNELDEBUG* with includes CONFIG_KERNEL_DEBUG_FS, but batctl depends on DEBUG_FS. You can try with 'batctl o' without DEBUG_FS selected.

cholin commented 10 years ago

At the moment the following packages are installed:

~# opkg list-installed
6in4 - 17-1
alfred - 2014.3.0-0
base-files - 156-r42554
batctl - 2014.2.0-1
busybox - 1.22.1-2
collectd - 4.10.8-3
collectd-mod-exec - 4.10.8-3
collectd-mod-interface - 4.10.8-3
collectd-mod-iwinfo - 4.10.8-3
collectd-mod-load - 4.10.8-3
collectd-mod-network - 4.10.8-3
collectd-mod-olsrd - 4.10.8-3
collectd-mod-ping - 4.10.8-3
collectd-mod-rrdtool - 4.10.8-3
community-profiles - 2
dnsmasq - 2.71-4
dropbear - 2014.63-2
firewall - 2014-08-11a
freifunk-berlin-dhcp-defaults - 0.0.1-1
freifunk-berlin-firewall-defaults - 0.0.1-1
freifunk-berlin-freifunk-defaults - 0.0.1-1
freifunk-berlin-network-defaults - 0.0.1-1
freifunk-berlin-olsrd-defaults - 0.0.1-1
freifunk-berlin-openvpn-files - 0.0.1-1
freifunk-berlin-uhttpd-defaults - 0.0.1-1
freifunk-common - 1
freifunk-firewall - 3
freifunk-policyrouting - 7
freifunk-watchdog - 8
fstools - 2014-06-22-e0430f5c62f367e5a8e02755412977b02c3fc45e
hostapd-common - 2014-06-03-1
ip - 3.15.0-1
ip6tables - 1.4.21-1
iptables - 1.4.21-1
iptables-mod-conntrack-extra - 1.4.21-1
iptables-mod-filter - 1.4.21-1
iptables-mod-ipopt - 1.4.21-1
iw - 3.15-1
iwinfo - 51
jshn - 2014-08-04-dffbc09baf71b294185a36048166d00066d433b5
jsonfilter - 2014-06-19-cdc760c58077f44fc40adbbe41e1556a67c1b9a9
kernel - 3.10.49-1-40babeb4ce50a2b4aa78c421ebc7739e
kmod-ath - 3.10.49+2014-05-22-1
kmod-ath9k - 3.10.49+2014-05-22-1
kmod-ath9k-common - 3.10.49+2014-05-22-1
kmod-batman-adv - 3.10.49+2014.2.0-1
kmod-cfg80211 - 3.10.49+2014-05-22-1
kmod-crypto-aes - 3.10.49-1
kmod-crypto-arc4 - 3.10.49-1
kmod-crypto-core - 3.10.49-1
kmod-crypto-crc32c - 3.10.49-1
kmod-crypto-hash - 3.10.49-1
kmod-gpio-button-hotplug - 3.10.49-1
kmod-ifb - 3.10.49-1
kmod-ip6tables - 3.10.49-1
kmod-ipip - 3.10.49-1
kmod-ipt-conntrack - 3.10.49-1
kmod-ipt-conntrack-extra - 3.10.49-1
kmod-ipt-core - 3.10.49-1
kmod-ipt-filter - 3.10.49-1
kmod-ipt-ipopt - 3.10.49-1
kmod-ipt-nat - 3.10.49-1
kmod-ipt-nathelper - 3.10.49-1
kmod-iptunnel - 3.10.49-1
kmod-iptunnel4 - 3.10.49-1
kmod-ipv6 - 3.10.49-1
kmod-lib-crc-ccitt - 3.10.49-1
kmod-lib-crc16 - 3.10.49-1
kmod-lib-crc32c - 3.10.49-1
kmod-lib-textsearch - 3.10.49-1
kmod-mac80211 - 3.10.49+2014-05-22-1
kmod-ppp - 3.10.49-1
kmod-pppoe - 3.10.49-1
kmod-pppox - 3.10.49-1
kmod-sched-connmark - 3.10.49-1
kmod-sched-core - 3.10.49-1
kmod-sit - 3.10.49-1
kmod-slhc - 3.10.49-1
kmod-tun - 3.10.49-1
libblobmsg-json - 2014-08-04-dffbc09baf71b294185a36048166d00066d433b5
libc - 0.9.33.2-1
libgcc - 4.8-linaro-1
libip4tc - 1.4.21-1
libip6tc - 1.4.21-1
libiwinfo - 51
libiwinfo-lua - 51
libjson-c - 0.11-2
libjson-script - 2014-08-04-dffbc09baf71b294185a36048166d00066d433b5
libltdl - 2.4-1
liblua - 5.1.5-1
liblzo - 2.08-1
libncurses - 5.9-1
libnl-tiny - 0.1-3
liboping - 1.6.2-1
libpolarssl - 1.3.8-1
libpthread - 0.9.33.2-1
librrd1 - 1.0.50-2
librt - 0.9.33.2-1
libubox - 2014-08-04-dffbc09baf71b294185a36048166d00066d433b5
libubus - 2014-07-03-f688c7ad0b2435a89bfd13f5496cabf596b54c8f
libubus-lua - 2014-07-03-f688c7ad0b2435a89bfd13f5496cabf596b54c8f
libuci - 2014-04-11.1-1
libuci-lua - 2014-04-11.1-1
libustream-polarssl - 2014-03-25-fc0b5ec804ee43c532978dd04ab0509c34baefb0
libxtables - 1.4.21-1
lua - 5.1.5-1
luci-app-ffwizard-berlin - 0.0.1-1
luci-app-olsr - svn-r10528-1
luci-app-olsr-services - svn-r10528-1
luci-app-owm - 0.4.9
luci-app-owm-ant - 0.4.9
luci-app-owm-cmd - 0.4.9
luci-app-owm-gui - 0.4.9
luci-app-statistics - svn-r10528-1
luci-base - svn-r10528-1
luci-i18n-german - svn-r10528-1
luci-lib-httpclient - svn-r10528-1
luci-lib-json - svn-r10528-1
luci-lib-luaneightbl - svn-r10528-1
luci-lib-nixio - svn-r10528-1
luci-mod-admin-full - svn-r10528-1
luci-mod-freifunk - svn-r10528-1
luci-theme-bootstrap - svn-r10528-1
mtd - 20
mtr - 0.85-1
netifd - 2014-09-08-46c569989f984226916fec28dd8ef152a664043e
odhcp6c - 2014-08-25-0300fe7589a1701361735ac068e4b57bb1a1896f
odhcpd - 2014-08-23-24452e1e3e9adfd9d8e183db1aa589f77727f5a7
olsrd - 0.6.6.2-4
olsrd-mod-arprefresh - 0.6.6.2-4
olsrd-mod-dyn-gw - 0.6.6.2-4
olsrd-mod-jsoninfo - 0.6.6.2-4
olsrd-mod-nameservice - 0.6.6.2-4
olsrd-mod-watchdog - 0.6.6.2-4
openvpn-polarssl - 2.3.4-1
opkg - 9c97d5ecd795709c8584e972bfdf3aee3a5b846d-7
ppp-mod-pppoe - 2.4.6-2
procd - 2014-07-30-35e01a9601292b2f609e65c2ddb3990cba8f378e
px5g - 1
qos-scripts - 1.2.1-6
rrdtool1 - 1.0.50-2
swconfig - 10
tc - 3.15.0-1
terminfo - 5.9-1
uboot-envtools - 2014.04-4
ubox - 2014-05-30-c3d4118eee505f41c4d20a87f326479530837569
ubus - 2014-07-03-f688c7ad0b2435a89bfd13f5496cabf596b54c8f
ubusd - 2014-07-03-f688c7ad0b2435a89bfd13f5496cabf596b54c8f
uci - 2014-04-11.1-1
uhttpd - 2014-08-25-dabd7dea6445aaa0e5b8d9add1872fa7393b3a85
uhttpd-mod-tls - 2014-08-25-dabd7dea6445aaa0e5b8d9add1872fa7393b3a85
uhttpd-mod-ubus - 2014-08-25-dabd7dea6445aaa0e5b8d9add1872fa7393b3a85
wpad-mini - 2014-06-03-1
zlib - 1.2.8-1
booo commented 10 years ago

Maybe we can get rid of dnsmasq? Do we need the pppoe stuff? Do we need all tunneling stuff, e.g. sit? Do we need 6in4? Do we need batman, alfred, batctl in the standard image? There is already a ticket for freifunk-watchdog. Do we need collectd-mod-exec?

I don't think we should put to much effort into this topic. People should by proper hardware!

cholin commented 10 years ago

I removed some debug flags and stripped the firmware in 122e9cd69832e7ae1d096193ad08c4cea237e784, d12cbf0bfd0c79240a8d1fe4733d3650e416e3e9 and fe7f412cd8c65a21ab69cdd9253dddab57af36e6 (DEBUG_FS support is still available). Moreover I integrated a switch for package lists. We now have two vpn packages lists one default and one for 4MB devices. See https://github.com/freifunk-berlin/firmware/blob/master/profiles/ar71xx.profiles and https://github.com/freifunk-berlin/firmware/tree/master/packages.