Professional Web Applications Themes

Howto compile a kernel from scratch - Linux Setup, Configuration & Administration

Hi, I want to compile a kernel on my own and would like to know how to do that. I dowloaded the sources from kernel.org and extracted them. Do I have to copy them to /usr/src or isnt that necessary? Plz, anyone give me a short summary howto proceed. Greetings, Jost...

  1. #1

    Default Howto compile a kernel from scratch

    Hi,

    I want to compile a kernel on my own and would like to know how to do
    that. I dowloaded the sources from kernel.org and extracted them.
    Do I have to copy them to /usr/src or isnt that necessary?

    Plz, anyone give me a short summary howto proceed.

    Greetings,
    Jost
    Jost Guest

  2. #2

    Default Re: Howto compile a kernel from scratch

    Jost wrote:
     
    [snipped]

    ...."Kernel Howto":
    http://www.tldp.org/HOWTO/Kernel-HOWTO/index.html
    ..
    --
    /// Michael J. Tobler: motorcyclist, surfer, skydiver, \\\
    \\\ and author: "Inside Linux", "C++ HowTo", "C++ Unleashed" ///
    \\\ http://pages.sbcglobal.net/mtobler/mjt_linux_page.html ///
    The Crown is full of it! - Nate Harris, 1775

    mjt Guest

  3. #3

    Default Re: Howto compile a kernel from scratch

    On 4 Oct 2003 08:09:33 -0700, Jost <de> wrote: 

    You don't necessarily have to copy them to /usr/src. The steps are
    outlined in the README, and you definitely should have read at least
    that before posting.

    The real work is reading through Doentation/Configure.help to
    determine which features you want to include/exclude.

    By-all-means, use your current configuration file, probably called
    /boot/config-kernel_version, as a guideline.

    If any of the features are wrong for your new version, then delete that
    line. If it says something you want has been not-chosen, delete that line.
    Then put this edited script in your sources directory as .config and run

    make oldconfig

    as your first step.

    It's easier than you think.

    --
    Later, Alan C
    You can find my email address at the website: contact.html
    take control of your mailbox ----- elrav1 ----- http://tinyurl.com/l55a
    Alan Guest

  4. #4

    Default Re: Howto compile a kernel from scratch

    Hi,

    thanks for your replies.

    I read the HOWTO on TLDP before posting, but it starts with installing
    sources from rpms, and I don't have them. So I thought there might be
    problems if I unpacked the kernel-sources in a different directory. I
    also searched a lot through posts here, but could not a definitive
    guide to compiling a kernel.

    So I will try, according to your explanations.

    Regards,
    Jost

    Alan Connor <yyy> wrote in message news:<ltEfb.1960$news.pas.earthlink.net>... 
    >
    > You don't necessarily have to copy them to /usr/src. The steps are
    > outlined in the README, and you definitely should have read at least
    > that before posting.
    >
    > The real work is reading through Doentation/Configure.help to
    > determine which features you want to include/exclude.
    >
    > By-all-means, use your current configuration file, probably called
    > /boot/config-kernel_version, as a guideline.
    >
    > If any of the features are wrong for your new version, then delete that
    > line. If it says something you want has been not-chosen, delete that line.
    > Then put this edited script in your sources directory as .config and run
    >
    > make oldconfig
    >
    > as your first step.
    >
    > It's easier than you think.[/ref]
    Jost Guest

  5. #5

    Default Re: Howto compile a kernel from scratch

    On 4 Oct 2003 16:14:34 -0700, Jost <de> wrote: 

    [ please bottom-post and trim what doesn't need to be there ]

    It's a kick. Mostly you just sit back and watch everything compile.

    --
    Later, Alan C
    You can find my email address at the website: contact.html
    take control of your mailbox ----- elrav1 ----- http://tinyurl.com/l55a
    Alan Guest

  6. #6

    Default Re: Howto compile a kernel from scratch

    Jost wrote: 

    Unpack the sources then:

    make mrproper
    make menuconfig

    configure for your system and save to an alternate file before
    exiting. Then:

    make dep clean bzImage modules

    You must be root to install:

    make modules_install

    Then you can either install the kernel manually or run:

    make install

    Be sure the new kernel is in grub or lilo.conf depending which
    your system uses. If it uses lilo then be sure to update the MBR
    and watch for any errors.

    # /sbin/lilo -v

    DO NOT remove the old kernel before you know the new one boots
    and works.

    --
    Confucius: He who play in root, eventually kill tree.
    Registered with The Linux Counter. http://counter.li.org/
    Slackware 9.1.0 Kernel 2.4.22 i686 (GCC) 3.2.3
    Uptime: 1 day, 13:12, 1 user, load average: 1.00, 1.05, 1.09

    David Guest

  7. #7

    Default Re: Howto compile a kernel from scratch

    Jost wrote: 

    The configuratin will be different than a RedHat system will expect,
    especially which modules are selected and the naming conventions for the
    kernels. As long as it takes to build a set of kernels, I do prefer
    doing them via some sort of package manager to prevent accidentally
    overwriting an active kernel with one that has different behavior.

    Which OS are you working from? And what are you trying to achieve with
    your own kernel?

    Nico Guest

  8. #8

    Default Re: Howto compile a kernel from scratch

    Thanks, David, that's what I pictured!

    Nico Kadel-Garcia <net> wrote in message news:<com>... 

    I'm working on Mandrake 9.1 at the moment and I'm running it on a
    laptop, so I want ACPI to get to work.
    Jost Guest

  9. #9

    Default Re: Howto compile a kernel from scratch


    "Jost" <de> wrote in message
    news:google.com... 

    for compiling a new kernel on redhat..
    http://mia.ece.uic.edu/~papers/linux/msg00034.html

     


    Shashank Guest

  10. #10

    Default Re: Howto compile a kernel from scratch

    de (Jost) wrote in message news:<google.com>... 

    put kernel pack in ~/src/Kernel/
    unpack
    (cp /boot/config ~/src/Kernel/linux-2.x.xx/.config)
    make xconfig
    make bzImage
    make modules
    make modules_install
    copy vmlinuz, system.map and your new .config to /boot
    modify /etc/lilo.conf
    lilo
    reboot

    Detailed instructions also contained in the INSTALL (or is it README?
    ;) file that comes with the source.
    Xyerp Guest

Similar Threads

  1. howto compile BDI Oracle on windows
    By patrick in forum PERL Modules
    Replies: 2
    Last Post: January 9th, 08:31 AM
  2. Kernel compile
    By Arron in forum Linux Setup, Configuration & Administration
    Replies: 1
    Last Post: July 26th, 07:01 PM
  3. Kernel 2.6.0test1 Mini-HOWTO
    By Marino Fernandez in forum Debian
    Replies: 5
    Last Post: July 23rd, 01:40 AM
  4. kernel compile the debian way
    By Rudy Gevaert in forum Debian
    Replies: 2
    Last Post: July 6th, 10:00 AM
  5. Compile kernel
    By Baho Utot in forum Linux Setup, Configuration & Administration
    Replies: 6
    Last Post: July 1st, 08:04 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139