Hi Josh,<br><br>Sorry for being unclear.  By 'uhttpd binding' I had mean using uhttpd as the ultra-small HTTP server that it is, to respond to requests sent to ports 80 and 443, but have commotiond serve a collection of HTML forms for the mesh admin UI.<br>
<br>Indeed, since the OpenWRT build process already offers the option to pre-compile luci/lua scripts into bytecode for reduced flash and CPU load, I'm curious if more dramatic pre-compiling / stripping of luci could be possible to produce to <i>just</i> the bare essentials needed for commotiond, and possibly <i>less</i> than what OpenWRT considers a minimal luci installation.  See below for reference:<br>
<a href="http://wiki.openwrt.org/doc/howto/luci.essentials#minimalistic.offline.installation">http://wiki.openwrt.org/doc/howto/luci.essentials#minimalistic.offline.installation</a><br><a href="http://trac.fonosfera.org/fon-ng/wiki/lua">http://trac.fonosfera.org/fon-ng/wiki/lua</a><br>
<br>Furthermore, I'm still assuming zram will also be handy to optimize RAM usage on 16MB memory devices.  (Maybe 32MB devices too?)<br><br>If these methods are effective in pruning down the image size, a neat goal would be to retain openssl support for tunnelling, etc.  A recent update to trunk and AA now offloads some of the SSL computation to hardware on ath9k 24kc platform.<br>
<a href="https://dev.openwrt.org/changeset/33531/trunk/package/openssl">https://dev.openwrt.org/changeset/33531/trunk/package/openssl</a><br><br>Independent of all this, Fabfi looks pretty cool:<br><a href="http://fabfi.fabfolk.com/techsummary/">http://fabfi.fabfolk.com/techsummary/</a><br>
<a href="http://code.google.com/p/fabfi/wiki/HowToMake">http://code.google.com/p/fabfi/wiki/HowToMake</a><br><br><div class="gmail_quote">On Wed, Feb 27, 2013 at 12:51 PM, Josh King <span dir="ltr"><<a href="mailto:jking@chambana.net" target="_blank">jking@chambana.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm reluctant to incorporate an http server into the daemon directly;<br>
seems to be adding a lot of complexity for not much benefit. I'm not<br>
sure what you mean by uhttpd bindings, if by that you mean some<br>
mechanism that will further reduce the size. I am currently working on<br>
ubus bindings, through which the daemon could potentially communicate<br>
with uhttpd.<br>
<div class="HOEnZb"><div class="h5"><br>
On Wed 27 Feb 2013 01:46:39 PM EST, Ben West wrote:<br>
> This is exactly the approach Open Mesh has taken with their proprietary NG<br>
> firmware, i.e. a closed-source daemon to do all the mesh/dashboard<br>
> housekeeping stuff.  The NG images hardly weigh in at 2MB now.<br>
><br>
> I've taken several stabs at trying to prune down previous iterations of<br>
> Commotion (i.e. pre DR1) to 4MB, while retaining the luci web UI, by having<br>
> the luci sources compressed or pre-compiled, by removing IPv6 support, and<br>
> by lots of other little snips and cuts to extraneous packages, but so far<br>
> no luck.<br>
><br>
> Both luci and openssl support seem to guarantee the images will be larger<br>
> than 4MB.  If you are to the point of writing a daemon in C, it may also<br>
> become worthwhile to either incorporate a very basic HTTP server into that<br>
> daemon (which is what coovachilli does) or incorporate bindings to uhttpd.<br>
> Probably the latter could be done with reasonable effort.<br>
><br>
> On Wed, Feb 27, 2013 at 12:04 PM, Josh King <<a href="mailto:jking@chambana.net">jking@chambana.net</a>> wrote:<br>
><br>
>> Yes, and even the Fonera 2100 still has 8MB of flash. The image would<br>
>> actually have to pruned down to something significantly less than 4MB<br>
>> in order to accomodate the JFFS2 partition in additon to the squashfs<br>
>> one. So we're actually looking at something closer to 2-3MB. We'll see<br>
>> how small we can get it, and having so much more of it as C binaries<br>
>> should hopefully make it more compact, but my feeling is that it will<br>
>> probably turn out that 4MB of flash is just too small to be able to<br>
>> support. Anyway, we'll see how it turns out once we have AA-based<br>
>> testing images.<br>
>><br>
>> On Wed 27 Feb 2013 12:44:20 PM EST, Ben West wrote:<br>
>>> I don't have any current versions of the 'minimal' ath5k-based Commotion<br>
>>> images, besides those listed below:<br>
>>><br>
>>><br>
>> <a href="http://info.gowasabi.net/commotion-openwrt/openwrt/bin/atheros-ar2315-minimal/" target="_blank">http://info.gowasabi.net/commotion-openwrt/openwrt/bin/atheros-ar2315-minimal/</a><br>
>>> Circa OpenWRT r31693, from Summer last year<br>
>>><br>
>>><br>
>> <a href="http://info.gowasabi.net/commotion-openwrt-new/openwrt/bin/atheros-ar2315-minimal/" target="_blank">http://info.gowasabi.net/commotion-openwrt-new/openwrt/bin/atheros-ar2315-minimal/</a><br>
>>> Like above, but with a newer kernel and compat-wireless library<br>
>> backported<br>
>>><br>
>>> All of these imageshould have the root pwd pre-set to r0ot56c0MM0t10N .<br>
>>><br>
>>> The only image I tested successfully were the older of the two version<br>
>>> listed above, on a FONera 2100.  Still, I have posted the config file I<br>
>>> used to build both versions, so that you can try building your own.<br>
>>><br>
>>><br>
>> <a href="http://info.gowasabi.net/commotion-openwrt/openwrt/atheros-ar2315.minimal.config" target="_blank">http://info.gowasabi.net/commotion-openwrt/openwrt/atheros-ar2315.minimal.config</a><br>
>>><br>
>> <a href="http://info.gowasabi.net/commotion-openwrt-new/openwrt/atheros-ar2315.minimal.config" target="_blank">http://info.gowasabi.net/commotion-openwrt-new/openwrt/atheros-ar2315.minimal.config</a><br>
>>><br>
>>> Please note the ath5k (aka atheros) images will not run on a WRT54G<br>
>>> (brcm47xx-based) or on the TP-Link (ath9k-based).<br>
>>><br>
>>> It should be straightforward (although tedious) to prune down the current<br>
>>> package set for DR1 Commotion to get a ~4MB sized image in squashfs.<br>
>>> Although, you would likely have to axe potentially useful features, e.g.<br>
>>> IPV6 support or Luci web UI.<br>
>>><br>
>>> Also, do be mindful of the RAM limitation for older devices like a<br>
>> WRT54G,<br>
>>> which has only 16MB of memory.  The recent incorporation of the zram<br>
>>> package into OpenWRT trunk may allow operation on such RAM-bound devices,<br>
>>> but to date I have *not* been able to run the v3.x kernel reliably on<br>
>> these<br>
>>> units.  And the OpenWRT dev team also doesn't expect it to,<br>
>> unfortunately.<br>
>>><br>
>>> On Wed, Feb 27, 2013 at 10:40 AM, Chris Ritzo <<a href="mailto:chris.ritzo@gmail.com">chris.ritzo@gmail.com</a>><br>
>> wrote:<br>
>>><br>
>>>> This post in the commotion-dev archives has info about minimal images<br>
>> that<br>
>>>> Ben West compiled. This might be useful for the TP Link routers or<br>
>> others<br>
>>>> with lower system resources.<br>
>>>><br>
>>>><br>
>> <a href="https://lists.chambana.net/pipermail/commotion-dev/2013-January/001001.html" target="_blank">https://lists.chambana.net/pipermail/commotion-dev/2013-January/001001.html</a><br>
>>>><br>
>>>><br>
>>><br>
>>><br>
>>><br>
>>> _______________________________________________<br>
>>> Commotion-discuss mailing list<br>
>>> <a href="mailto:Commotion-discuss@lists.chambana.net">Commotion-discuss@lists.chambana.net</a><br>
>>> <a href="https://lists.chambana.net/mailman/listinfo/commotion-discuss" target="_blank">https://lists.chambana.net/mailman/listinfo/commotion-discuss</a><br>
>><br>
>> --<br>
>> Josh King<br>
>><br>
>> "I am an Anarchist not because I believe Anarchism is the final goal,<br>
>> but because there is no such thing as a final goal." -Rudolf Rocker<br>
>><br>
>><br>
><br>
><br>
<br>
--<br>
Josh King<br>
<br>
"I am an Anarchist not because I believe Anarchism is the final goal,<br>
but because there is no such thing as a final goal." -Rudolf Rocker<br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Ben West<div><a href="http://gowasabi.net" target="_blank">http://gowasabi.net</a><br><a href="mailto:ben@gowasabi.net" target="_blank">ben@gowasabi.net</a><br>
314-246-9434<br></div>