Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Building Kernel 2.6.37 (from 11.4) on oS 12.1.

  1. #1

    Default Building Kernel 2.6.37 (from 11.4) on oS 12.1.

    Hello,

    I have installed oS 12.1 x64 on my notebook (ASUS EeePC 1201T). I experienced some problems, e.g. random freezing, since I have the new Kernel. At least, I suspect that the Kernel is the cause. So I'm trying to build a RPM package. I downloaded the kernel-source 2.6.37 from openSUSE 11.4, unpacked them and build them (with rpmbuild). I have them installed. The Linux Kernel is located in /usr/src/linux.

    I googled alot and couldn't a clear guide how to build an Kernel on openSUSE; at least not one that creates a RPM package.
    I ran "make binrpm-pkg" as well as "make rpm" without success. It stops after a lot of time (too bad, the notebook is very slow...) and shows something about a shellscript located in /var/tmp/rpm-tmp.<random-6-character-string>. It seems to be a build script. It set's some variables and runs make clean && make.
    The errors show something about an %build. That has to be something with a spec file, but I'm not very familiar with it. I can't get the message now. I'm running the notebook in runlevel 3 and the buffer issn't that big as it seems. I'm re-running "make rpm" and I'll ad the code as far as it is ready.

    However, the kernel compiles fine if I'm running just "make".


    Any ideas?

    Thanks

  2. #2

    Default Re: Building Kernel 2.6.37 (from 11.4) on oS 12.1.

    Sorry for double posting, but there's no edit button... Hmm..

    However, it's ready now. It printed:
    Code:
    […]compilation output[…]
      CC [M]  drivers/net/igbvf/vf.o
      CC [M]  drivers/net/igbvf/mbx.o
      CC [M]  drivers/net/igbvf/ethertool.o
    In file included from drivers/net/ethertool.c:36:0:
    drivers/net/igbvf/igbvf.h:129:15: error: duplicate member 'page'
    make[5]: *** [drivers/net/igbvf/ethtool.o] Error 1
    make[4]: *** [drivers/net/igbvf] Error 2
    make[3]: *** [drivers/net] Error 2
    make[2]: *** [drivers] Error 2
    error: Bad exit status from /var/tmp/rpm-tmp.jR11Aa (%build)
    
    RPM build errors:
        Bad exit from /var/tmp/tpm-tmp.jR11Aa (%build)
    make[1]: *** [rpm] Error 1
    make: *** [rpm] Error 2
    I uploaded the file. You can watch it here: SUSE Paste


    What I did:
    1. Downloaded https://build.opensuse.org/package/b...=openSUSE_11.4
    2. Extracted the rpm because I wasn't able to install it using zypper nor rpm: rpm2cpio kernel-source-2.6.37.6-88.1.src.rpm | cpio -id
    3. Run "rpmbuild kernel-source.spec"
    4. Installed the created kernel-devel-2.6.37.1-1.2.2.noarch.rpm and kernel-source-2.6.37.1-1.2.2.noarch.rpm
    5. cd into /usr/src/linux and run "make rpm" which, as said, didn't work.


    Any ideas?

  3. #3
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Default Re: Building Kernel 2.6.37 (from 11.4) on oS 12.1.

    Quote Originally Posted by Ctwx View Post
    Sorry for double posting, but there's no edit button... Hmm..

    However, it's ready now. It printed:
    Code:
    […]compilation output[…]
      CC [M]  drivers/net/igbvf/vf.o
      CC [M]  drivers/net/igbvf/mbx.o
      CC [M]  drivers/net/igbvf/ethertool.o
    In file included from drivers/net/ethertool.c:36:0:
    drivers/net/igbvf/igbvf.h:129:15: error: duplicate member 'page'
    make[5]: *** [drivers/net/igbvf/ethtool.o] Error 1
    make[4]: *** [drivers/net/igbvf] Error 2
    make[3]: *** [drivers/net] Error 2
    make[2]: *** [drivers] Error 2
    error: Bad exit status from /var/tmp/rpm-tmp.jR11Aa (%build)
    
    RPM build errors:
        Bad exit from /var/tmp/tpm-tmp.jR11Aa (%build)
    make[1]: *** [rpm] Error 1
    make: *** [rpm] Error 2
    I uploaded the file. You can watch it here: SUSE Paste


    What I did:
    1. Downloaded https://build.opensuse.org/package/b...=openSUSE_11.4
    2. Extracted the rpm because I wasn't able to install it using zypper nor rpm: rpm2cpio kernel-source-2.6.37.6-88.1.src.rpm | cpio -id
    3. Run "rpmbuild kernel-source.spec"
    4. Installed the created kernel-devel-2.6.37.1-1.2.2.noarch.rpm and kernel-source-2.6.37.1-1.2.2.noarch.rpm
    5. cd into /usr/src/linux and run "make rpm" which, as said, didn't work.


    Any ideas?
    So, not sure if you are having a kernel problem for sure, but you can compile and install any kernel version you can find here: The Linux Kernel Archives, using my bash script sakc you can find here: S.A.K.C. - SUSE Automated Kernel Compiler - Version 2.60 - Blogs - openSUSE Forums and if you need a kernel version not shown on the main page, you can get anything released back to 2005 using this script sgtb: S.G.T.B. - SuSE Git Kernel Tarball Creator - Version 1.78 - Blogs - openSUSE Forums. The bash script sakc gives the instructions on what needs to be done to compile a script. If you are new to kernel compiling, I would skip the Turbo Mode till you understand more about that.

    Thank You,
    Last edited by jdmcdaniel3; 28-Jan-2012 at 15:01.
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  4. #4

    Default Re: Building Kernel 2.6.37 (from 11.4) on oS 12.1.

    Nice script you have there, but it doesn't seem to build an RPM. I'd compile the Kernel and install them using "make install" and "make modules_install", but it will be harder to remove it. So I want to do it like openSUSE maintainer does it. Another important point is: I'm not 100% sure if the Kernel is the cause for my freezing problem, so I wanted to have exact the same Kernel I had while I had oS 11.4.
    Thanks anyway.

  5. #5
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile Re: Building Kernel 2.6.37 (from 11.4) on oS 12.1.

    Quote Originally Posted by Ctwx View Post
    Nice script you have there, but it doesn't seem to build an RPM. I'd compile the Kernel and install them using "make install" and "make modules_install", but it will be harder to remove it. So I want to do it like openSUSE maintainer does it. Another important point is: I'm not 100% sure if the Kernel is the cause for my freezing problem, so I wanted to have exact the same Kernel I had while I had oS 11.4.
    Thanks anyway.
    You would have to build the new kernel and its three files before you could put them into an rpm and in fact you could build one from the files in /boot I guess if you wanted to. It Is kind of the chicken and egg thing. You got to have a kernel built, before you could make an rpm of it and once you already had it in /boot you should just go ahead and see if it works first. Consider that sakc does not remove any other kernels, leaving all else alone when it installs a new kernel. In any event, good luck in your adventure.

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

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

    Default Re: Building Kernel 2.6.37 (from 11.4) on oS 12.1.

    On 2012-01-29 01:16, Ctwx wrote:
    >
    > Nice script you have there, but it doesn't seem to build an RPM. I'd
    > compile the Kernel and install them using "make install" and "make
    > modules_install", but it will be harder to remove it.


    Not really. The first trick is to build it with a different name, so that
    it doesn't clash.

    The sequence is this:

    make cloneconfig (it copies the configuration of the running kernel
    as far as possible)
    make menuconfig

    you get an editor of kernel options. Probably thousands. Don't worry, you
    only have to change one thing. On line number 4 it says "General setup
    --->". Enter it. You will see another line like:

    (-0.11-desktop) Local version - append to kernel release

    select it and change the name. Doesn't really matter what, I would put
    something like "-0.11-mydesktop". Now exit and save, then make it all, and
    install it.

    Part of the kernel goes to /boot (it should also make an entry in
    grub/menu.lst), and a lot of modules go into
    /lib/modules/kernelversion-mydesktop/*.

    For removal, you only have to delete that entire dir and the files in /boot.

    > so I
    > wanted to have exact the same Kernel I had while I had oS 11.4.


    You could try with a ready built rpm for 11.4. Not sure if it would work,
    tough.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)

  7. #7

    Default Re: Building Kernel 2.6.37 (from 11.4) on oS 12.1.

    The Kernel headers didn't fit. The Kernel 3.1 headers doesn't contain some of the required headers. I added "-I/usr/src/linux/2.6.37.6-0.11/include" to the makefile. Now it compiles.


    Thanks a lot for your help!

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

    Default Re: Building Kernel 2.6.37 (from 11.4) on oS 12.1.

    On 2012-01-30 17:46, Ctwx wrote:
    >
    > The Kernel headers didn't fit. The Kernel 3.1 headers doesn't contain
    > some of the required headers. I added
    > "-I/usr/src/linux/2.6.37.6-0.11/include" to the makefile. Now it
    > compiles.


    Interesting.

    > Thanks a lot for your help!


    welcome!

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)

  9. #9

    Default Re: Building Kernel 2.6.37 (from 11.4) on oS 12.1.

    Okay, my first try wasn't the way I wanted it to be. When I posted my that I succesfully compiled the kernel and creating a RPM file, I used "make rpm" to do so. Now I copied the contents of the kernel-source to $HOME/rpmbuild/SOURCE, created a patch that adds -I/usr/src/linux/include (to fix the problem that occurred when I started this thread) to the HOSTCFLAGS in the main Makefile.

    However, I wanted to know, how does this rpm stuff works? I mean, how can I rebuilt a package? I unpacked the source files so I had the spec files, Kernel source, patches, etc in $HOME/rpmbuild/SOURCE. I mean, how can things like this missing video driver happen? The Kernel should use it's own kernel-headers, which I couldn't install because I had the newer glibc version installed. (Some glibc package contains now the kernel headers...)
    So I had to trick a bit to get the compiler to do it's job. (It took me almost 5 days for my final solution. )

    Soooo.... Is there any "openSUSE" way to rebuild a package? Is there an manual or something like this? I couldn't found something. And when I found something, it was mostly obsolete. So... What to do?


    Thank you.

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

    Default Re: Building Kernel 2.6.37 (from 11.4) on oS 12.1.

    On 2012-02-03 00:46, Ctwx wrote:
    > Soooo.... Is there any "openSUSE" way to rebuild a package? Is there an
    > manual or something like this? I couldn't found something. And when I
    > found something, it was mostly obsolete. So... What to do?


    Most people don't build a kernel rpm. And many devs do not write
    instructions. :-)

    There should be notes in the wiki, I think. The kernel has some readme
    files and other documents, but I don't remember if they explain how to
    build the rpm.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)

Page 1 of 2 12 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
  •