[uClinux-dev] some guidelines

David McCullough davidm at snapgear.com
Fri Nov 9 04:15:42 EST 2001


Jivin Thomas Andrews lays it down ...
[...]
> 
> Thanks David, that's really useful info.
> 
> If a package (say net-snmp v3) needed to be ported, what typically are the 

For a start there are a couple of snmp packages in the coldfire sources.
The ucdsnmp support v3 to some extent at least ;-)

As for porting, usually changing fork to vfork, making sure that it
isn't doing anything nasty after the fork that will break it (read the
man page on vfork for details).

Remove any daemonising code and then use something like init/inetd to launch
the program if it's a server or just background it from /etc/rc.

Then you can setup the Makefiles (run configure with params/edit them later
etc),  for the coldfire sources make sure CFLAGS, LDFLAGS and LDLIBS are
used and only added to (setting them to new values looses important
settings).

Most apps require a some header tweaks or the addition of header files to
'C' source.  Under uClinux a lot of common functions are implemented as
macros to save code size,  so without the correct header you get
unresolved symbols on linking.

Finally you need to get the stack size right,  usually if a newly ported
app is crashing your OS or just acting weird,  it because it has blown the
stack.  The m68k-elf-tools get this from the FLTFLAGS environment variable.
The default stack size is 4K.

> difficulties that one experiences. Is it that the applications make library 
> calls that are not supported, or is it just a matter of "tweaking" until it 
> compiles ok. (Loading at run-time is a mystery to me, but I'll get to that).

For most part it's fairly easy,  especially if the app is a well behaved
user app.   I find the biggest problems occur when the apps rely on kernel
headers or kernel interaction that fixing the include problems can be quite
a challenge, although porting these to any platform, uClinux or not,  will
be difficult.

For a lot of apps you just have to mess with config.h and Makefiles until it
builds ;-)

The best thing to do it gets your hands dirty and try it out ;-)

Cheers,
Davidm
-- 
David McCullough:    Ph: +61 7 3435 2815  http://www.SnapGear.com
davidm at snapgear.com  Fx: +61 7 3891 3630  825 Stanley St., W'gabba QLD 4102, Oz
This message resent by the uclinux-dev at uclinux.org list server http://www.uClinux.org/



More information about the uClinux-dev mailing list