Find the answer to your Linux question:
Results 1 to 5 of 5
Hi All, I am at my wits end at this point after two days of trying to figure this out; perhaps someone can help me. I am basically trying to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2004
    Posts
    1

    Compiling 2.6.8-1 kernel with gcc 3.3.2


    Hi All,

    I am at my wits end at this point after two days of trying to figure this
    out; perhaps someone can help me.

    I am basically trying to compile Linux kernel version 2.6.8.1 on a
    Mandrake 10.0 system with gcc 3.3.2. Everything compiles fine but the
    kernel does not boot! The kernel is being compiled not for the Mandrake
    System but for a Debian Woody (kernel 2.2.20) System on a 486DX/75 with 24
    MB RAM and 1GB hard
    drive.

    I would like to know has anyone has successfully compiled a 2.6
    kernel with gcc 3.3.2 ?? I am using binutils version 2.14.90.0.7.
    I have heard that certain gcc 3.x.x versions compile fine but generate bad
    kernel code. Is this true?

    Just to see if a pre-compiled 2.6 kernel will even boot on a 486 system
    such as mine, I downloaded a pre-compiled 2.6.8 kernel image from
    debian.org (extracted it from the .deb file) and installed it on the 486 system.
    When I ran it, it actually booted and executed fine until it couldn't mount the
    filesystems (which is ok since this was just a test).

    So, it seems that I am configuring LILO and stuff fine because this
    pre-compiled image booted fine. But when I compile a kernel on my
    Mandrake system, it does not boot. Basically, I get the following when I
    try to boot my self-compiled kernels:

    "Uncompressing Linux.... Ok, booting the kernel."

    And then it's dead. Like I mentioned earlier, a Debian pre-compiled
    kernel image boots fine...at least I see the booting sequence.

    Therefore, I am now suspecting my Mandrake toolchain (i.e. gcc 3.3.2). If
    anyone has info on this, I'd appreciate it.
    I have also tried downloading, compiling, and running a 2.6.7 kernel with
    the same results i.e. no go...

    Also, it could be that my kernel configuration is incorrect, though I do
    not think it is. If someone can take a look at this and let know of any
    outright problems, that'd be cool too. It is over here:

    http://www.cs.ucr.edu/~uqureshe/2.6.8.1_config

    Any help is greatly appreciated.

    Regards,

    Umar

  2. #2
    Just Joined!
    Join Date
    Nov 2004
    Posts
    5
    Can you send more details i mean out put of your kernel. and steps you have Taken . In 2.6 you have to enable ext3 file system in kernel it self.
    just try it

    chrees
    naveen

  3. #3
    Just Joined!
    Join Date
    Aug 2003
    Location
    Sydney, Australia
    Posts
    52
    Quote Originally Posted by naveen.yadav
    Can you send more details i mean out put of your
    kernel. and steps you have Taken . In 2.6 you have
    to enable ext3 file system in kernel it self.
    just try it

    chrees
    naveen

    Yes, as above, more details needed.

    Just some general other things ...

    If you are using custom/additional CLI switches in
    your make file ...

    such as "-march=ixxx"

    you will render the kernel unsuitable for
    a cpu version below the one specified by
    the switch. As you will be compiling with
    chip specific facilities in mind.

    So, something like ...

    "-march=i686"

    Then it will only run on a "i686" and above, so
    a i586, i486, i386 won't work in that case.

    I found the v2.6.8.1 a bit buggy myself. The
    v2.6.9-rc3 runs really well though, very fast. It's
    scheduling and pre-emptive facilities work
    well. Which has been an issue in previous releases.

    There is so much development occurring in the
    2.6.x series, so many bugs cropping up and then
    being fixed, just as quickly. It pays to update.
    Just how far to update dose become a question though .

    With the compiler, read up on it's documentation at
    gcc.gnu.org. Some compilers will use their CLI
    switches in different ways, some will no longer
    need switches used by previous versions. But
    then, those issues should be covered during
    the initial configuration process, so shouldn't be
    an issue.

    It should compile and boot fine, as long as the
    required facilities have been configured in in
    the first place.

    jm

  4. #4
    Just Joined!
    Join Date
    Nov 2004
    Posts
    2
    If you suspect there is a problem with the compiler why don't you simply upgrade gcc. I upgraded from 2.9.8 to 3.4.2 and my 2.6.9 kernel compiles,boots and works just fine.

    HTH

    Steve

  5. #5
    Linux Engineer
    Join Date
    Nov 2004
    Location
    home
    Posts
    796
    Use gcc version 2.95.3. Newer versions of gcc are not as good at compiling the kernel. Also, if it's on a 486, you might try compiling for a 386 instead. I've never been able to get a 486 kernel boot on any of the 486s I've had.

Posting Permissions

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