[avahi] Crosscompiling Avahi onto a uClinux system

Lennart Poettering lennart at poettering.net
Tue Feb 12 07:00:28 PST 2008


On Fri, 08.02.08 12:22, Antony Barton (atonyb at msn.com) wrote:

> Hi everyone,

Hi!
  
> I'm a fairly inexperienced linux developer and i have been landed
> the task of implementing zeroconf on our embedded linux 2.4 system
> to provide the name translation service (so we can refer to each
> device - whose ip will invariably be unknown - by name), no other
> functionality is required and i would ideally like to omit for space
> considerations.

It might be quite a challange to make the standard Avahi daemon work
on systems that lack a proper fork(). Noone has done this before,
YMMV.

> Has anyone done this or something similar, and can anyone suggest
> what components of the avahi package would be necessary to achieve
> this? I have investigated bonjour also, but have had difficulties
> cross compiling it and i also get the impression that avahi is a
> more appropriate choice for a linux based system.

Yes, Avahi totally kicks ass ;-)

If you are interested only in the client side of name resolution
(i.e. resolve other names, not having you own stuff registered), than
you can use the legacy mini mdns stack of nss-mdns. 

If you want to have both name lookup and registration available you
probably should invest some time to get avahi working on systems which
lack a proper fork() (patches always welcome) and then disable almost
every "configure" option you can find. That should build quite a compact
daemon binary. And if that's still too large, you can easily write
your own mdns server based on libavahi-core in just 10 lines or
so. (which might actually be a good option anyway, because
then you can skip the fork-issues, because libavahi-core doesn't use
fork, only avahi-daemon which links against it does.)

Using libavahi-core directly is not well documented. If you have
trouble extracting the necessary code from the full avahi-daemon, then
feel free to ask.

lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4


More information about the avahi mailing list