Recompiling 2009.0 kernel - Mandriva

This is a discussion on Recompiling 2009.0 kernel - Mandriva ; I needed to ensure a match between the current gcc and the running kernel (as Mandriva managed to release a mismatch (?)). My solution was to attempt a recompilation. I downloaded the source, header and matching kernel devel files and ...

+ Reply to Thread
Results 1 to 12 of 12

Thread: Recompiling 2009.0 kernel

  1. Recompiling 2009.0 kernel

    I needed to ensure a match between the current gcc and the running kernel
    (as Mandriva managed to release a mismatch (?)). My solution was to attempt
    a recompilation.

    I downloaded the source, header and matching kernel devel files and started.

    make xconfig and make menuconfig both exited with a 'nothing to do' message.
    just executing 'make' returned:

    make[1]: *** No rule to make target `init/main.o', needed by
    `init/built-in.o'.

    Googling throws up identical messages from Fedora, Red Hat and Ubuntu users
    but no solutions.

    Any ideas anybody?



  2. Re: Recompiling 2009.0 kernel

    Alan Secker wrote:

    > I needed to ensure a match between the current gcc and the running kernel
    > (as Mandriva managed to release a mismatch (?)). My solution was to
    > attempt a recompilation.
    >
    > I downloaded the source, header and matching kernel devel files and
    > started.
    >
    > make xconfig and make menuconfig both exited with a 'nothing to do'
    > message. just executing 'make' returned:
    >
    > make[1]: *** No rule to make target `init/main.o', needed by
    > `init/built-in.o'.
    >
    > Googling throws up identical messages from Fedora, Red Hat and Ubuntu
    > users but no solutions.
    >
    > Any ideas anybody?


    you have the "development" version installed, what you need is
    the "kernel-source" version, its there in mcc.
    Eric

  3. Re: Recompiling 2009.0 kernel

    On Sun, 12 Oct 2008 15:44:12 -0400, Alan Secker wrote:

    > I downloaded the source, header and matching kernel devel files and started.
    > make xconfig and make menuconfig both exited with a 'nothing to do' message.
    > just executing 'make' returned:


    Here's what I do ...

    As root, I use mc to copy /usr/src/linux-2.6.27-0.rc8.2mnb/ to
    /usr/src/linux-2.6.27-0.rc8.2mnbcustom/, then use chown to make the
    new directory (and all of it's files) owned by my regular userid.

    I then use my regular userid to cd to the new directory, and then
    proceed with the make xconfig, etc.

    Regards, Dave Hodgins

    --
    Change nomail.afraid.org to ody.ca to reply by email.
    (nomail.afraid.org has been set up specifically for
    use in usenet. Feel free to use it yourself.)

  4. Re: Recompiling 2009.0 kernel

    Eric wrote:

    > Alan Secker wrote:
    >
    >> I needed to ensure a match between the current gcc and the running kernel
    >> (as Mandriva managed to release a mismatch (?)). My solution was to
    >> attempt a recompilation.
    >>
    >> I downloaded the source, header and matching kernel devel files and
    >> started.
    >>
    >> make xconfig and make menuconfig both exited with a 'nothing to do'
    >> message. just executing 'make' returned:
    >>
    >> make[1]: *** No rule to make target `init/main.o', needed by
    >> `init/built-in.o'.
    >>
    >> Googling throws up identical messages from Fedora, Red Hat and Ubuntu
    >> users but no solutions.
    >>
    >> Any ideas anybody?

    >
    > you have the "development" version installed, what you need is
    > the "kernel-source" version, its there in mcc.
    > Eric


    There is only one kernel source file on the repository. Can you clarify what
    you meant by "development" version?

    Alan


  5. Re: Recompiling 2009.0 kernel

    David W. Hodgins wrote:

    > On Sun, 12 Oct 2008 15:44:12 -0400, Alan Secker
    > wrote:
    >
    >> I downloaded the source, header and matching kernel devel files and
    >> started. make xconfig and make menuconfig both exited with a 'nothing to
    >> do' message. just executing 'make' returned:

    >
    > Here's what I do ...
    >
    > As root, I use mc to copy /usr/src/linux-2.6.27-0.rc8.2mnb/ to
    > /usr/src/linux-2.6.27-0.rc8.2mnbcustom/, then use chown to make the
    > new directory (and all of it's files) owned by my regular userid.
    >
    > I then use my regular userid to cd to the new directory, and then
    > proceed with the make xconfig, etc.
    >
    > Regards, Dave Hodgins
    >


    I just used cp to do it and then chown and chgrp to the full contents of
    the 'custom' directory. I still get the same result.

    I have been upgrading from beta(x), rc1, rc2 etc. I assumed that the system
    was updating on each urpmi update request. Is it possible that that was
    less than reliable and a clean install might be required?

    I hope the answer is no. Configuring the applications takes ages!
    Regards, Alan


  6. Re: Recompiling 2009.0 kernel

    Alan Secker wrote:

    > Eric wrote:
    >
    >> Alan Secker wrote:
    >>
    >>> I needed to ensure a match between the current gcc and the running
    >>> kernel (as Mandriva managed to release a mismatch (?)). My solution was
    >>> to attempt a recompilation.
    >>>
    >>> I downloaded the source, header and matching kernel devel files and
    >>> started.
    >>>
    >>> make xconfig and make menuconfig both exited with a 'nothing to do'
    >>> message. just executing 'make' returned:
    >>>
    >>> make[1]: *** No rule to make target `init/main.o', needed by
    >>> `init/built-in.o'.
    >>>
    >>> Googling throws up identical messages from Fedora, Red Hat and Ubuntu
    >>> users but no solutions.
    >>>
    >>> Any ideas anybody?

    >>
    >> you have the "development" version installed, what you need is
    >> the "kernel-source" version, its there in mcc.
    >> Eric

    >
    > There is only one kernel source file on the repository. Can you clarify
    > what you meant by "development" version?
    >
    > Alan

    What you want is kernel-source (use the mcc search feature), but there is a
    kernel-desktop-devel which you dont want.
    For example, if i installed 'kernel-desktop-development-latest' it will
    install what looks like kernel source but its not complete. But if you
    select 'kernel-source-latest' you'll get the full sources which you can
    compile. Tip: make sure mcc software management page has "all" & "all"
    selected (near top of window) when you search.
    Eric



  7. Re: Recompiling 2009.0 kernel

    Eric wrote:

    > Alan Secker wrote:
    >
    >> Eric wrote:
    >>
    >>> Alan Secker wrote:
    >>>
    >>>> I needed to ensure a match between the current gcc and the running
    >>>> kernel (as Mandriva managed to release a mismatch (?)). My solution was
    >>>> to attempt a recompilation.
    >>>>
    >>>> I downloaded the source, header and matching kernel devel files and
    >>>> started.
    >>>>
    >>>> make xconfig and make menuconfig both exited with a 'nothing to do'
    >>>> message. just executing 'make' returned:
    >>>>
    >>>> make[1]: *** No rule to make target `init/main.o', needed by
    >>>> `init/built-in.o'.
    >>>>
    >>>> Googling throws up identical messages from Fedora, Red Hat and Ubuntu
    >>>> users but no solutions.
    >>>>
    >>>> Any ideas anybody?
    >>>
    >>> you have the "development" version installed, what you need is
    >>> the "kernel-source" version, its there in mcc.
    >>> Eric

    >>
    >> There is only one kernel source file on the repository. Can you clarify
    >> what you meant by "development" version?
    >>
    >> Alan

    > What you want is kernel-source (use the mcc search feature), but there is
    > a kernel-desktop-devel which you dont want.
    > For example, if i installed 'kernel-desktop-development-latest' it will
    > install what looks like kernel source but its not complete. But if you
    > select 'kernel-source-latest' you'll get the full sources which you can
    > compile. Tip: make sure mcc software management page has "all" & "all"
    > selected (near top of window) when you search.
    > Eric


    I had already done everything you've suggested before posting here! (and the
    devel file, just in case)!

    Alan



  8. Re: Recompiling 2009.0 kernel

    On Sun, 12 Oct 2008 18:05:48 -0400, Alan Secker wrote:

    > I just used cp to do it and then chown and chgrp to the full contents of
    > the 'custom' directory. I still get the same result.


    I'd try uninstalling the kernel source, deleting the directories to get
    rid of any old stuff, and then reinstalling the kernel source, and starting
    with the copy again. Don't forget to save a copy of the old .config, if
    you want it.

    Regards, Dave Hodgins

    --
    Change nomail.afraid.org to ody.ca to reply by email.
    (nomail.afraid.org has been set up specifically for
    use in usenet. Feel free to use it yourself.)

  9. Re: Recompiling 2009.0 kernel

    Please excuse the bluntness of the following, but I am alternately
    puzzled and baffled by the problems you are having. Shouldn't happen.

    Alan Secker wrote:
    > I downloaded the source, header and matching kernel devel files and started.


    Whoa. If you want to compile a kernel, you download the kernel
    source package and only the source package. The kernel devel file is
    only for use in compiling third-party applications tht need the
    kernel headers. And what did you get that provides the "header"
    files separately?
    >
    > make xconfig and make menuconfig both exited with a 'nothing to do' message.
    > just executing 'make' returned:


    This cannot be, if you have the proper package of source code for the
    kernel. In fact, you MUST do a make xconfig or something (there are
    choices -- listed in the README in the top directory of the installed
    source code). I recommend using all three (or four) config methods,
    and consulting the help files for each value set as you go through
    the exercise. One help file will sometimes give critical info needed
    that the others do not.

    Oh, yes. You do have to be in the top directory of the source code
    when you run the make menu commands.
    >
    > make[1]: *** No rule to make target `init/main.o', needed by
    > `init/built-in.o'.


    I have seen error messages like this when the packager failed
    to provide full path names in some cases. Before compiling,
    cd to the top directory of the source code and do
    CDPATH=$CDPATH:.:
    That will give you automatic access to one level below the
    top directory, and that usually takes care of the problem.

    > Googling throws up identical messages from Fedora, Red Hat and Ubuntu users
    > but no solutions.


    Remaining possibility: Somebody boo-boo-ed in provision of the Linux
    kernel, and nobody is correcting it. But my guess is that people are
    making the same mistake.

    > Any ideas anybody?


    Go into the top directory of the source code installed and read the
    README. If you do not have one, you have the wrong package.

    Or, are you compiling from the GUI? If so, and your gui is not
    configured to position correctly in the directory for the source,
    that could be a problem.

    Cheers!

    jim b.

    --
    UNIX is not user unfriendly; it merely
    expects users to be computer-friendly.

  10. Re: Recompiling 2009.0 kernel

    David W. Hodgins wrote:

    > On Sun, 12 Oct 2008 18:05:48 -0400, Alan Secker
    > wrote:
    >
    >> I just used cp to do it and then chown and chgrp to the full contents of
    >> the 'custom' directory. I still get the same result.

    >
    > I'd try uninstalling the kernel source, deleting the directories to get
    > rid of any old stuff, and then reinstalling the kernel source, and
    > starting
    > with the copy again. Don't forget to save a copy of the old .config, if
    > you want it.
    >
    > Regards, Dave Hodgins
    >


    Attempts to follow your advice were thwarted by missing bits and bobs. A
    check on the download messages revealed they were still coming
    from 'cooker' repositories. Easy Urpmi indicated they would be switched to
    the final release once it occurred That hadn't happened.

    I tried changing all the options in the mcc (or is it mc). One or two
    resisted being changed(!). The overall effect was that little had changed
    on attempting urpmi updates. I am now resigned to undertaking a clean
    install (except for /home).

    Thanks for your help, David, Eric et al



  11. Re: Recompiling 2009.0 kernel

    Alan Secker wrote:

    > Eric wrote:
    >
    >> Alan Secker wrote:
    >>
    >>> Eric wrote:
    >>>
    >>>> Alan Secker wrote:
    >>>>
    >>>>> I needed to ensure a match between the current gcc and the running
    >>>>> kernel (as Mandriva managed to release a mismatch (?)). My solution
    >>>>> was to attempt a recompilation.
    >>>>>
    >>>>> I downloaded the source, header and matching kernel devel files and
    >>>>> started.
    >>>>>
    >>>>> make xconfig and make menuconfig both exited with a 'nothing to do'
    >>>>> message. just executing 'make' returned:
    >>>>>
    >>>>> make[1]: *** No rule to make target `init/main.o', needed by
    >>>>> `init/built-in.o'.
    >>>>>
    >>>>> Googling throws up identical messages from Fedora, Red Hat and Ubuntu
    >>>>> users but no solutions.
    >>>>>
    >>>>> Any ideas anybody?
    >>>>
    >>>> you have the "development" version installed, what you need is
    >>>> the "kernel-source" version, its there in mcc.
    >>>> Eric
    >>>
    >>> There is only one kernel source file on the repository. Can you clarify
    >>> what you meant by "development" version?
    >>>
    >>> Alan

    >> What you want is kernel-source (use the mcc search feature), but there is
    >> a kernel-desktop-devel which you dont want.
    >> For example, if i installed 'kernel-desktop-development-latest' it will
    >> install what looks like kernel source but its not complete. But if you
    >> select 'kernel-source-latest' you'll get the full sources which you can
    >> compile. Tip: make sure mcc software management page has "all" & "all"
    >> selected (near top of window) when you search.
    >> Eric

    >
    > I had already done everything you've suggested before posting here! (and
    > the devel file, just in case)!
    >
    > Alan


    cd /usr/src/linux
    ls
    post what ls shows.
    It should look like this (mostly):
    3rdparty/ crypto/ init/ MAINTAINERS README sound/
    arch/ Documentation/ ipc/ Makefile REPORTING-BUGS
    block/ drivers/ Kbuild mm/ samples/ usr/
    COPYING fs/ kernel/ Module.symvers scripts/
    CREDITS include/ lib/ net/ security/

    While we are waiting for that 'ls' list try this:

    cd /usr/src/linux
    vi Makefile
    (change the EXTRAVERSION to something you like, i removed "custom" and put
    cstm instead)
    make clean
    make xconfig
    (save your changes in xconfig)
    make
    make modules_install
    make install

    Eric



  12. Re: Recompiling 2009.0 kernel

    Jim Beard wrote:

    > Please excuse the bluntness of the following, but I am alternately
    > puzzled and baffled by the problems you are having. Shouldn't happen.
    >
    > Alan Secker wrote:
    >> I downloaded the source, header and matching kernel devel files and
    >> started.

    >
    > Whoa. If you want to compile a kernel, you download the kernel
    > source package and only the source package. The kernel devel file is
    > only for use in compiling third-party applications tht need the
    > kernel headers. And what did you get that provides the "header"
    > files separately?
    >>
    >> make xconfig and make menuconfig both exited with a 'nothing to do'
    >> message. just executing 'make' returned:

    >
    > This cannot be, if you have the proper package of source code for the
    > kernel. In fact, you MUST do a make xconfig or something (there are
    > choices -- listed in the README in the top directory of the installed
    > source code). I recommend using all three (or four) config methods,
    > and consulting the help files for each value set as you go through
    > the exercise. One help file will sometimes give critical info needed
    > that the others do not.
    >
    > Oh, yes. You do have to be in the top directory of the source code
    > when you run the make menu commands.
    >>
    >> make[1]: *** No rule to make target `init/main.o', needed by
    >> `init/built-in.o'.

    >
    > I have seen error messages like this when the packager failed
    > to provide full path names in some cases. Before compiling,
    > cd to the top directory of the source code and do
    > CDPATH=$CDPATH:.:
    > That will give you automatic access to one level below the
    > top directory, and that usually takes care of the problem.
    >
    >> Googling throws up identical messages from Fedora, Red Hat and Ubuntu
    >> users but no solutions.

    >
    > Remaining possibility: Somebody boo-boo-ed in provision of the Linux
    > kernel, and nobody is correcting it. But my guess is that people are
    > making the same mistake.
    >
    >> Any ideas anybody?

    >
    > Go into the top directory of the source code installed and read the
    > README. If you do not have one, you have the wrong package.
    >
    > Or, are you compiling from the GUI? If so, and your gui is not
    > configured to position correctly in the directory for the source,
    > that could be a problem.
    >
    > Cheers!
    >
    > jim b.
    >


    If you ever see the message "No rule to make init.o/main.o" (going by memory
    here) you have the wrong files. You need kernel sources not development
    headers. See my other reply in this same post.
    Eric


+ Reply to Thread