[lkml]   [2001]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectISSUE and PATCH: failure to build certain modules on alpha
This concerns a failure to build certain modules on the Alpha
platform. A patch to fix this is attached.

The current kernel sources fail to build certain parts as modules
on the Alpha correctly. The modules in question are udf.o (UDF filesystem),
ext2.o (ext2 filesystem) and ymfpci.o (sound module).

The apparent problem with the filesystem modules is that the function
'memscan' is implemented as a macro on the i386 platform, but as a regular
functions on other architectures like the Alpha. I only attempted to fix the
issue on the Alpha, as my experience in kernel hacking isn't extensive. If
other platforms are affected, I presume the fix would be similar to what I
did for the Alpha.

From what I can see, the issue with the ymfpci module is general in
nature and probably affects all platforms. The macro 'mdelay' is defined in
include/linux/delay.h, which is not included by drivers/sound/ymfpci.c.

Keywords: drivers, modules, alpha, unresolved symbols

Versions affected: all 2.4 versions (confirmed on 2.4.10 and 2.4.13).
This is a Debian GNU/Linux system running unstable.
marsupilami:~# cat /proc/version
Linux version 2.4.10 (stroucki@marsupilami) (gcc version 2.95.4 20010902 (Debian prerelease)) #1 Tue Sep 25 02:02:22 EDT 2001
marsupilami:~# uname -a
Linux marsupilami 2.4.10 #1 Tue Sep 25 02:02:22 EDT 2001 alpha unknown

Triggering issue:
Kernel compile (using make-kpkg) completes successfully, but on installing
(via dpkg -i), unresolved symbols are found by depmod. The kernel boots,
but the affected modules to not insert.
Here's a detailed output of depmod:-
marsupilami:/lib/modules/2.4.13# depmod -e -a -F /boot/ 2.4.13
depmod: *** Unresolved symbols in /lib/modules/2.4.13/kernel/drivers/sound/ymfpci.o
depmod: mdelay
depmod: *** Unresolved symbols in /lib/modules/2.4.13/kernel/fs/ext2/ext2.o
depmod: memscan
depmod: *** Unresolved symbols in /lib/modules/2.4.13/kernel/fs/udf/udf.o
depmod: memscan

The patch is attached to this message and fixes the issue on the Alpha.
It is quite small, only 19 lines. It was generated from the 2.4.13 sources,
but should apply to 2.4.10 and others also.

I first became annoyed enough to work on this with the 2.4.10 version.
After the patch was applied, the warnings from depmod were absent, and
upon booting, the relevant modules inserted (and removed) correctly:-
marsupilami:~# lsmod
Module Size Used by
udf 141904 0 (unused)
ext2 50024 2 (autoclean)

Personal info:
I do not read the kernel mailing list regularly, but will do so for the
next week. I am reachable at .

This message may have passed through thousands of machines throughout
the entire civilised world. It might have cost the net hundreds, if not
thousands of dollars to send everywhere.
Michael Stroucken ++ ++ DEC Alpha ++ 1982 Honda CM450C
diff -urN kernel-source-2.4.13.orig/arch/alpha/kernel/alpha_ksyms.c kernel-source-2.4.13/arch/alpha/kernel/alpha_ksyms.c
--- kernel-source-2.4.13.orig/arch/alpha/kernel/alpha_ksyms.c Fri Oct 12 18:35:53 2001
+++ kernel-source-2.4.13/arch/alpha/kernel/alpha_ksyms.c Sun Nov 4 18:12:42 2001
@@ -257,3 +257,4 @@

diff -urN kernel-source-2.4.13.orig/drivers/sound/ymfpci.c kernel-source-2.4.13/drivers/sound/ymfpci.c
--- kernel-source-2.4.13.orig/drivers/sound/ymfpci.c Mon Oct 22 11:38:18 2001
+++ kernel-source-2.4.13/drivers/sound/ymfpci.c Sun Nov 4 18:12:56 2001
@@ -51,6 +51,7 @@
#include <linux/soundcard.h>
#include <linux/ac97_codec.h>
#include <linux/sound.h>
+#include <linux/delay.h>

#include <asm/io.h>
#include <asm/dma.h>[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2005-03-22 13:12    [W:0.038 / U:0.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site