Skip to contentSkip to conversation

Question about modules

DISCUSSION Wolfgang Denk 2 participants 3 messages Mar 4, 2003 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 3 lines · In message <1046783010.328.73.camel@muse> you wrote:

I understand that reason, and i'm not certain about the usefulness of modules in embedded systems.

They are _very_ useful during development. They may also be useful to
make driver initialization and/or operation controllable by
application code.

In general you are right: statically linking the required drivers is usually a better approach.

Quoted 4 lines

Anyway, my original purpose was to develop the driver as a module, and afterwards insert it into the kernel. I have just done it adding the EXPORT_SYMBOL macro to commproc.c and listing it in export-objs in arch/ppc/8xx_io/Makefile. Right, isn't it?

Yes, this is all that is needed.

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] "In the face of entropy and nothingness, you kind of have to pretend it's not there if you want to keep writing good code."
- Karl Lehenbauer

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

#3 lore raw
In reply to Bret Indrelee
Quoted 2 lines · In message <[email protected]> you…

Modules are generally easier to debug.

I'm not sure if I want to agree here.

First, you have to learn how to use GDB to deal with the symbol table of a dynamically loaded module. Second, did you ever try to set a breakpoint in the init function of a dynamically loaded module? It is possible to do that, but you need a certain level of understanding, and if your boot loader supports download over ethernet it is usually easier and faster to debug this situation with a statically linked driver.

You are right however as far as the modify-compile-load-run-unload development cycle is concerned.

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] If I can have honesty, it's easier to overlook mistakes.

	-- Kirk, "Space Seed", stardate 3141.9

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

#2 lore raw
In reply to a message not in the archive
Quoted 2 lines · Ibon Gotxi Garcia

I understand that reason, and i'm not certain about the usefulness of modules in embedded systems.

Modules are generally easier to debug.

Quoted 6 lines

Anyway, my original purpose was to develop the driver as a module, and afterwards insert it into the kernel. I have just done it adding the EXPORT_SYMBOL macro to commproc.c and listing it in export-objs in arch/ppc/8xx_io/Makefile. Right, isn't it?

Quoted 10 lines

Cheers.

Quoted 2 lines

Wolfgang Denk

--
Ibon Gotxi Garcia <[email protected]>

--
Bret Indrelee QLogic Corporation
[email protected] 6321 Bury Drive, St 13, Eden Prairie, MN 55346

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