Page 1 of 3 123 LastLast
Results 1 to 10 of 30

Thread: how to compile a kernel without creating a rpm ?

  1. #1

    Question how to compile a kernel without creating a rpm ?

    here is the situation

    our prof wants us to make some measurable changes in the kernel as a part of our assignment. I'm new to linux (started using linux only day b4 yest)... till now i've built a new kernel using cloneconfig and ended up with a rpm package (since i couldnt find any other option).. .and here's the prob

    1. how to make changes in the kernel code?
    2. do i have to create an rpm everytime after a change? (it jus takes too long )

    the deadline is on 18.4.2011... i would really appreciate ur help.

    ps: i've installed opensuse 11.3.

  2. #2
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: how to compile a kernel without creating a rpm ?

    On 2011-04-14 09:36, Vidya89 wrote:
    >
    > here is the situation
    >
    > our prof wants us to make some _measurable_changes_ in the kernel as a
    > part of our assignment. I'm new to linux (started using linux only day
    > b4 yest)... till now i've built a new kernel using cloneconfig and ended
    > up with a rpm package (since i couldnt find any other option).. .and
    > here's the prob


    The sequence is:

    cd /usr/src/linux
    make cloneconfig <- just once.

    make menuconfig <-- apply your changes

    make
    make modules
    make modules_install install (modifies grub)


    More: read /usr/src/linux/README.SUSE

    > 2. do i have to create an rpm everytime after a change? (it jus takes
    > too long )


    No, but then you can only create one kernel variation.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.2 x86_64 "Emerald" at Telcontar)

  3. #3

    Default Re: how to compile a kernel without creating a rpm ?

    thank you

    Quote Originally Posted by robin_listas View Post


    > 2. do i have to create an rpm everytime after a change? (it jus takes
    > too long )


    No, but then you can only create one kernel variation.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.2 x86_64 "Emerald" at Telcontar)

    didnt get this part...

  4. #4
    Join Date
    Jun 2008
    Location
    Belgrade, Serbia
    Posts
    719

    Default Re: how to compile a kernel without creating a rpm ?

    Emil Beli
    http://www.beli.ws/blog/
    openSUSE 11.4 x64 KDE, ATI 5600, i7 dell inspire laptop

  5. #5
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    13,295
    Blog Entries
    2

    Default Re: how to compile a kernel without creating a rpm ?

    Hey Emil,
    That looks really interesting, is going to become one of my "weekend" projects sometime...

    Some quick questions about what can be expected before actually following the steps in your blog...

    - It looks like a major part of your procedure describes only enabling/disabling items from a menu -- I assume those are standard "Loadable Kernel Modules" -- Am I correct?
    - If the menu only lists standard LKM, is there a provision for adding other LKM what might not be a part of Kernel Dev packages?
    - For awhile now, I've been interested in any way to modify the "SLAB Allocator" in the kernel, it's the configuration that plays a major part in allocating core kernel resources to various functions/services and cannot be modified except when the kernel is compiled, does your procedure support selecting SLAB, SLUB, SLAM or other?

    TIA if you have answers to any of these questions,
    Tony

  6. #6
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: how to compile a kernel without creating a rpm ?

    On 2011-04-14 19:06, Vidya89 wrote:
    >
    > thank you
    >
    > robin_listas;2323551 Wrote:
    >>
    >>
    >>
    >>> 2. do i have to create an rpm everytime after a change? (it jus takes
    >>> too long )

    >>
    >> No, but then you can only create one kernel variation.


    >
    > didnt get this part...


    That you can only compile one kernel. If you want to try some setting, you
    have to compile it again, and you again have only one kernel. However, if
    you store them as rpms, you can install any of them.


    Ah, I forgot: kernels can have names, it is defined somewhere in the
    configuration phase. You should actually do it, or your kernel will be
    named "default" and replace the default suse kernel.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.2 x86_64 "Emerald" at Telcontar)

  7. #7

    Default Re: how to compile a kernel without creating a rpm ?

    @ Emil
    thank you sooooo much

    @robin
    haa got it .... correct me if im wrong,
    first i compile from version 1... which gives me ver 2
    so now if i wanna make changes i go back to ver 1
    and then make the changes in the cd usr/src/linux dir and then compile again....
    but this time i dont have to change the name coz its the ver 2's code that im changing....

    and guys one question remains unsolved... the kernel code part...
    from the menu i can only add/del module (again correct me if im wrong)... how do i change the kernel code itself... is it the zillions of C files in the downloaded source... if yes, is it rite to say i can change one of those C files and then compile the whole thing as given above?....

  8. #8
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: how to compile a kernel without creating a rpm ?

    On 2011-04-15 13:36, Vidya89 wrote:
    >
    > @ Emil
    > thank you sooooo much
    >
    > @robin
    > haa got it .... correct me if im wrong,
    > first i compile from version 1... which gives me ver 2
    > so now if i wanna make changes i go back to ver 1
    > and then make the changes in the cd usr/src/linux dir and then compile
    > again....
    > but this time i dont have to change the name coz its the ver 2's code
    > that im changing....


    You have to change the name the first time, or you will overwrite the
    original kernel installed, which is known to work. If your new kernel does
    not boot, you are stuck.

    Changing the name in menuconfig, internally, changes not only the kernel
    name in /boot, but also changes the entire module tree in /lib/modules. It
    can be a gigabyte of code.


    > and guys one question remains unsolved... the kernel code part...
    > from the menu i can only add/del module (again correct me if im
    > wrong)... how do i change the kernel code itself... is it the zillions
    > of C files in the downloaded source... if yes, is it rite to say i can
    > change one of those C files and then compile the whole thing as given
    > above?....


    Yes, you have to change those files. And I can't tell you how, never tried.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.2 x86_64 "Emerald" at Telcontar)

  9. #9
    Join Date
    Jun 2008
    Location
    Belgrade, Serbia
    Posts
    719

    Default Re: how to compile a kernel without creating a rpm ?

    You are welcome. But you have seen that I haven't been going into the depth of things on my blog. It is mostly enabling/disabling things.
    But I see your questions are answered by other good people.
    Just another warning: pay attention to names, and don't start from 0 if you don't know what are you doing.
    I have compiled kernel many times that I downloaded directly from kernel.org, if you don't know what are you doing, I advise against.
    Usually, most secure way is to modify current kernel... use make cloneconfig whenever you can.
    Emil Beli
    http://www.beli.ws/blog/
    openSUSE 11.4 x64 KDE, ATI 5600, i7 dell inspire laptop

  10. #10

    Default Re: how to compile a kernel without creating a rpm ?

    @robin n emil

    thank you .... point taken

    @emil
    think u can gimme a list of few things which can be omitted
    i did change the processor type from generic, and removed certain
    device drivers which i wont need.... wat are the other things tat can be omitted?


    btw im done compiling n now posting from my new kernel .... thanks to u guys
    but compiling took 1hr n 50 mins....
    my laptop has intel core 2 duo n a 2.5 GB ram..... is this the expected time
    or is there some issue with my system?

Page 1 of 3 123 LastLast

Posting Permissions

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