Penguin
Note: You are viewing an old revision of this page. View the current version.

Compile Problems

In file included from ide-cd.c:318:
ide-cd.h:440: error: long, short, signed or unsigned used invalidly for `slot_tablelen'

This occurs if you're using a more recent compiler than the kernel can be compiled for, for example gcc 3.x to compile a kernel (kernels only work with <gcc 3). try:

 make CC=gcc-2.95 bzImage

(if you want to use gcc-2.95)

In /usr/src/linux/README (at least for kernel versions 2.4.x and below) you will find the following snippet:

  COMPILING the kernel:

   - Make sure you have gcc 2.95.3 available.  gcc 2.91.66 (egcs-1.1.2) may
     also work but is not as safe, and *gcc 2.7.2.3 is no longer supported*.

But of course you always read the compile instructions for software you download, right? :)

The fact is, however, that this isn't a problem with the compiler. gcc 3.x is just doing what it should be doing: checking for errors. If you actually look at the source, you'll find the line

  __u8 short slot_tabelen;

which is obviously an error. Go talk to the maintainer, kids ;)

Yes, this is true, but the point is that the rest of the compile won't go that smoothly either, even if it does compile chances are that there are going to be "hidden" problems as the compiler compiles away things that the developer was relying on etc.


Bootsplash compiled into your kernel; linking fails

  LD      .tmp_vmlinux1
drivers/built-in.o(.text+0xa898a): In function `splash_getraw':
: undefined reference to `con2fb_map'
drivers/built-in.o(.text+0xa918c): In function `splash_verbose':
: undefined reference to `con2fb_map'
drivers/built-in.o(.text+0xa9670): In function `splash_status':
: undefined reference to `con2fb_map'
drivers/built-in.o(.text+0xa97a4): In function `splash_read_proc':
: undefined reference to `con2fb_map'
drivers/built-in.o(.text+0xa997d): In function `splash_write_proc':
: undefined reference to `con2fb_map'
make: *** [.tmp_vmlinux1] Error 1

You need to have framebuffer console support compiled in. Can't be a module!

Set CONFIG_FRAMEBUFFER_CONSOLE=y in the .config.

Jonte: Good stuff man.. works great :) I also found out that if you enable the VGA text console, the bootsplash wont be used (so disable it;)


Version 2.6 series LinuxKernel notes

ModuleInitTools

Starting with 2.5.51, Linus merged a new way of handling modules. He's added versioning on every symbol inside a module, with the intent that the kernel can read the module and what hooks it uses, compare it to an internal database of whats critical and whats not, and can decide whether the module could be used even if it wasnt compiled specifically for the current running kernel. This adds a lot more flexibility for people forced to run binary-only proprietary modules to support their hardware. What this means for the user is a completely rewritten set of module tools (modprobe(8), insmod(8), lsmod(8)). On Debian you can get these with a quick

apt-get install module-init-tools

Module-init-tools is backwards compatible with 2.4.x kernels, so if you're dual booting between a stable and a beta kernel, you've got module functionality on both. (Read ModuleInitTools for an important caveat!)

Important: module-init-tools no longer reads modules.conf and instead uses a new file called modprobe.conf(5) which has a different syntax. 'man 5 modprobe.conf' will be your friend here. It's possible to set modprobe.conf to handle modules for both 2.4.x and 2.5.x kernels, which is pretty cool if you're a dualbooter.

Also you may notice that the extension of modules has changed from .o to .ko, for kernel object.

Kernel 2.6 on Debian Woody

Add the following lines to your apt/sources.conf:

Either do apt-get install kernel-image-2.6 and pick an appropriate image from the list available (ie, kernel-image-2.6-686) or download, compile and install a kernel yourself.

Update your bootloader, and it should just work.

As mentioned above you need at least a new version of module-init-tools - you will need to use backports to get updated versions of some important packages. Add the following two lines to your apt sources.list:

 # kernel 2.6 and related things
 deb http://www.backports.org/debian woody kernel-2.6
 deb http://www.backports.org/debian woody module-init-tools

do an apt-get dist-update ; apt-get dist-upgrade make sure that module-init-tools is installed and install/update module-init-tools, modutils (if you want to dual-boot with a 2.4 kernel), hdparm, and procinfo.

dhcp server

If you install 2.6 on a machine running a dhcp server, then the default woody startup script won't work. The "dhcp", version "2.0pl5-11" has two separate binaries, one for 2.0 kernels and one for later kernels. Unfortunately, the /usr/sbin/dhcpd shell script tests if your kernel version is either 2.0, or 2.x (where "x" is between 1 and 5, inclusive). Edit the shell script and add a "6" to the part that says [12345].

(This is an incredibly helpful hint. As far as I know, this is the only place its documented, and it's pretty damn important -AS)

dhcp client

The dhcp client startup script looks to suffer from the same problem. Edit the shell script /sbin/dhclient and make the same changes - add a "6" to the part that says [12345].

Kernel 2.6 on RedHatLinux 9:

Kernel 2.6 is now available in RawHide?.

If you still want to use Arjan's pre-Rawhide kernel builds, keep reading.

Add the following lines to your apt/sources.conf (What, you don't use apt?)

 # Arjan's 2.6 series kernel repository
 rpm http://people.redhat.com arjanv/2.5 kernel
 rpm-src http://people.redhat.com arjanv/2.5 kernel

Select the latest snapshot to install:

[root@brian root]# apt-get install kernel
Reading Package Lists... Done
Building Dependency Tree... Done
Package kernel is a virtual package provided by:
  kernel-smp#2.6.0-0.test5.1.34 2.6.0-0.test5.1.34
  kernel-BOOT#2.6.0-0.test5.1.34 2.6.0-0.test5.1.34
  kernel#2.6.0-0.test5.1.34 2.6.0-0.test5.1.34
  kernel-smp#2.4.20-9 2.4.20-9

(in this case, 2.6.0-0.test5.1.34)

[root@brian root]# apt-get install kernel#2.6.0-0.test5.1.34

Wait for about 20Mb of downloads...

Things to note:

  • IO-APIC was broken but it got fixed in test8.
  • Label based mounting and initrd was broken but they're fixed now.
  • USB module names have changed. You need to ensure that the module names are right, and if you can't get USB devices going, try modprobing esd-ohci or something similar. You should be able to cleanly boot 2.4 and 2.6 together.

See

Nvidia and 2.6 notes

NVIDIA drivers version 1.0-6106 and up support all 2.4 and 2.6 kernels, including kernels with the new 2.6 option for 4k stacks.

Other Misc 2.6 Notes

In the 2.4 series, you could read /usr/src/linux-<version>/Documentation/Configure.help to see all the help for the entries you'd see in make *config.

In 2.6, this has moved to individual "Kconfig" files in each sub-directory of the source tree.


See TroubleshootingStartUp for some problems while booting kernels.
See KernelTweaking for tuning hints.


CategoryKernel