*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
You know, I used to think it was a good idea to comment out devices when I compiled my *BSD kernels (ignoring the dire warnings from the OpenBSD FAQ), but now I don't bother any more, why?
1.) Because every time the generic kernel config files changes, you either won't get the new changes (because you're using your own custom config, based on an older version) or you'll have to do all your commenting all over again on the new config file. This takes a lot more time than you're saving by shaving off a nanosecond here and there with a smaller kernel.
2.) It doesn't noticably impact performance, only kernel size. The best improvement I got on the OpenBSD kernel (commenting out all the ISA drivers and unneeded CPU types) was roughly a 250Kb savings on the kernel size. Whooopy, 4.8MB vs. 5.0MB (or whatever it was). That's just not worth it.
3.) If anything at all is changed, the OpenBSD developers won't support it (and they're actually removing some of the options that people got into trouble with repeatedly).
4.) Some things rely on each other in unexpected ways. I tried to remove some Sys V memory stuff from my OBSD kernel, but quickly found that X windows wouldn't launch. I put it back, and X worked fine. Also, some special software relies on setting up dummy NFS mounts, so while you might not think you would need NFS server or NFS client built in the kernel, you might after all.
5.) I spoke personally to one of the OpenBSD committers (tedu@) who said the only difference is in the size of the kernel and it has no impact on performance. He runs mostly all generic kernels, except for special testing. If the committers use generic (and they know much more than I do), then it should be fine for everyone.
Commenting things out does have it's place especially if your using the new technology release of Freebsd. Removing some of the debugging and disabling agp are sometimes required to make your nvidia drivers work correctly.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
Yes, but in that case it's because specific things need to be commented out in order to function on certain hardware. That's not the same as just randomly commenting out any devices you don't think you'll need.
The defaults will work in the vast majority of cases, and most people that tweak are doing so for a perceived performance boost, not because they know they need to.
i have a freebsd 5.2 running on HP nx9005. i did a cvsup of all my source trees (/usr/src and /usr/ports) all for the reason that i wanted to have a gnome 2.6 desktop.
it is prettty straightforward "tweaking" (i had to recompile my kernel 'coz i didn't have any need for the extra drivers that the generic kernel had to offer) your system and applications abound in the /usr/ports directory (although some of them are marked as broken).
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296
Rep:
i'm just looking for a little clarity, as i posted a suggestion to recompile the kernel. after reading the entire thread again, i am a little uncertain as to my advice, so my question is, is it considered to be a "numbskull move" so to speak to get sound going by recompiling? i didn't think so since i found it in the handbook. i tried simply loading the proper modules as was suggested in a nother post in this thread, no dice. the feeling i get after reading it again is that recompiling the kernel is not really the accepted way of handling a problem. the only reason i'm concerned is i don't want to give bad advice to someone looking for help.i'm very new to *bsd, and trying to learn, any advice suggestions, clarifications, are welcome. thx for reading.
I would do some more reading, not to go against what Chort is saying as he is very correct in you don't need to recompile the kernel with drivers omitted. But in the FreeBSD world I have read numerous times by some of the very experienced users they always recompile to take out drivers or adjust compile settings. But it isn't necessary.
If you read those 2 articles (one is for 4.*, other is 5.*.*) you will see you don't need to recompile to get sound working. You can load kernel modules that are not compiled in the kernel.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
Just to be clear, compiling to get sound is fine (you're adding something, not removing anything). I intensely dislike kernel modules because I think they're security risks, so I would go with the in-kernel sound driver rather than the module, but that's a personal choice.
What I'm saying you should not do is try to remove devices that you "don't need". It causes way more trouble than it's worth and it gains you NOTHING other than a slightly smaller kernel image (what difference does it make if it's 4.8MB or 5MB? None).
I would do some more reading, not to go against what Chort is saying as he is very correct in you don't need to recompile the kernel with drivers omitted. But in the FreeBSD world I have read numerous times by some of the very experienced users they always recompile to take out drivers or adjust compile settings. But it isn't necessary.
If you read those 2 articles (one is for 4.*, other is 5.*.*) you will see you don't need to recompile to get sound working. You can load kernel modules that are not compiled in the kernel.
Last edited by Marble on 06-17-2004 at 08:59 PM
just to be clear, possibbly something was not installed, as i'm new to bsd, but trying to load modules did not work for me, maybe it's an unusual card or set up etc. the modules loaded fine, the makedev script was returning errors, in any event the recompile went fine, and i've had no problems w/sound since. thank you for the informative reading.
Quote:
Just to be clear, compiling to get sound is fine (you're adding something, not removing anything). I intensely dislike kernel modules because I think they're security risks, so I would go with the in-kernel sound driver rather than the module, but that's a personal choice.
What I'm saying you should not do is try to remove devices that you "don't need". It causes way more trouble than it's worth and it gains you NOTHING other than a slightly smaller kernel image (what difference does it make if it's 4.8MB or 5MB? None).
thx for clearing that up, as i stated before the bsd is new for me, and i don't want to give bad advice to someone else.
Originally posted by RHLinuxGUY I've been eyeing freebsd, for some reasons. Are u saying thers no SOUND drivers for any sound card at all. If this is true, why?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.