Re: compiling the kernel faster

From: Daniel Molina Wegener (dmw_at_unete.cl)
Date: 10/28/05

  • Next message: M. Warner Losh: "Re: locking in a device driver"
    Date: Thu, 27 Oct 2005 20:36:36 -0300
    To: ray@redshift.com
    
    

       On Thu, Oct 27, 2005 at 05:14:51AM -0700,
       ray@redshift.com wrote:

    > At 04:54 AM 10/27/2005 -0700, kamal kc wrote:
    > | hello everybody,
    > |
    > | i am new to kernel programming.
    > | i am developing a compression/decompression
    > | functionality in the ip layer.
    > |
    > | i want to compile the kernel faster.
    > |
    > | it would
    > | be ok if the kernel doesn't have support for sound
    > | devices, or other devices like scsi,usb etc. because
    > | i would be using the compiled kernel for
    > | network data compression only.
    > |
    > | how could i do that. which source files and where in
    > | the makefiles do i make modifications ????
    > |
    > | thanks for any suggestions
    > |
    > | kamal
    >
    > Kamal,
    >
    > The files you modify to drop stuff out of the kernel are in
    > /sys/i386/conf/ (assuming you are on an Intel platform). Copy
    > the GENERIC file in there to something else (e.g DEVKERNEL),
    > then edit that file.

      That's OK, also can take a look into the NOTES kernel config
    for additional options.

    > Comment out any drivers you don't need using # (check your
    > dmesg output when you boot to see what drivers the OS is
    > loading for your hardware). Don't comment out anything unless
    > it's obviously something you don't need - doublt check the
    > dmesg for stuff like network drivers, hard drive stuff, etc.)
    >
    > Once you comment out the drivers, you will need to re-compile
    > the kernel. Go into /sys/i386/conf/ directory type this:
    >
    > config DEVKERNEL (using the example above)
    >
    > then change into the directory it shows you (should be
    > something like ../compile/DEVKERNEL or something like that)
    > and type this:
    >
    > make depend && make all install clean
    >
    > that will compile the new kernel and leave it in /boot/kernel
    > (it will also backup your old kernel into kernel.old)

      Here are new instructions to compile the kernel.

      Go to the root source directory -- usually /usr/src -- then...

      make buildkernel KERNCONF=DEVKERNEL

      But, before making a new kernel, if you add new devices, edit
    the src/sys/conf/files to add the device properly.

    > go into /boot/kernel/ and type this:
    >
    > strip -s *
    >
    > then reboot using shutdown -r now

      Nope, if you are developing over the kernel _never_ strip the
    symbol table. Do not use the strip command. Instead, use the
    kernel config command flag in the DEVKERNEL config file.

    makeoptions DEBUG=-g

      This will enable symbol tables on the kernel for debugging
    purposes ;)

    > If all goes well, you should boot to the new kernel. You can
    > use the uname -a command to make sure you are on the new
    > kernel okay. If the machine won't boot, you can boot into
    > single user mode and copy the old kernel back in place.
    >
    > An excellent book on the subject is:
    >
    > Absolute BSD: The Ultimate Guide to FreeBSD (Paperback)
    >
    > good luck.
    >
    > Ray

      That's OK
      Also take a look on the FreeBSD Documetation Proyect.

    Regards.

    -- 
     . 0 . | Daniel Molina Wegener
     . . 0 | dmw at unete dot cl
     0 0 0 | FreeBSD Power User
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
    

  • Next message: M. Warner Losh: "Re: locking in a device driver"

    Relevant Pages

    • Linux 2.6.25-rc6: WARNING: at net/ipv4/tcp_input.c:2510
      ... The kernel config is attached. ... # PCI IDE chipsets support ... # Input Device Drivers ...
      (Linux-Kernel)
    • Re: Help with make failure while building custom kernel
      ... Jim Haskell wrote: ... Attached is my kernel config. ... output of the failed "make" command, ...
      (freebsd-questions)
    • 2.6.23-rc1-git10 hangs on boot - needs "acpi=off"
      ... With -git8 I didn't know how to debug the problem, so I used the previous kernel that worked. ... Attached is the kernel config used for 2.6.23-rc1-git10. ... Plamen Petrov, network administrator ... # PCCARD support ...
      (Linux-Kernel)
    • Re: DL 380/G5 with 16G of ram
      ... I have 2 new dl380/G5s which threw the Memory above 4G ignored errors unless i used a PAE kernel. ... my kernel config is below, ... # RAID controllers interfaced to the SCSI subsystem ...
      (freebsd-questions)
    • Re: lost X11 input from kybd-SOLVED!
      ... | rebuild of world and the kernel (without changing my kernel config file ... I have to explain that I start my X11 via startx, ... I found that all my keyboard input ... wemt looking thru my kernel config with an eye towards hackery, ...
      (freebsd-questions)

  • Quantcast