fixes for some compile and link errors on ppc with 2.1.125

Martin Mares (aaronl@vitelus.com)
Sun, 11 Oct 1998 20:33:18 +0000 ( )


Hello all,

I recently downloaded kernel 2.1.125 for my ancient (2.1.24) PowerPC G3
running LinuxPPC. make xconfig failed, but I'm happy with menuconfig so it
wasn't such a big deal. I made menuconfig and configured the kernel.

Next I did the customary make dep ; make clean ; etc. And finally I
attempted a make zImage.

The first compile error occurs in kernel/dma.c. Line 35 reads:
spinlock_t dma_spin_lock = SPIN_LOCK_UNLOCKED;
gcc was complaining that something was undefined (i think it was
spinlock_t). Anyway, including <asm-ppc/spinlock.h> eliminated the
problem. Of course, this should go with an #ifdef because to my knowledge
it is only relevant on a PowerPC.

There were several other compile errors that I failed to fix. Instead I
ended up disabling the options. macserial was duplicating a decleration
found in tty.h or something like that. And XMON (whatever that is) seemed
to want an arch/ppc/xmon dir.

After this everything compiled successfuly, but still would not link.
strnicmp seemed to be the cause. I searched for hours but could not find
the redefinitions that the linker was complaining about. Finally in
frustration I moved strnicmp as a static function to only the files that
needed it (in my case only one), and removed its decleration from string.h

Well kernel hacking has been fun, unfortunately this kernel doesn't seem
to want to run. The bootloader skips over it and proceedes tot he next in
the conf file (2.1.24). I think this might explain it:

(vmlinux is the old kernel that came with the distribution, vmlinux.coff
is the 2.1.125 kernel I spent so
long trying to compile)

bash# file vmlinux
vmlinux: ELF 32-bit MSB excecutable, PowerPC, version 1, statically
linked, not stripped

bash# file vmlinux.coff
vmlinux.coff: excecutable (RISC System/6000 V3.1) or obj model not
stripped

Is the compiler generating an excecutable for the wrong platform?

Aaron Lehmann

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/