Find the answer to your Linux question:
Results 1 to 6 of 6
i need a description of each step of compiling a linux kernel,for example what changes happen after issuing make modules_install, where can i find these details?...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2011
    Posts
    3

    Wink Kernel Compiling in Details


    i need a description of each step of compiling a linux kernel,for example what changes happen after issuing make modules_install, where can i find these details?

  2. #2
    Administrator jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    5,023
    Hello and Welcome!

    A quick Google search yields these results: compiling Linux kernel

    I'm assuming that this is not a homework question, correct? Those are expressly against Forum Rules.
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to private messages asking for Linux help. Please keep it on the public boards.

  3. #3
    Just Joined!
    Join Date
    Oct 2011
    Posts
    3
    i know how to search in google jayd512,but the results are not in depth,they just say type make then make module blah blah.
    i can compile the kernel with just typing a sequence of "make this make that make ****" but i want to know what happens behind the scenes,what new files are created and where,and it is not a homework.

  4. #4
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,307
    When you do a 'make', the kernel and modules are built in the source directory, unless you specified O=/some/other/dir, in which case they're built there.

    When you do a 'make modules_install install', the modules get installed to /lib/modules/<KERNEL_VERSION> and the kernel gets copied to /boot/vmlinuz-<KERNEL_VERSION>. If you built an initrd it will get copied to /boot/initramfs-<KERNEL_VERSION>.img or /boot/initrd-<KERNEL_VERSION>.img, depending on your kernel version. The grub config file (/etc/grub.conf, /boot/grub/menu.lst, etc.) is also modified to include this new kernel entry. And 'depmod -a' is called, I think, to update the modules auto-loader config file in /lib/modules/<KERNEL_VERSION>/modules.dep file.

    Is this what you mean?
    Last edited by atreyu; 10-03-2011 at 02:00 PM. Reason: typos!

  5. #5
    Just Joined!
    Join Date
    Oct 2011
    Posts
    3
    Yes, thanks alot atreyu,one more question,where did you find this information?!

  6. #6
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,307
    Some from the kernel source documentation...

    Code:
    linux-<KERNEL_VERSION>/README
    some from the Makefile itself...

    Code:
    linux-<KERNEL_VERSION>/Makefile
    and some from other online searching for answers to the same question.

Posting Permissions

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