* 2.4.0-prerelease
@ 2000-12-31 22:38 J Sloan
2001-01-01 0:16 ` 2.4.0-prerelease Tom Rini
2001-01-01 4:59 ` [patch] 2.4.0-prerelease drm and modversions Keith Owens
0 siblings, 2 replies; 3+ messages in thread
From: J Sloan @ 2000-12-31 22:38 UTC (permalink / raw)
To: Kernel Mailing List
Looks good here in most respects, but still needs makefile fixes -
# modprobe tdfx
/lib/modules/2.4.0-prerelease/kernel/drivers/char/drm/tdfx.o: unresolved
symbol remap_page_range
/lib/modules/2.4.0-prerelease/kernel/drivers/char/drm/tdfx.o: unresolved
symbol __wake_up
/lib/modules/2.4.0-prerelease/kernel/drivers/char/drm/tdfx.o: unresolved
symbol mtrr_add
.... etc, etc
Of course, adding
#include <linux/modversions.h>
to drivers/char/drm/drmP.h makes it all work....
jjs
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 2.4.0-prerelease
2000-12-31 22:38 2.4.0-prerelease J Sloan
@ 2001-01-01 0:16 ` Tom Rini
2001-01-01 4:59 ` [patch] 2.4.0-prerelease drm and modversions Keith Owens
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2001-01-01 0:16 UTC (permalink / raw)
To: J Sloan; +Cc: Kernel Mailing List
On Sun, Dec 31, 2000 at 02:38:16PM -0800, J Sloan wrote:
> Of course, adding
>
> #include <linux/modversions.h>
>
> to drivers/char/drm/drmP.h makes it all work....
Right, but that _shouldn't_ be needed. iirc, modversions.h should be included
when needed, so this is covering up the bug not fixing it.
--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 3+ messages in thread
* [patch] 2.4.0-prerelease drm and modversions
2000-12-31 22:38 2.4.0-prerelease J Sloan
2001-01-01 0:16 ` 2.4.0-prerelease Tom Rini
@ 2001-01-01 4:59 ` Keith Owens
1 sibling, 0 replies; 3+ messages in thread
From: Keith Owens @ 2001-01-01 4:59 UTC (permalink / raw)
To: J Sloan; +Cc: Kernel Mailing List, Alan Cox, dri-devel, torvalds
On Sun, 31 Dec 2000 14:38:16 -0800,
J Sloan <jjs@pobox.com> wrote:
>Looks good here in most respects, but still needs makefile fixes -
>
># modprobe tdfx
>/lib/modules/2.4.0-prerelease/kernel/drivers/char/drm/tdfx.o: unresolved
>symbol remap_page_range
>.... etc, etc
>
>Of course, adding
>
>#include <linux/modversions.h>
>
>to drivers/char/drm/drmP.h makes it all work....
Wrong fix.
drivers/char/drm/Makefile is breaking the Makefile rules. It builds
drmlib.a and expects to link that library into both the kernel and into
modules. The kernel makefile system assumes that everything is either
kernel or module, not both. The components in drmlib.a get compiled
for kernel only, when used in a module they are missing the symbol
versions.
The ability to link into both kernel and modules will be available in
the 2.5 Makefile redesign (already in progress) but this bandaid will
fix 2.4. It is still fragile, if you change a drm driver from module
to built in or vice versa then you have to manually remove the old drm
driver first, but few people will do that (I hope).
The bandaid is to generate two copies of drmlib from the same C
sources, one for kernel and one for modules.
Index: 0-prerelease.1/drivers/char/drm/Makefile
--- 0-prerelease.1/drivers/char/drm/Makefile Sat, 16 Dec 2000 15:22:55 +1100 kaos (linux-2.4/I/b/2_Makefile 1.1.1.6 644)
+++ 0-prerelease.1(w)/drivers/char/drm/Makefile Mon, 01 Jan 2001 15:56:48 +1100 kaos (linux-2.4/I/b/2_Makefile 1.1.1.6 644)
@@ -55,13 +55,23 @@ obj-$(CONFIG_DRM_I810) += i810.o
# When linking into the kernel, link the library just once.
# If making modules, we include the library into each module
+lib-objs-mod := $(patsubst %.o,%-mod.o,$(lib-objs))
+obj-m += $(lib-objs-mod)
+
ifdef MAKING_MODULES
- lib = drmlib.a
+ lib = drmlib-mod.a
else
obj-y += drmlib.a
endif
include $(TOPDIR)/Rules.make
+
+$(patsubst %.o,%.c,$(lib-objs-mod)):
+ @ln -sf $(subst -mod,,$@) $@
+
+drmlib-mod.a: $(lib-objs-mod)
+ rm -f $@
+ $(AR) $(EXTRA_ARFLAGS) rcs $@ $(lib-objs-mod)
drmlib.a: $(lib-objs)
rm -f $@
Index: 0-prerelease.1/Makefile
--- 0-prerelease.1/Makefile Mon, 01 Jan 2001 14:23:43 +1100 kaos (linux-2.4/B/c/27_Makefile 1.1.2.2.2.4.1.7.1.3.1.5.2.5.2.2.1.6.1.10 644)
+++ 0-prerelease.1(w)/Makefile Mon, 01 Jan 2001 15:47:10 +1100 kaos (linux-2.4/B/c/27_Makefile 1.1.2.2.2.4.1.7.1.3.1.5.2.5.2.2.1.6.1.10 644)
@@ -188,6 +188,7 @@ CLEAN_FILES = \
.tmp* \
drivers/char/consolemap_deftbl.c drivers/video/promcon_tbl.c \
drivers/char/conmakehash \
+ drivers/char/drm/*-mod.c \
drivers/pci/devlist.h drivers/pci/classlist.h drivers/pci/gen-devlist \
drivers/zorro/devlist.h drivers/zorro/gen-devlist \
drivers/sound/bin2hex drivers/sound/hex2hex \
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-01-01 5:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-12-31 22:38 2.4.0-prerelease J Sloan
2001-01-01 0:16 ` 2.4.0-prerelease Tom Rini
2001-01-01 4:59 ` [patch] 2.4.0-prerelease drm and modversions Keith Owens
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox