Subject: Re: Enhancing the NetBSD kernel
To: Valentin Pepelea <firstname.lastname@example.org>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
Date: 11/13/1998 14:37:01
>So the question now is, in what respects do these two kernels differ?
>Enhancements were made to the IDE and SCSI drivers, NFS and SMB. They added
>file locking and recovery, case insensitive matching to the filesystem,
>enhanced user/group, etc.
>1. At first glance, the drivers are completely different between the two kernel
> implementation. Even the parameters to functions are different, though the
> function names are identical. Is this correct?
They share recent common ancestry and there's considerable porting
from one system to the other. the details of how auto-configuration
attaches drivers is completely different. Both kernels use the NetBSD
bus_space(9) and bus_dma(9) for accessing chip resources, at least in
newer drivers. FreeBSD has a newer SCSI CAM layer.
>2. Are there any differences between the NFS implementations?
Both are derived from the 4.4bsd NFS. there are different sets of
bugfixes since then. that may be a `no' or a `yes', depending on what
you want to do. experience with FreeBSD will certainly help a great
deal with applying similar changes to NetBSD.
>3. How about the standard disk filesystem?
FFS? Again, as for NFS, both use the 4bsd code with different sets of
bugfixes and additional features (endian-independent-ness, etc).
>4. Are there differences between the lockd implementations?
I dont know what freebsd has. Netbsd doesnt really have a lockd.
there is a daemon which silently discards lockd requests, for
binary-emulation reasons -- some vendor-native software (HP-UX(?))
wont run unless it gets lockd responses. No locking is actually done.
also, there is no client-side support for locking. (this is described
in NetBSD' rpc.lockd(8) manpage.) If FreeBSD has actual, working,
locking support, then that's one big, big difference in the NFS
>While porting an application, I noticed some minor differences that even a
>simple program runs into.
>5. libutil.h on FreeBSD is named util.h on NetBSD. Why?
presumably one camp renamed it from the BSD2NR/4.4BSD-Lite
distributions, and the other didnt...
> Are there other includes
> that have changed names or semantics?
I have no idea. Both systems are POSIX-compliant and both are BSD
based, so for most userlevel software, they should be very close.
>6. the include file /usr/share/mk/bsd.prog.mk includes bsd.sys.mk which adds
> the -Werror compile option. Does it make sense to turn warnings into error
> for general applications? Are user applications not supposed to use
Netbsd decided to turn on -Werror for the `base' NetBSD applications,
to be sure that any compile-time warnings were found and fixed. If
that doesnt' fit your usage, and you want to use bsd.prog.mk, you can
turn off CWARNFLAGS in your Makefile (or equivaently, set it to -Wno-error).