* couldn't find the kernel version the module was compiled for
@ 2003-10-20 13:05 Rakesh jagota
2003-10-20 15:08 ` Wolfgang Denk
0 siblings, 1 reply; 2+ messages in thread
From: Rakesh jagota @ 2003-10-20 13:05 UTC (permalink / raw)
To: linuxppc-embedded
Hi all,
I am working on mpc8245 based board. I ahve compiled he rtc driver as a
seperate modules. I have 2 function in assembly file i2c2.S. Its getting
compiled but when I am inserting the module I am getting the above mentioned
error.
i2c2.o: couldn't find the kernel version the module was compiled for
x1226.o: Unresolved symbol load_runtime_reg
x1226.o: Unresolved symbol store_runtime_reg
The assembly file is like this:
/**************************************
*
* copyright @ Motorola, 1999
*
**************************************/
#include <linux/config.h>
#define CONFIG_HARD_I2C
#ifdef CONFIG_HARD_I2C
//#include <ppc_asm.tmpl>
#include <linux/ppc_asm.tmpl>
#include <asm/mmu.h>
/**********************************************************
* function: load_runtime_reg
*
* input: r3 - value of eumbbar
* r4 - register offset in embedded utility space
*
* output: r3 - register content
**********************************************************/
.text
.align 2
.globl load_runtime_reg
load_runtime_reg:
lwbrx r3,r4,r3
sync
bclr 20, 0
/****************************************************************
* function: store_runtime_reg
*
* input: r3 - value of eumbbar
* r4 - register offset in embedded utility space
* r5 - new value to be stored
*
****************************************************************/
.text
.align 2
.global store_runtime_reg
store_runtime_reg:
stwbrx r5, r4, r3
sync
bclr 20,0
/*
_GLOBAL(load_runtime_reg)
lwbrx r3,r4,r3
sync
bclr 20, 0
_GLOBAL(store_runtime_reg)
stwbrx r5, r4, r3
sync
bclr 20,0
*/
#endif /* CONFIG_HARD_I2C */
How can I avoid this.
Thanks & Regards,
rakesh
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: couldn't find the kernel version the module was compiled for
2003-10-20 13:05 couldn't find the kernel version the module was compiled for Rakesh jagota
@ 2003-10-20 15:08 ` Wolfgang Denk
0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2003-10-20 15:08 UTC (permalink / raw)
To: j.rakesh; +Cc: linuxppc-embedded
In message <200310201305.IAA20143@lists.linuxppc.org> you wrote:
>
> I am working on mpc8245 based board. I ahve compiled he rtc driver as a
> seperate modules. I have 2 function in assembly file i2c2.S. Its getting
> compiled but when I am inserting the module I am getting the above mentioned
> error.
And you are absolutely sure that what you use is Linux kernel code?
> i2c2.o: couldn't find the kernel version the module was compiled for
> x1226.o: Unresolved symbol load_runtime_reg
> x1226.o: Unresolved symbol store_runtime_reg
...
> How can I avoid this.
To mee it seems as if you used a source file which was not intended
for use with the Linux kernel, and adopted it for this purpose, but
poorly. You don't mention how you build your kernel module, s owe can
only speculate that there is either a problem with your source code,
or (more likely) with the way you compile and link your source files
into a module (like bad and/or missing compiler / linker options).
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
He'd been wrong, there _was_ a light at the end of the tunnel, and it
was a flamethrower. - Terry Pratchett, _Mort_
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-10-20 15:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-20 13:05 couldn't find the kernel version the module was compiled for Rakesh jagota
2003-10-20 15:08 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).