Re: kernel compile error

From: Danny Pansters (danny_at_ricin.com)
Date: 02/29/04

  • Next message: Jerry M. Howell II: "Re: ps2 optical wheel mouse problems"
    To: rfa@msumain.edu.ph
    Date: Sun, 29 Feb 2004 18:57:22 +0100
    
    

    [CC'd to -questions so that it gets archived]

    On Sunday 29 February 2004 04:56, you wrote:
    > > Never run "make world" literally. Run make buildworld, make kernel, make
    > > installworld, mergemaster.
    > >
    > >> Or is it possible that my GENERIC file is wrong?
    > >
    > > Yes, you edited too much out. This is a FAQ:
    > >> #device scbus # SCSI bus (required for SCSI)
    > >> device umass # Disks/Mass storage - Requires scbus
    > >> and
    >
    > i dont have any SCSI devices. Is it still needed? Can you give me
    > specific instructions to clean my slate and start over from the
    > buildworld part?

    It's needed because USB disks work through the SCSI interface, that is as if
    they were SCSI disks.

    > IS there a howto that is very detailed that you have?

    The Handbook. Apart from that, for kernel options and devices you can look
    at /usr/src/sys/conf/NOTES for architecture independent stuff,
    and /usr/src/sys/i386/conf/NOTES for specific i386 kernel options and other
    knobs. In 4.x this used to be the LINT file.

    > btw, i did the thing the other guy said to do....
    >
    > cd /usr/src/sys/i386/conf/
    > edited GENERIC file
    >
    > couldn't find
    > cd ../compile/GENERIC [i typed it as you wrote, didnt work, so i went into
    > ../compile and #ls but no files....

    This is often (wrongly) referred to as "the old method" to build a kernel.
    You'll use configure, make depend, make install if you want to compile a
    custom kernel against your installed version ("world") of FreeBSD.

    The often (wrongly) called "new method" is make kernel KERNCONF=BLAH
    from /usr/src. Now you are building a kernel against what's in your object
    tree (/usr/obj). Normally it will be have been populated when you did a make
    buildworld. You're going to install that version (world) later on, so you'll
    want a kernel that is built against this "future world" and with its
    toolchain. The difference seems subtle, but if you don't do this, you may
    find yourself with an unbootable kernel after you've run installworld, or a
    kernel that boots but a userland that gives you nothing but coredumps if it
    doesn't panic at init right away.

    Of course you can have a situation in which your object tree holds the same
    "world" that you're currently running and it is in that case and in that case
    only that you can safely use either method to build a custom kernel.

    To be fair, you can get away with using the wrong kernel build method if
    there's only minor differences between the currently installed and the newly
    built worlds if you're lucky but still it may cause certain quirks and
    instabilities that are quite impossible to pin down. Things like seemingly
    random panics or reboots that never get explained.

    > so i went into
    > #cd /usr/src and then
    > make clean && make depend && make && make install

    I think this effectly translates to running "make world".

    > and it worked out. could i work with that?? or should i do a clean slate
    > reinstall?

    Well, I wouldn't recommend making it into a habit but if you got your bootable
    system with kernel and world from the same codebase ("in sync" as they say)
    and it runs OK, then just stick with it.

    Please note that if all you want is to rebuild your kernel without updating
    FreeBSD itself, you don't have to cvsup or make world at all. Just use the
    so-called "old method". Also, in that case you only need the kernel source
    which you can simply extract from your install CD manually or with
    sysinstall.

    FreeBSD kernels are not versioned, the whole FreeBSD OS is. Cvsup and building
    world is moving to another version and in that case the kernel you build
    while going through your updating procedure should match that OS version.
    With Linux, the kernel *is* seperately versioned and the rest of a
    distribution can be considered something like our ports. So it's different
    concepts and it seems to never cease confusing the heck out of people :)

    HTH,

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


  • Next message: Jerry M. Howell II: "Re: ps2 optical wheel mouse problems"

    Relevant Pages

    • FreeBSD 6.2-PRERELEASE on an Apple Mac Pro
      ... I got an Apple Mac Pro to play with. ... I tried to install FreeBSD and succeeded to a high degree of usefulness ... Then I tried to boot a FreeBSD 6.1-STABLE CD from Jun 5 2006. ... Jan 4 11:16:25 kernel: The Regents of the University of California. ...
      (freebsd-stable)
    • Re: FreeBSD 6.0 Released: problem with HP Pavillion
      ... > Unfortunately i couldn't booted with any version of FreeBSD on HP ... > It always reboots while loading kernel. ... install a vanilla chunk of hardware when installing *BSD. ...
      (freebsd-current)
    • PLIP transmit timeouts -- any solutions?
      ... I currently have a PLIP link to an old laptop running Linux (I tried to ... install FreeBSD, but it freezes at the USB detection -- yes, I tried ... FreeBSD desktop. ... I'm running 5.1-R on the FreeBSD system and a 2.4.18 Linux kernel as is ...
      (freebsd-current)
    • Re: After install - Fatal trap 18 ATA problem?
      ... FreeBSD 6-STABLE installed a few months ago on this very ... install 6.1 too. ... integer divide fault while in kernel mode ... Could you see using gdb what C code is at ad_describe+0x1b3 ...
      (freebsd-current)
    • Re: After install - Fatal trap 18 ATA problem?
      ... I did have FreeBSD ... The install goes just fine. ... integer divide fault while in kernel mode ... Could you see using gdb what C code is at ad_describe+0x1b3 ...
      (freebsd-current)