Kernel size.

sossego

Retired from the forums
When comparing the sizes of Linux and FreeBSD kernels, is this based upon source, build size, or both?
 
The recent news that the Linux kernel is too bloated. I also believe that DutchDaemon on one of these forums mentioned that the kernel is streamlined. The kernel here is about 139M while the Linux kernel source was 312+ megabytes when unpacked.
 
sossego said:
The recent news that the Linux kernel is too bloated. I also believe that DutchDaemon on one of these forums mentioned that the kernel is streamlined. The kernel here is about 139M while the Linux kernel source was 312+ megabytes when unpacked.


Over here we are not yet that advanced to use 139M kernel.
Code:
$ uname -a
OpenBSD oko.gsu.edu 4.6 GENERIC.MP#168 amd64
$ du -h /bsd
7.0M    /bsd

and that is generic kernel we are talking about. I could proably easily trim that to about 1.4M if I have to use
it as live floopy OS.
 
Compiled size is a useless metric, as it depends on how many drivers you include, which compiler you use, which compiler options, etc. With a lot of care, one could probably come up with a bootable kernel under a MB. Is it useful, though?

Lines of Code (LoC) is also a useless measure, as it depends on the coding style used (does { by itself count as a LoC?), the number/length of comments, etc.
 
I should have said that the folder named kernel was of that size, Oko; but, Since I didn't, I can understand your reply. How do I get the same results for FreeBSD as Oko did for OpenBSD?
 
I found it,
Code:
timey# ls -ld /boot/kernel/kernel
-r-xr-xr-x  1 root  wheel  11492703 Nov 21 10:48 /boot/kernel/kernel
I'm guessing now that bloat has less to do with physical size and more to do with how much is added to the kernel.
 
Also, Linux kernel is compressed with gzip(1) by default while FreeBSD not, but it may be compressed with gzip(1) if You wish.
 
Back
Top