John, I reduced the problem down to a tiny device driver called bobtest, and that's what I attached. It's so small, I don't even need to tar it up. It's just the makefile and the source. If I do: rm bobtest.o ; make bobtest.o It works on my libc Slackware machine. If I do the same command from my Redhat machine, glibc 5.5, it fails saying it can't find a name-mangled "printk." I can compile my company's entire regiment of software on the same Redhat machine, all but the device drivers which give these annoying messages. Any help you can give me would be appreciated. Regards, Bob Peterson At 09:19 AM 5/12/2000 +0800, you wrote: >Tarball it and email it to me (just the bits I need to add, not the whole >kernel) and I'l have a quick go at it. > >I have gvv 2.7.2.3 (RHL 5.x) egcs and gcc 2.95-2 to try with. > >. > >-- >Cheers >John Summerfield >http://os2.ami.com.au/os2/ for OS/2 support. >Configuration, networking, combined IBM ftpsites index.
/* bobtest - test device driver */ /* by Bob Peterson */ #define __KERNEL_SYSCALLS #define DEBUG 1 #include <linux/kernel.h> #include <linux/module.h> #include <asm/system.h> #include <asm/io.h> #include <asm/uaccess.h> #include <linux/config.h> #include <linux/kmod.h> #include <linux/unistd.h> #include <linux/errno.h> #include <linux/types.h> #include <linux/mm.h> #include <linux/miscdevice.h> #include <linux/malloc.h> #include <linux/ioport.h> #include <linux/fcntl.h> #include <linux/delay.h> #include <linux/fs.h> #include <linux/wrapper.h> #define MODVERSIONS #include <linux/modversions.h> #define __MAIN__ #define MAINLINE /*#include "acdvic3.h"*/ static int Major; /* ------------------------------------------------------------------------ */ /* acd_open */ /* ------------------------------------------------------------------------ */ static int acd_open(struct inode * inode, struct file * file) { return 0; } /* ------------------------------------------------------------------------ */ /* acd_close */ /* ------------------------------------------------------------------------ */ static int acd_close(struct inode * inode, struct file * file) { return 0; } static struct file_operations acd_fops = { NULL, /* llseek */ NULL, /* read */ NULL, /* write */ NULL, /* readdir */ NULL, /* poll */ NULL, /* ioctl */ NULL, /* mmap */ acd_open, /* open */ NULL, /* flush */ acd_close, /* release */ NULL, /* fsync */ NULL, /* fasync */ NULL, /* check_media_change */ NULL, /* revalidate */ NULL /* lock */ }; static struct miscdevice acd_dev1 ={ 221, "acd", &acd_fops }; /*-------------------------------------------------------------------------- */ /* init_module - initialization */ /*-------------------------------------------------------------------------- */ int init_module() { printk("Testing 1 2 3!\n"); misc_register(&acd_dev1); Major=module_register_chrdev(0,"ACD0001",&acd_fops); return 0; } /* ------------------------------------------------------------------------ */ /* cleanup_module */ /* ------------------------------------------------------------------------ */ void cleanup_module() { printk("A"); module_unregister_chrdev(Major,"ACD0001"); misc_deregister(&acd_dev1); }
LIBPATH=../lib OPTIMIZE = -fomit-frame-pointer -O2 -fno-strength-reduce -pipe CFLAGS=-Wall -m486 -L$(LIBPATH) -I$(LIBPATH) $(OPTIMIZE) -DMODULE -D__KERNEL__ -DLINUX -DCONFIG_MODVERSIONS all: acdvic3.o dsp dsp.o: dsp.cpp dsp.h ../lib/acdvic3.h gcc -c -Wall dsp.cpp -Wall -m486 -L$(LIBPATH) -I$(LIBPATH) dsp: dsp.o gcc -Wall -o dsp dsp.o acdvic3.o: acdvic3.c ../lib/acdvic3.h vic3.ldr hdump vic3.ldr /c > firmware.h rm -f acdvic3.o cc -c $(CFLAGS) acdvic3.c sync bobtest.o: bobtest.c gcc -c $(CFLAGS) bobtest.c
Bob Peterson Advanced Communication Design (612) 854-4000 [EMAIL PROTECTED]