Jim Stewart wrote:
> Buddy Smith wrote:
>
>> In comp.arch.embedded Markus Meng <[email protected]> wrote:
>> <snip>
>>
>>> This would make it possible to run standard
>>> unix like Linux (MMU required) ...
>>
>>
>>
>> FYI:
>> Linux is not unix. Also, linux does not require an MMU.
>> http://www.uclinux.org
>
> Is uclinux the same as Linux? I thought the kernel
> and the executables were considerably different.
99% of the kernel code is identical. From 2.6 onwards, uClinux (ie
nommu) support is integrated into Linus' root source tree. For 2.4
kernels, uClinux is a patch that *adds* to Linux, nothing is removed.
In the microblaze port for example, we take drivers written by
MontaVista for the PPC/V2Pro kernel, and drop them in directly. Some
small modifcations are required usually due to differences in kernel
configuration mechanisms, not fundamental architectural issues.
From an application programming perspective, much of the time apps are
source compatible between linux and uClinux. I recently took some ntp
(network time protocol) tools and had then running on my microblaze
uClinux board in under half an hour. No source code changes required.
nommu means no fork(), you use vfork instead. Many Linux/Unix programs
use the sequence fork()/exec() - this is easily ported to vfork. Other,
more complex uses can be a bit trickier. pthreads works on uClinux
platforms.
uClinux uses a different executable file format (called flat binaries),
rather than ELF. However, the build environment and tools automatically
handles the creation of these files. Once your board has booted, they
are just executables, same as any other.
Read the following excellent article by Dave McCullough if you'd like to
learn more about the differences (and lack thereof):
http://www.linuxjournal.com/article.php?sid=7221
Regards,
John