Closed ghost closed 9 years ago
how's the impact of the changes in cjdelisle/cjdns/pull/616 and cjdelisle/cjdns/pull/617?
We only copy the compiled executables, plus contrib/lua.
We could be more selective with the Lua files, on that note.
Just noticed OpenWrt already compiles cjdns with -Os
There are a couple of instances where cjdns' make.js overrides -O set via CFLAGS/LDFLAGS.
If the PPP support is removed from the build then a 4MB friendly firmware including cjdns and luci-app-cjdns can be built.
3.3M openwrt-ar71xx-generic-whr-hp-gn-squashfs-factory.bin
3.3M openwrt-ar71xx-generic-whr-hp-gn-squashfs-sysupgrade.bin
3.3M openwrt-ar71xx-generic-whr-hp-gn-squashfs-tftp.bin
root@OpenWrt:~# opkg list | grep cjd
cjdns - 0.10-1
luci-app-cjdns - 1.3-1
root@OpenWrt:~# ip6tables -t nat -S
-P PREROUTING ACCEPT
-P INPUT ACCEPT
-P OUTPUT ACCEPT
-P POSTROUTING ACCEPT
Considering the above, the documentation should highlight the support for routers with 4mb flash depend on a bundled firmware build which (in this case) does not include PPP support, kernel symbols, debugfs.. Perhaps meshbox hardware could grab future firmware-sysupgrade images from the buildbot server. Best solution -- getting size of a mips32 cjdroute binary low enough to reside on the /overlay JFFS2 for all firmware.. Giving the user the choice between upgrading the cjdns package, and upgrading their routers firmware.
$ rm -rf build_linux/ && ./do && la -la cjdroute && strip --strip-all cjdroute && ls -la cjdroute
[...]
-rwxrwxr-x 1 lars lars 1612512 Nov 28 07:16 cjdroute
-rwxrwxr-x 1 lars lars 693464 Nov 28 07:16 cjdroute
This, combined with a bit of make.js hackery (https://github.com/lgierth/cjdns/commit/19d21f74b0a9b0dde89b2d22eebf5f01f634c2d7) brings me down to 693464 bytes... not as much as I hoped.
And with the OpenWrt buildroot (i.e. with uClibc) the make.js hackery gets us down from 707496 to 682920.
24.5 KB, at least.
<cjd> -rwxrwxr-x 1 user user 488816 Jan 25 02:46 ./cjdroute
We're at 460 to 520 KB now, depending on the target -- that's 200 KB less. I've also worked on the Lua files a bit, we now have our own copy of only the files we need.
Best solution -- getting size of a mips32 cjdroute binary low enough to reside on the /overlay JFFS2 for all firmware
@wfleurant how close are we to fitting into /overlay? We can certainly remove PPP support from the buildbot's images.
We fit now.
Current, for openwrt-x86_64: 617kb
-rwxr-xr-x 1 root root 617336 Jul 30 09:16 /usr/sbin/cjdroute
cjd suggested a few things: