Slashdot Mirror


2.2.1x Kernel Building Problems

rips asks: "I've been a moderately skilled Linux user for several years now but my problem solving skills on this one have got me stumped. I have compiled many kernels before but when compiling a recent kernel (2.2.11 or 2.2.12) the compilation will run without a hitch, lilo (v20) will accept the changes but after a reboot the system will crash at: 'Uncompressing Linux... Ok'. I have tried compiling the 2.2.12 kernel on 3 different machines with 2 different distributions (RedHat 6.0 and Slackware 3.2.0) and for different target processors and kernel options but nothing seems to work. I've even tried running off a boot disk incase it was LILO but to no avail. This has really got me stumped. Has anyone else figured out the cause/solution to this?"

7 of 25 comments (clear)

  1. make what? by davie · · Score: 3

    Your boot image may be too large. This is why we now have the option to build a (smaller) bzip-compressed image, instead of a gzip-compressed image. At the end of the final make stage (make boot, make Zimage, etc.) the last few lines of output should tell you the size of the image, e.g.:

    Root device is (3, 1)
    Boot sector 512 bytes.
    Setup is 3436 bytes.
    System is 515 kB

    I believe the max is 1024kB, give or take a few, since the image has to fit in one MB (correct me if I'm wrong). At any rate, if your image is close to 1024kB, try either making a bzip-compressed image, with "make bZimage," or make more of your drivers modular.

    If that doesn't fix the problem, post your "make the kernel" command and the last few lines of output.

    --
    slashdot broke my sig
    1. Re:make what? by davie · · Score: 2

      Thanks for the correction. I was just grepping through the docs looking for more on this issue; I could swear I read something there that explained the whole problem of large images and what bzImage does to solve it, but I haven't found it yet. Maybe it was on the kernel list?

      --
      slashdot broke my sig
    2. Re:make what? by davie · · Score: 2

      If I may correct myself, it's "make bzImage," not "make bZimage."

      Still suffering from early-morning caffeine deficiency syndrome.

      --
      slashdot broke my sig
  2. GCC by Matts · · Score: 2

    Reading the kernel archives it looks like there may be problems with some versions of GCC. Check out the kernel mailing list synopsis (url anyone?) for further details. Also patch to Alan Cox's latest pre kernel.

    perl -e 'print scalar reverse q(\)-: ,hacker Perl another Just)'

    --

    Matt. Want XML + Apache + Stylesheets? Get AxKit.
    1. Re:GCC by davie · · Score: 2

      IIRC, the problem when compiling with the latest gccs shows up as random lockups, not during the boot phase. FWIW, I've never had a problem with a kernel built with the latest gcc, maybe I'm just lucky.

      --
      slashdot broke my sig
  3. Had Similar Problem. by jelwell · · Score: 2

    I had a similar problem because I had deselected a few things in the kernel config like "PCI quirks" and "CMD640 fix", "RZ1000 bugfix" etc. If you took those out thinking that your bios is fine, put them back in a retest.
    Joseph Elwell.

  4. Some things to check... by jd · · Score: 2
    I've had no problem compiling Linux 2.2.12, and have even got it to compile with the reiserfs, pps, international, acs and freeswan patches, all shovelled in.

    However, I would advise checking the following:

    • Your version of GCC. I'm using PGCC 2.95.1, and that works just fine. Vanilla 2.95 seems to have some bugs, and snapshots of gcc/egcs might do almost anything. (Though if they can make breakfast and take the dog for a walk, the programmers'll be on to a winner.)
    • Your libc. I wouldn't want to try running 2.2.12 under libc5.
    • Compiler flags. Try bumping up/down the level of optimization, in case an optimizer bug is mangling the compilation.
    • Compile with bzimage, rather than zimage, and see if that works better for you.
    • Put -EVERYTHING- you don't need into modules, in case there's some kind of clash. This'll help identify the problem, as well as give you a temporary fix.
    • Check that /usr/include/linux and /usr/include/asm point to the kernel source tree and not their own local copy. I've run into that with some distros.
    • Try compiling 2.3.21, and see if that works any better. It could be a driver bug, which is version-specific.

    Hope this helps.

    --
    It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)