Question about modules
A message that is not in the archive (sent off-list or not yet received): 1046783010.328.73.camel@muse
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_SYMBOLmacro tocommproc.cand listing it in export-objs inarch/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/
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_SYMBOLmacro tocommproc.cand listing it in export-objs inarch/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/
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/