To view parent comment, click here.
To read all comments associated with this story, please click here.
Yes, from a single source tree.
But it is useless to have nothing but a kernel. You will have a much harder time getting a uniform source tree for the standard userland (UNIX-like) programs, and having that compile on all platforms resulting in a system that is equal on all platforms.
NetBSD has all that, and it can be done with the build.sh command, without having to fiddle with cross-platform compilers (the build infrastructure takes care of that).
I am not saying that it is not possible with GNU/Linux. But no one that I know of has created such build infrastructure. I guess no one is interested in doing it either, since most obscure older platforms are barely used (pc532, cesfic et al).
Last time I counted, Linux supports nearly 2 dozen CPU architectures, and NetBSD about 16 or 17. Exact numbers depend on exactly how you define a CPU architecture (eg. bit-ness, endian-ness, mmu capabilities).
I won't argue with that. I guess that it is a difference of using 'portability' in a narrow or wide sense
.
>But it is useless to have nothing but a kernel. You will
That's not true at all. It is a great building block for anyone from mainframes, to firmware (yes Linux does run some service controllers and firmware in servers), to any number of embedded applications and appliances.
>have a much harder time getting a uniform source tree
>for the standard userland (UNIX-like) programs, and
>having that compile on all platforms resulting in a
>system that is equal on all platforms.
No harder than changing the source tree of your NetBSD userland, or having a program portable between versions of BSD, or other versions of UNIX, etc.
>NetBSD has all that, and it can be done with the
So does an equivalent Linux system, eg. Debian.
>build.sh command, without having to fiddle with >cross-platform compilers (the build infrastructure >takes care of that).
The build infrastructure rebuilds the toolchain. This is really not a lot of difference to installing the correct cross compiler and build environment on a system like Debian.
>I won't argue with that. I guess that it is a
>difference of using 'portability' in a narrow or wide
>sense
.
A properly written application has basically zero portability problems between architectures when compared with a kernel. I don't consider application level 'portability' to even be worth mentioning, seeing as it is a solved problem since the 70s.
Actually the one userland thing that is needed is a compiler. NetBSD and Linux both use gcc to meet their portability requirements.
Which is a pointless observation, given that Linux probably has 50 times as many users as NetBSD! The question is, if both architectures had the same amount of developer resources, which would be easier to port?
As a programmer, I like the NetBSD code better. It's cleaner, has better seperation of components, and its abstractions are more well-defined.





Member since:
>>It should be suprising for many that Linux actually has
>>been ported to and runs on more platforms that any
>>other OS including NetBSD
>
>But not from one source tree, including equal userland
>on each platform. On NetBSD you can cross-compile to any
>supported platform with only one command, and you will
>get a fully functional kernel and userland without
>additional patches, etc.
Yes, from a single source tree. Last time I counted, Linux supports nearly 2 dozen CPU architectures, and NetBSD about 16 or 17. Exact numbers depend on exactly how you define a CPU architecture (eg. bit-ness, endian-ness, mmu capabilities).
However, Linux is definitely more widely ported than the NetBSD kernel.