Skip to contentSkip to conversation

insmod trouble

DISCUSSION Marco Schramel 2 participants 4 messages May 25, 2004 – May 27, 2004

lore
Share & tools
lore
#0 lore raw

Hi all,

My MPC8270 system works with 2.4.26 (toolchain ELDK), for development i use NFS (opt/eldk/ppc_82xx as rootfs). Now i write a device driver and have some trouble. I ve searched the whole list, but i didn't found some helpfully comments.

--------------------------------------------------
bash-2.05b# insmod demodriver.o
demodriver.o: unresolved symbol module_unregister_chrdev demodriver.o: unresolved symbol register_chrdev demodriver.o: unresolved symbol led_init demodriver.o: unresolved symbol printf demodriver.o: unresolved symbol printk
------------------------------------------------

What is the reason for this messages ??
I have enabled module support in my kernel.

Thanks in advance

Marco

---------
Marco Schramel
R&D
Bartec GmbH
Schulstr. 30
94239 Gotteszell, Germany
www.bartec.de
[email protected]

Phone:  +49 (0)9929/301332
Fax:    +49 (0)9929/301112

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#1 lore raw
Quoted 13 lines · In message <[email protected]> you wrote:

My MPC8270 system works with 2.4.26 (toolchain ELDK), for development i use NFS (opt/eldk/ppc_82xx as rootfs). Now i write a device driver and have some trouble. I ve searched the whole list, but i didn't found some helpfully comments.

--------------------------------------------------
bash-2.05b# insmod demodriver.o
demodriver.o: unresolved symbol module_unregister_chrdev demodriver.o: unresolved symbol register_chrdev demodriver.o: unresolved symbol led_init demodriver.o: unresolved symbol printf demodriver.o: unresolved symbol printk
------------------------------------------------

Quoted 1 line

What is the reason for this messages ??

The reason is bugs in your driver code.

module_unregister_chrdev - there is no such function in the Linux kernel.
Do you mean unregister_chrdev() or devfs_unregister_chrdev()?

led_init - there is no such exported kernel symbol. Which function
are you trying to call? Is this something in your own driver?

printk - there is no such function in the Linux kernel. Did you mean
printk() instead?

register_chrdev, printk - I can only speculate. These are exported
kernel symbols. probably you compile the driver with bad or incomplete compiler options?

Best regards,

Wolfgang Denk

--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: [email protected] Horses just naturally have mohawk haircuts.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#2 lore raw

Zusatz zuRe: insmod trouble

Ich habe noch vergessen, Ihnen meine Compileroptionen zu sagen, "ppc_82xx-gcc -I /home/marco/linux-2.4.26/include -D __KERNEL__ -D MODULE -c Demodriver.c" Ohne Warnungen mit ELDK 3.0
Gruß
Marco

--
---------
Marco Schramel
R&D
Bartec GmbH
Schulstr. 30
94239 Gotteszell, Germany
www.bartec.de
[email protected]

Phone:  +49 (0)9929/301332
Fax:    +49 (0)9929/301112

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#3 lore raw
In reply to Wolfgang Denk

Hi all,

my problem was ...

Quoted 9 lines
Quoted 9 lines

--------------------------------------------------
bash-2.05b# insmod demodriver.o
demodriver.o: unresolved symbol module_unregister_chrdev demodriver.o: unresolved symbol register_chrdev demodriver.o: unresolved symbol led_init demodriver.o: unresolved symbol printk
------------------------------------------------

What is the reason for this messages ??

Solution: You have to disable "Set version information on all module symbols" under "Loadable module support" in our kernel config.

Thanx for comments
Marco

---------
Marco Schramel
R&D
Bartec GmbH
Schulstr. 30
94239 Gotteszell, Germany
www.bartec.de
[email protected]

Phone:  +49 (0)9929/301332
Fax:    +49 (0)9929/301112

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/