kernel building question - BSD

This is a discussion on kernel building question - BSD ; I've got to be missing something. I'm building a custom kernel, for the first time on a new 6.2 install. with _everything_ I want/need specified via 'option' and/or 'device' lines in the config file (along with appropriate 'hints' in the ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: kernel building question

  1. kernel building question

    I've got to be missing something.

    I'm building a custom kernel, for the first time on a new 6.2 install. with
    _everything_ I want/need specified via 'option' and/or 'device' lines in the
    config file (along with appropriate 'hints' in the hints),

    'make buildkernel KERNCONF={mumble}' has been running for *more*than*six*hours*
    on a Pentium 1 200mhz machine -- and is compiling all sorts of stuff tat
    I'm _not_using_ in the custom kernel.

    I've discovered the 'NO_KERNELCLEAN' flag so it won't start over from
    scratch -every- time you build a kernel, but this is bloody ridiculous.
    The _entire_ point of the 'make' facility is to avoid recompiling anything
    that doesn't _need_ to be re-compiled. Yet the distributed makefile, _by_
    _default_ starts off by deleting *EVERY*LAST*OBJECT*FILE*!!!

    Is there _any_ way to get the build process to compile -only- what I need??
    E.g. to _not_ compile the 'wireless' modules when I've removed all the
    wireless support from the kernel? or SCSI disk support on an IDE only
    box or all the Network card drivers that I don't have? or the I2C bus
    support? or the IPv6 stuff?

    My frame-of-reference is compiling BSDi kernels on much smaller hardware.
    (e.g. a '386' box with a '386-to-486' upgrade processor at 25x2 mhz, with
    a whopping -eight- megs of RAM. A custom kernel build took around _7_ minutes
    for a 'router and firewall' box. And produced a monolithic kernel that
    was well under _one_mb_ in size.)


    Are my expectations _that_ far out of line, or is there a real issue here?

    Comments -- including those telling me I'm an idiot -- welcomed.



  2. Re: kernel building question

    Hi Robert, all,

    Robert Bonomi wrote:
    > I've got to be missing something.
    >
    > I'm building a custom kernel, for the first time on a new 6.2 install. with
    > _everything_ I want/need specified via 'option' and/or 'device' lines in the
    > config file (along with appropriate 'hints' in the hints),
    >
    > 'make buildkernel KERNCONF={mumble}' has been running for *more*than*six*hours*
    > on a Pentium 1 200mhz machine -- and is compiling all sorts of stuff tat
    > I'm _not_using_ in the custom kernel.


    It is building kernel modules which you can kldload into working kernel.
    You can choose what to build with MODULES_OVERRIDE variable or disable
    building modules at all with NO_MODULES.

    Have a look at /usr/share/examples/etc/make.conf

    > I've discovered the 'NO_KERNELCLEAN' flag so it won't start over from
    > scratch -every- time you build a kernel, but this is bloody ridiculous.
    > The _entire_ point of the 'make' facility is to avoid recompiling anything
    > that doesn't _need_ to be re-compiled. Yet the distributed makefile, _by_
    > _default_ starts off by deleting *EVERY*LAST*OBJECT*FILE*!!!


    I guess the point of cleaning first is that unexperienced user could
    compile kernel after modifying sources (to get new release for example).
    That way build process won't break unexpectedly. As you wrote, define
    NO_KERNELCLEAN (or NO_CLEAN in general) if you want it that way.

    HTH,

    --
    Karol Kwiatkowski

  3. Re: kernel building question

    In article ,
    Karol Kwiatkowski wrote:
    >Hi Robert, all,
    >
    >Robert Bonomi wrote:
    >> I've got to be missing something.
    >>
    >> I'm building a custom kernel, for the first time on a new 6.2 install. with
    >> _everything_ I want/need specified via 'option' and/or 'device' lines in the
    >> config file (along with appropriate 'hints' in the hints),
    >>
    >> 'make buildkernel KERNCONF={mumble}' has been running for

    >*more*than*six*hours*
    >> on a Pentium 1 200mhz machine -- and is compiling all sorts of stuff tat
    >> I'm _not_using_ in the custom kernel.

    >
    >It is building kernel modules which you can kldload into working kernel.
    >You can choose what to build with MODULES_OVERRIDE variable or disable
    >building modules at all with NO_MODULES.
    >
    >Have a look at /usr/share/examples/etc/make.conf
    >
    >> I've discovered the 'NO_KERNELCLEAN' flag so it won't start over from
    >> scratch -every- time you build a kernel, but this is bloody ridiculous.
    >> The _entire_ point of the 'make' facility is to avoid recompiling anything
    >> that doesn't _need_ to be re-compiled. Yet the distributed makefile, _by_
    >> _default_ starts off by deleting *EVERY*LAST*OBJECT*FILE*!!!

    >
    >I guess the point of cleaning first is that unexperienced user could
    >compile kernel after modifying sources (to get new release for example).
    >That way build process won't break unexpectedly. As you wrote, define
    >NO_KERNELCLEAN (or NO_CLEAN in general) if you want it that way.
    >
    >HTH,



    *BIG* help. NO_MODULES is where I want to start. I _want_ a monolithic
    kernel, *without* loadable module capability. One less security vulnerability
    to worry about that way.

    The full kernel build just finished. 9 hours 58 minutes, 47 seconds.
    I'd hate to think what would have happened if I'd missed a config line
    that some other option/device depended on. And it blew up at the very
    end of things. Add one line to the config, and wait -another- 10 hours
    to find out if that fixed things, or not. ((


    One thing's for sure. I'm -not- going to try a 'buildworld' on this
    dinosaur. Well, maybe at closing time, the day I leave on vacation
    for at least a week.





  4. Re: kernel building question

    On Wed, 21 Mar 2007 23:04:25 +0000, Robert Bonomi wrote:

    > One thing's for sure. I'm -not- going to try a 'buildworld' on this
    > dinosaur. Well, maybe at closing time, the day I leave on vacation
    > for at least a week.


    If you do that, Murphy's Law says the build will halt about two minutes
    after you leave the building... ;-)


  5. Re: kernel building question

    On 2007-03-23, mark south wrote:
    > On Wed, 21 Mar 2007 23:04:25 +0000, Robert Bonomi wrote:
    >
    >> One thing's for sure. I'm -not- going to try a 'buildworld' on this
    >> dinosaur. Well, maybe at closing time, the day I leave on vacation
    >> for at least a week.

    >
    > If you do that, Murphy's Law says the build will halt about two minutes
    > after you leave the building... ;-)


    This also applies for installing from ports. I've learned the hard way to
    always run make config-recursive before running make install clean and
    leaving while ports installs large programs with many dependencies.


    Regards

    --
    _
    //
    _ //
    \\ //
    \\//
    \/

    Eivind E

  6. Re: kernel building question

    Eivind E wrote:
    > On 2007-03-23, mark south wrote:
    >> On Wed, 21 Mar 2007 23:04:25 +0000, Robert Bonomi wrote:
    >>
    >>> One thing's for sure. I'm -not- going to try a 'buildworld' on this
    >>> dinosaur. Well, maybe at closing time, the day I leave on vacation
    >>> for at least a week.

    >> If you do that, Murphy's Law says the build will halt about two minutes
    >> after you leave the building... ;-)

    >
    > This also applies for installing from ports. I've learned the hard way to
    > always run make config-recursive before running make install clean and
    > leaving while ports installs large programs with many dependencies.


    Exactly, and fetch-recursive is nice, too.

    Cheers.

    --
    Karol Kwiatkowski

  7. Re: kernel building question

    In article ,
    mark south wrote:
    >On Wed, 21 Mar 2007 23:04:25 +0000, Robert Bonomi wrote:
    >
    >> One thing's for sure. I'm -not- going to try a 'buildworld' on this
    >> dinosaur. Well, maybe at closing time, the day I leave on vacation
    >> for at least a week.

    >
    >If you do that, Murphy's Law says the build will halt about two minutes
    >after you leave the building... ;-)
    >


    Murphy? MURPHY??!!!!



    Let me introduce you to O'Brien's law:










    Murphy was an optimist!!








    To truly appreciate that, you have to understand the difference between
    an optimist and a pessimist.


    "An optimist, with apologies to Candide, believes that we live in the
    best of all possible worlds.
    A pessimist, on the other hand, is *firmly*convinced* that that is
    the case."




+ Reply to Thread