Re: 2.1.9 won't compile

Ion Badulescu (ionut@moisil.wal.rhno.columbia.edu)
Tue, 12 Nov 1996 17:57:11 -0500 (EST)


On Tue, 12 Nov 1996, Bernhard Rosenkraenzer wrote:

> make zImage produces:
>
> ld -m elf_i386 -Ttext 0xC0100000 -e stext arch/i386/kernel/head.o
> init/main.o init/version.o \
> arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o
> mm/mm.o fs/fs.o ipc/ipc.o net/network.a \
> fs/filesystems.a \
> drivers/block/block.a drivers/char/char.a drivers/net/net.a
> drivers/scsi/scsi.a drivers/cdrom/cdrom.a drivers/pci/pci.a \
> /usr/src/linux-2.1.9/arch/i386/lib/lib.a
> /usr/src/linux-2.1.9/lib/lib.a
> /usr/src/linux-2.1.9/arch/i386/lib/lib.a -o vmlinux
> kernel/kernel.o(.data+0x224): undefined reference to `register_cdrom'
> kernel/kernel.o(.data+0x22c): undefined reference to `unregister_cdrom'
> kernel/kernel.o(.data+0x234): undefined reference to `cdrom_fops'
>
> Since it seems to be a problem with the CD-Driver: I'm using a standard
> SCSI CD-ROM drive, compiled in the kernel (not as a module).

Apparently, whoever made the modifications to the Makefile in the
drivers/cdrom directory forgot that the SCSI cdrom also needs the
functions in cdrom.c. Try the following (untested) patch:

--- linux-2.1.9/drivers/cdrom/Makefile.orig Tue Nov 12 15:47:12 1996
+++ linux-2.1.9/drivers/cdrom/Makefile Tue Nov 12 17:52:20 1996
@@ -136,6 +136,14 @@
endif
endif #CONFIG_BLK_DEV_IDECD

+ifeq ($(CONFIG_BLK_DEV_SR),y)
+USE_GENERIC_CD=1
+else
+ ifeq ($(CONFIG_BLK_DEV_SR),m)
+ USE_MODULAR_GENERIC_CD=1
+ endif
+endif #CONFIG_BLK_DEV_SR
+
ifdef USE_GENERIC_CD
L_OBJS += cdrom.o
else

Ionut

--
Ionut Badulescu - Columbia College '98	    E-mail:ib42@columbia.edu
Phone: (212)853-7875			    Snail mail: 4A4 Wallach Hall
Fax: (212)695-5560					1116 Amsterdam Ave
PGP key available on request				New York, NY 10027
  It is better to keep your mouth shut and be thought a fool,
            than to open it and remove all doubt.