linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 2.5.38: modular IDE broken
@ 2002-09-23 21:28 Bob_Tracy
  2002-09-23 22:51 ` Kai Germaschewski
  0 siblings, 1 reply; 7+ messages in thread
From: Bob_Tracy @ 2002-09-23 21:28 UTC (permalink / raw)
  To: linux-kernel

This may well have been broken in earlier versions...  The last one I
tried to compile before 2.5.38 was 2.5.34.  Quick problem summary:

ide-proc.o doesn't get built if CONFIG_BLK_DEV_IDE isn't "y", so
depmod complains about unresolved symbols.

If I edit linux/drivers/ide/Makefile to force the build, I still end
up with various depmod errors, some of which would doubtless go away
if I turned off module versioning.  Anyone got a quick fix that I'm
too tired to see?  Here's the depmod output with ide-proc.o forced:

if [ -r System.map ]; then /sbin/depmod -ae -F System.map  2.5.38; fi
depmod: *** Unresolved symbols in /lib/modules/2.5.38/kernel/drivers/ide/ide-disk.o
depmod:         proc_ide_read_geometry_R50fed6f7
depmod: *** Unresolved symbols in /lib/modules/2.5.38/kernel/drivers/ide/ide-floppy.o
depmod:         proc_ide_read_geometry_R50fed6f7
depmod: *** Unresolved symbols in /lib/modules/2.5.38/kernel/drivers/ide/ide-probe.o
depmod:         do_ide_request
depmod:         ide_add_generic_settings
depmod:         create_proc_ide_interfaces_Rab2c600e
depmod:         ide_bus_type
depmod: *** Unresolved symbols in /lib/modules/2.5.38/kernel/drivers/ide/ide.o
depmod:         proc_ide_create_Ra8e0f104
depmod:         ide_remove_proc_entries_R5a5a621b
depmod:         ide_add_proc_entries_Rce569c25
depmod:         destroy_proc_ide_drives_Ra54f63e5
depmod:         proc_ide_destroy_R35e1351c
depmod:         bus_unregister
depmod:         proc_ide_read_capacity_R46b2a30d
depmod:         create_proc_ide_interfaces_Rab2c600e
depmod:         ide_scan_pcibus
make: *** [_modinst_post] Error 1

-- 
-----------------------------------------------------------------------
Bob Tracy                   WTO + WIPO = DMCA? http://www.anti-dmca.org
rct@frus.com
-----------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 2.5.38: modular IDE broken
  2002-09-23 21:28 2.5.38: modular IDE broken Bob_Tracy
@ 2002-09-23 22:51 ` Kai Germaschewski
  2002-09-24 14:13   ` Bob_Tracy
  0 siblings, 1 reply; 7+ messages in thread
From: Kai Germaschewski @ 2002-09-23 22:51 UTC (permalink / raw)
  To: Bob_Tracy; +Cc: linux-kernel

On Mon, 23 Sep 2002, Bob_Tracy wrote:

> This may well have been broken in earlier versions...  The last one I
> tried to compile before 2.5.38 was 2.5.34.  Quick problem summary:
> 
> ide-proc.o doesn't get built if CONFIG_BLK_DEV_IDE isn't "y", so
> depmod complains about unresolved symbols.

Yup, drivers/ide/Makefile should have

===== Makefile 1.5 vs edited =====
--- 1.5/drivers/ide/Makefile	Wed Sep 18 20:11:21 2002
+++ edited/Makefile	Mon Sep 23 17:50:05 2002
@@ -24,7 +24,7 @@
 obj-$(CONFIG_BLK_DEV_IDEDMA_PCI)	+= ide-dma.o
 obj-$(CONFIG_BLK_DEV_ISAPNP)		+= ide-pnp.o
 
-ifeq ($(CONFIG_BLK_DEV_IDE),y)
+ifdef CONFIG_BLK_DEV_IDE
 obj-$(CONFIG_PROC_FS)			+= ide-proc.o
 endif
 
> If I edit linux/drivers/ide/Makefile to force the build, I still end
> up with various depmod errors, some of which would doubtless go away
> if I turned off module versioning.  Anyone got a quick fix that I'm
> too tired to see?  Here's the depmod output with ide-proc.o forced:
> 
> if [ -r System.map ]; then /sbin/depmod -ae -F System.map  2.5.38; fi
> depmod: *** Unresolved symbols in /lib/modules/2.5.38/kernel/drivers/ide/ide-disk.o
> depmod:         proc_ide_read_geometry_R50fed6f7
> depmod: *** Unresolved symbols in /lib/modules/2.5.38/kernel/drivers/ide/ide-floppy.o
> depmod:         proc_ide_read_geometry_R50fed6f7
> depmod: *** Unresolved symbols in /lib/modules/2.5.38/kernel/drivers/ide/ide-probe.o
> depmod:         do_ide_request
> depmod:         ide_add_generic_settings
> depmod:         create_proc_ide_interfaces_Rab2c600e
> depmod:         ide_bus_type
> depmod: *** Unresolved symbols in /lib/modules/2.5.38/kernel/drivers/ide/ide.o
> depmod:         proc_ide_create_Ra8e0f104
> depmod:         ide_remove_proc_entries_R5a5a621b
> depmod:         ide_add_proc_entries_Rce569c25
> depmod:         destroy_proc_ide_drives_Ra54f63e5
> depmod:         proc_ide_destroy_R35e1351c
> depmod:         bus_unregister
> depmod:         proc_ide_read_capacity_R46b2a30d
> depmod:         create_proc_ide_interfaces_Rab2c600e
> depmod:         ide_scan_pcibus
> make: *** [_modinst_post] Error 1

Basically, for all symbols which don't end in _R*, an EXPORT_SYMBOL() 
statement is missing. Add as necessary ;)

--Kai



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 2.5.38: modular IDE broken
  2002-09-23 22:51 ` Kai Germaschewski
@ 2002-09-24 14:13   ` Bob_Tracy
  2002-09-24 16:30     ` Kai Germaschewski
  2002-09-26 16:10     ` Alan Cox
  0 siblings, 2 replies; 7+ messages in thread
From: Bob_Tracy @ 2002-09-24 14:13 UTC (permalink / raw)
  To: Kai Germaschewski; +Cc: linux-kernel

Kai Germaschewski wrote:
> ===== Makefile 1.5 vs edited =====
> --- 1.5/drivers/ide/Makefile	Wed Sep 18 20:11:21 2002
> +++ edited/Makefile	Mon Sep 23 17:50:05 2002
> @@ -24,7 +24,7 @@
>  obj-$(CONFIG_BLK_DEV_IDEDMA_PCI)	+= ide-dma.o
>  obj-$(CONFIG_BLK_DEV_ISAPNP)		+= ide-pnp.o
>  
> -ifeq ($(CONFIG_BLK_DEV_IDE),y)
> +ifdef CONFIG_BLK_DEV_IDE
>  obj-$(CONFIG_PROC_FS)			+= ide-proc.o
>  endif

I neglected to mention that the above patch (exactly the same, as it
turns out :-)) is how I forced the ide-proc.o build.  The brokenness
extends deeper.

Specific example: proc_ide_read_geometry has the requisite EXPORT_SYMBOL()
wrapper in ide-proc.c, yet, I still end up with proc_ide_read_geometry_R*
unresolved at depmod time.  In case anyone is wondering, I *did* do a
"make clean", manually cleaned out linux/include/modules to make *sure*
there wasn't any old cruft lying about, then ran "make dep && make bzImage &&
make modules && make modules_install".  The depmod output quoted below is
the result of all that.

> if [ -r System.map ]; then /sbin/depmod -ae -F System.map  2.5.38; fi
> depmod: *** Unresolved symbols in /lib/modules/2.5.38/kernel/drivers/ide/ide-disk.o
> depmod:         proc_ide_read_geometry_R50fed6f7
> depmod: *** Unresolved symbols in /lib/modules/2.5.38/kernel/drivers/ide/ide-floppy.o
> depmod:         proc_ide_read_geometry_R50fed6f7
> depmod: *** Unresolved symbols in /lib/modules/2.5.38/kernel/drivers/ide/ide-probe.o
> depmod:         do_ide_request
> depmod:         ide_add_generic_settings
> depmod:         create_proc_ide_interfaces_Rab2c600e
> depmod:         ide_bus_type
> depmod: *** Unresolved symbols in /lib/modules/2.5.38/kernel/drivers/ide/ide.o
> depmod:         proc_ide_create_Ra8e0f104
> depmod:         ide_remove_proc_entries_R5a5a621b
> depmod:         ide_add_proc_entries_Rce569c25
> depmod:         destroy_proc_ide_drives_Ra54f63e5
> depmod:         proc_ide_destroy_R35e1351c
> depmod:         bus_unregister
> depmod:         proc_ide_read_capacity_R46b2a30d
> depmod:         create_proc_ide_interfaces_Rab2c600e
> depmod:         ide_scan_pcibus
> make: *** [_modinst_post] Error 1

-- 
-----------------------------------------------------------------------
Bob Tracy                   WTO + WIPO = DMCA? http://www.anti-dmca.org
rct@frus.com
-----------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 2.5.38: modular IDE broken
  2002-09-24 14:13   ` Bob_Tracy
@ 2002-09-24 16:30     ` Kai Germaschewski
  2002-09-26 16:10     ` Alan Cox
  1 sibling, 0 replies; 7+ messages in thread
From: Kai Germaschewski @ 2002-09-24 16:30 UTC (permalink / raw)
  To: Bob_Tracy; +Cc: linux-kernel

On Tue, 24 Sep 2002, Bob_Tracy wrote:

> Kai Germaschewski wrote:
> > ===== Makefile 1.5 vs edited =====
> > --- 1.5/drivers/ide/Makefile	Wed Sep 18 20:11:21 2002
> > +++ edited/Makefile	Mon Sep 23 17:50:05 2002
> > @@ -24,7 +24,7 @@
> >  obj-$(CONFIG_BLK_DEV_IDEDMA_PCI)	+= ide-dma.o
> >  obj-$(CONFIG_BLK_DEV_ISAPNP)		+= ide-pnp.o
> >  
> > -ifeq ($(CONFIG_BLK_DEV_IDE),y)
> > +ifdef CONFIG_BLK_DEV_IDE
> >  obj-$(CONFIG_PROC_FS)			+= ide-proc.o
> >  endif
> 
> I neglected to mention that the above patch (exactly the same, as it
> turns out :-)) is how I forced the ide-proc.o build.  The brokenness
> extends deeper.
> 
> Specific example: proc_ide_read_geometry has the requisite EXPORT_SYMBOL()
> wrapper in ide-proc.c, yet, I still end up with proc_ide_read_geometry_R*
> unresolved at depmod time.  In case anyone is wondering, I *did* do a
> "make clean", manually cleaned out linux/include/modules to make *sure*
> there wasn't any old cruft lying about, then ran "make dep && make bzImage &&
> make modules && make modules_install".  The depmod output quoted below is
> the result of all that.

Well, fortunately enough, it turns out not to be a general problem in the
build nor modversions related at all, but rather a messed up
drivers/ide/Makefile.

The specific problem here is that you have CONFIG_IDE = CONFIG_BLK_DEV_IDE
= m, but end up with ide-proc.o in $(obj-y). So that asks for ide-proc.o
being linked into vmlinux. However, since the whole drivers/ide subdir is
marked as "m" (CONFIG_IDE), it does not end up in vmlinux. Anyway, that's
not really what you wanted in the first place, so never mind.

There are more problems than this, but the appended patch at least gets
rid of this issue, it needs a

	mv drivers/ide/ide.c drivers/ide/ide-main.c,

to work. There's still other unresolved symbols which need exporting.

Any of the IDE people interested in figuring this out properly?

--Kai

===== drivers/ide/Makefile 1.5 vs edited =====
--- 1.5/drivers/ide/Makefile	Wed Sep 18 20:11:21 2002
+++ edited/drivers/ide/Makefile	Tue Sep 24 10:21:51 2002
@@ -7,14 +7,22 @@
 # Note : at this point, these files are compiled on all systems.
 # In the future, some of these should be built conditionally.
 #
-export-objs := ide-iops.o ide-taskfile.o ide-proc.o ide.o ide-probe.o ide-dma.o ide-lib.o setup-pci.o
+export-objs := ide-iops.o ide-taskfile.o ide-proc.o ide-main.o \
+	       ide-probe.o ide-dma.o ide-lib.o setup-pci.o
 
 # First come modules that register themselves with the core
 obj-$(CONFIG_BLK_DEV_IDEPCI)		+= pci/
 
 # Core IDE code - must come before legacy
 
-obj-$(CONFIG_BLK_DEV_IDE)		+= ide-probe.o ide-geometry.o ide-iops.o ide-taskfile.o ide.o ide-lib.o
+ide-y					+= ide-geometry.o \
+					   ide-iops.o ide-taskfile.o  \
+					   ide-main.o ide-lib.o
+ide-$(CONFIG_PROC_FS)			+= ide-proc.o
+ide-objs				:= $(ide-y)
+
+obj-$(CONFIG_BLK_DEV_IDE)		+= ide-probe.o ide.o
+
 obj-$(CONFIG_BLK_DEV_IDEDISK)		+= ide-disk.o
 obj-$(CONFIG_BLK_DEV_IDECD)		+= ide-cd.o
 obj-$(CONFIG_BLK_DEV_IDETAPE)		+= ide-tape.o
@@ -23,10 +31,6 @@
 obj-$(CONFIG_BLK_DEV_IDEPCI)		+= setup-pci.o
 obj-$(CONFIG_BLK_DEV_IDEDMA_PCI)	+= ide-dma.o
 obj-$(CONFIG_BLK_DEV_ISAPNP)		+= ide-pnp.o
-
-ifeq ($(CONFIG_BLK_DEV_IDE),y)
-obj-$(CONFIG_PROC_FS)			+= ide-proc.o
-endif
 
 obj-$(CONFIG_BLK_DEV_IDE)		+= legacy/ ppc/ arm/
 
===== drivers/ide/ide-main.c 1.22 vs edited =====
--- 1.22/drivers/ide/ide-main.c	Tue Sep 24 10:20:32 2002
+++ edited/drivers/ide/ide-main.c	Tue Sep 24 09:40:30 2002
@@ -3553,7 +3553,9 @@
 	return 0;
 }
 
+#ifndef MODULE
 module_init(ide_init);
+#endif
 
 #ifdef MODULE
 char *options = NULL;


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 2.5.38: modular IDE broken
  2002-09-24 14:13   ` Bob_Tracy
  2002-09-24 16:30     ` Kai Germaschewski
@ 2002-09-26 16:10     ` Alan Cox
  2002-09-27 20:37       ` Bob_Tracy
  1 sibling, 1 reply; 7+ messages in thread
From: Alan Cox @ 2002-09-26 16:10 UTC (permalink / raw)
  To: Bob_Tracy; +Cc: Kai Germaschewski, linux-kernel

> Specific example: proc_ide_read_geometry has the requisite EXPORT_SYMBOL()
> wrapper in ide-proc.c, yet, I still end up with proc_ide_read_geometry_R*
> unresolved at depmod time.  In case anyone is wondering, I *did* do a
> "make clean", manually cleaned out linux/include/modules to make *sure*

Let me give a simple clear explanation here. I don't give a flying ***k
about modular IDE until the IDE works. Cleaning up the modular IDE after
it all works is relatively easy and gets easier the more IDE is cleaned
up. Until then its not even on the radar unless someone else wants to do
all the work for 2.4/2.5 and verify/test them


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 2.5.38: modular IDE broken
  2002-09-26 16:10     ` Alan Cox
@ 2002-09-27 20:37       ` Bob_Tracy
  2002-09-27 22:41         ` Alan Cox
  0 siblings, 1 reply; 7+ messages in thread
From: Bob_Tracy @ 2002-09-27 20:37 UTC (permalink / raw)
  To: Alan Cox; +Cc: Kai Germaschewski, linux-kernel

Alan Cox wrote:
> Let me give a simple clear explanation here. I don't give a flying ***k
> about modular IDE until the IDE works.

Understood.  My position is simply that I noted something broken, and
I reported it during the development cycle.  Would you prefer that I
had waited until after 2.5.X became 2.6?  I didn't think so...  I was
not (and am not) presuming to dictate what any developer's priorities
should be.

-- 
-----------------------------------------------------------------------
Bob Tracy                   WTO + WIPO = DMCA? http://www.anti-dmca.org
rct@frus.com
-----------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 2.5.38: modular IDE broken
  2002-09-27 20:37       ` Bob_Tracy
@ 2002-09-27 22:41         ` Alan Cox
  0 siblings, 0 replies; 7+ messages in thread
From: Alan Cox @ 2002-09-27 22:41 UTC (permalink / raw)
  To: Bob_Tracy; +Cc: Kai Germaschewski, linux-kernel

On Fri, 2002-09-27 at 21:37, Bob_Tracy wrote:
> Understood.  My position is simply that I noted something broken, and
> I reported it during the development cycle.  Would you prefer that I
> had waited until after 2.5.X became 2.6?  I didn't think so...  I was
> not (and am not) presuming to dictate what any developer's priorities
> should be.

Nod.. its just I've had lots of equally helpful reports 8)


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-09-27 22:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-23 21:28 2.5.38: modular IDE broken Bob_Tracy
2002-09-23 22:51 ` Kai Germaschewski
2002-09-24 14:13   ` Bob_Tracy
2002-09-24 16:30     ` Kai Germaschewski
2002-09-26 16:10     ` Alan Cox
2002-09-27 20:37       ` Bob_Tracy
2002-09-27 22:41         ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).