world leader in high performance signal processing
Trace: » porting_applications

Porting Applications to uClinux

Most Linux applications can or already be ported to uClinux. uClinux itself comes with a lot of open source applications. And many big projects like Mplayer, Xmame, Asterrisk, QT, Linphone have been ported to uClinux.

There are a few main aspects in porting Linux application to uClinux:

API difference

uClinux applications can use almost any of the Linux APIs. For most applications the only impaction is that uClinux doesn’t have fork() system call. Instead, uClinux uses vfork(). Making an application use vfork instead of fork usually falls into the absolutely simple or incredibly difficult category. Generally, if the application does not fork and then exec() almost immediately, it needs to be checked carefully before fork() can be replaced with vfork(). Otherwise you can simply replace the fork() calls with vfork().

Memory allocation

Blackfin uClinux supports both power-of-two and non-power-of-two memory allocator. But because there is no virtual memory map, an uClinux application should try not to allocate and free dynamic memory continually, to avoid fragmenting memory

ABI Selection

Another thing is that the FLAT ABI doesn’t support shared library (dlopen, dlsym, dlclose). If you want to use shared library, ELF ABI must be used. See the section on application_binary_interface.

Complete Table of Contents/Topics