Re: question about building a custom kernel

2009-12-19 Thread Robert Huff

ill...@gmail.com writes:

>  You aren't going to gain much in speed or size savings, so
>  do take care to understand what you hope to gain.

While I haven't done even an eyeball check recently, not too
long ago the size savings for an aggressively pruned kernel could be
quite noticable; there was also anecdotal support (waves hand)
forfaster performance.
Barring that?  Every part of the kernel is something that can
possbily go wrong, either by itself or by interacting with another
part; if it isn't there, it can't break.  Now the record on this
really pretty awesome ... on the other hand, I can't argue with the
person who doesn't want to roll those dice.
And compile times of current generation hardware are pretty
short.  On an AMD Phenom II x4 940 (3 ghz) it's 5 minutes, maybe
less.


Robert Huff

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: question about building a custom kernel

2009-12-19 Thread Bruce Cran
On Sat, 19 Dec 2009 14:46:27 -0500
"ill...@gmail.com"  wrote:

> You aren't going to gain much in speed or size savings, so
> do take care to understand what you hope to gain.  If you
> wish to shorten kernel compile times and reduce the size of
> /boot, have a look at the MODULES_OVERRIDE and
> WITHOUT_MODULES variables in /etc/make.conf.  That
> said, good luck, I haven't had any serious problems and I've
> been using custom kernels since FreeBSD 4.1 or so.
> 

While I agree in principle that compiling a custom kernel isn't usually
worth it on modern machines, I recently gained a 65% disk space saving
over GENERIC by bulding a custom kernel. Granted that was achieved
because it's installed on a router with just 128MB RAM so I removed
things like wifi and usb support, opted for "device mii" and added the
PHY drivers I knew were used and added pf support, but it does show that
substantial savings are still possible.  Another reason for building a
custom kernel is to add functionality that isn't available through
modules, such as support for DTrace.

-- 
Bruce Cran
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: question about building a custom kernel

2009-12-19 Thread ill...@gmail.com
2009/12/19 Jamie Griffin :
> Hi
>
> I have been reading the handbook to learn about building a custom
> kernel, but just wanted to ask something about gathering information
> about my hardware before I give it a go.
>
> The handbook suggests the command:
>
> # pciconf -lv
>
> ...which I like because it provides a clear list of components I can find
> out about before I try to build the new kernel.
>
> On my system, this command does print out information for quite a few
> components, I just wondered if this information is all I need to work
> from or is it not an accurate or detailed enough representation of the
> hardware I have in my computer. I'd really appreciate any advice on how
> others go about this.
>

A couple of words of caution, based on the number of mails
sent to this list complaining about "things not working":

Always leave "device scbus" and "device da" in unless you're
dead certain you'll never use a usb drive (& you'll also have
to comment out "device umass" and maybe a couple of others
to make it compile) among other things.

"device miibus" should be left in too, again unless you really
know for certain you don't need it.

You may as well toss in "device drm" and the specific drm
driver for your graphics card while you're going to the trouble.

You aren't going to gain much in speed or size savings, so
do take care to understand what you hope to gain.  If you
wish to shorten kernel compile times and reduce the size of
/boot, have a look at the MODULES_OVERRIDE and
WITHOUT_MODULES variables in /etc/make.conf.  That
said, good luck, I haven't had any serious problems and I've
been using custom kernels since FreeBSD 4.1 or so.

-- 
--
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: question about building a custom kernel

2009-12-19 Thread Roland Smith
On Sat, Dec 19, 2009 at 04:13:09PM +, Jamie Griffin wrote:
> The handbook suggests the command:
> 
> # pciconf -lv 
> 
> On my system, this command does print out information for quite a few
> components, I just wondered if this information is all I need to work
> from or is it not an accurate or detailed enough representation of the
> hardware I have in my computer. I'd really appreciate any advice on how
> others go about this.  

It should provide most of the information that you need. But it shows only for
devices that are connected to the PCI bus! Devices connected to the USB bus
will not show up here (except from the USB controllers). 

If you look at the first line for every device, the one with the @ in it, you
can see if a driver has attached to that device in question. Devices whose
name start with 'none' followed by a number followed by @ do not have a driver
installed.

Another thing you should look for is which modules are loaded, use the command
'kldstat' for that.  

Also have a look at the output of the 'dmesg' command. That will show you
which devices are being detected and initialized. This will also show you what
kind of CPU you have.


Roland
-- 
R.F.Smith   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgpH4xyDqnSZv.pgp
Description: PGP signature


Re: question about building a custom kernel

2009-12-19 Thread Jamie Griffin
On Sat, Dec 19, 2009 at 10:41:14AM -0700, Tim Judd wrote:
 
> Can I ask for more details from you why you're interested in building
> a custom kernel?
 
> --TJ

Thanks for the information Tim. I don't have a specific need to build a
custom kernel at the moment, I really just want to learn how to do it
properly. I'm in my first year at University and we're learning about UNIX
systems so i'm just experimenting really.  

Jamie


pgpGrdHjWpfTZ.pgp
Description: PGP signature


Re: question about building a custom kernel

2009-12-19 Thread Tim Judd
On 12/19/09, Jamie Griffin  wrote:
> Hi
>
> I have been reading the handbook to learn about building a custom
> kernel, but just wanted to ask something about gathering information
> about my hardware before I give it a go.
>
> The handbook suggests the command:
>
> # pciconf -lv
>
> ...which I like because it provides a clear list of components I can find
> out about before I try to build the new kernel.
>
> On my system, this command does print out information for quite a few
> components, I just wondered if this information is all I need to work
> from or is it not an accurate or detailed enough representation of the
> hardware I have in my computer. I'd really appreciate any advice on how
> others go about this.
>
> Jamie
>

Jamie,

pciconf will list pci devices only (and their derivatives, like PCI-X
and PCI-e).  ISA devices (if any) are done differently, and also usb
devices (usbdevs).  Building a custom kernel most of the time involves
the following decisions:
  embedding a firewall, so you cannot disable a firewall by unloading a module.
  Extending options, filesystem quotas for example.  The modular
kernel can add devices by modules, but can't really add options.
  Embedded solutions, like a single-purpose unit that is an all-in-one
solution.  The soekris and PC Engines firewall products come to mind.

99% of my time, I leave GENERIC (makes updating it easier with
freebsd-update) alone and load the kernel modules I need.

the amount of ram used with a GENERIC kernel and a "stripped" kernel
to your hardware may save 2MB of disk, and 1MB of RAM.  Not very worth
it for the computers today where you have TB's of disk, and GB's of
ram.


Can I ask for more details from you why you're interested in building
a custom kernel?

--TJ
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


question about building a custom kernel

2009-12-19 Thread Jamie Griffin
Hi

I have been reading the handbook to learn about building a custom
kernel, but just wanted to ask something about gathering information
about my hardware before I give it a go. 

The handbook suggests the command:

# pciconf -lv 

...which I like because it provides a clear list of components I can find
out about before I try to build the new kernel.

On my system, this command does print out information for quite a few
components, I just wondered if this information is all I need to work
from or is it not an accurate or detailed enough representation of the
hardware I have in my computer. I'd really appreciate any advice on how
others go about this.  
 
Jamie


pgpvt6DNhLZtC.pgp
Description: PGP signature


Re: Building a custom kernel

2005-01-01 Thread Nikolas Britton
Kövesdán Gábor wrote:
Hi,
I'd like to build a monolithic kernel without loadable module support. I've
also made it on Linux, but I haven't found such howto for FreeBSD. Is there
any opportunity to do this?
 

makeoptions   MODULES_OVERRIDE=""
this will only prevent kernel modules from being build, so it doesn't 
directly address your question.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Building a custom kernel

2004-12-28 Thread Phil Schulz
Kövesdán Gábor wrote:
I'd like to build a monolithic kernel without loadable module support. I've
also made it on Linux, but I haven't found such howto for FreeBSD. Is there
any opportunity to do this?
this doesn't answer your question directly but you can disable 
(un-)loading of modules during runtime if you set the securelevel to sth 
>= 1.

afaik, there are some things which only work as modules so disabling 
modules might not be a good idea. acpi is one of them, i believe.

hth,
phil.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Building a custom kernel

2004-12-28 Thread Kövesdán Gábor
Hi,

I'd like to build a monolithic kernel without loadable module support. I've
also made it on Linux, but I haven't found such howto for FreeBSD. Is there
any opportunity to do this?

Thanks,

Gabor Kovesdan

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"