* RE: RE: Information required
@ 2003-08-29 11:21 Adeel Malik
0 siblings, 0 replies; 4+ messages in thread
From: Adeel Malik @ 2003-08-29 11:21 UTC (permalink / raw)
To: Dan Aizenstros; +Cc: linux-mips
Hi Dan,
I have tried -mlong-calls option to the compiler, but is still gives
"unable to resolve printk" when I insmod the LKM.
When I 'cat' the /proc/ksyms, it shows printk_Rcxyz.... When I disable the
MODVERSIONING by using 'make menuconfig' during kernel configuration
process, and build the kernel again for MIPS platform, the proc/ksyms still
shows the printk_Rcxyz ... i.e, function name with a suffix.
Can you elaborate as to what are the steps needed to build the kernel with
MODVERSIONING disabled, etc.....
Regards,
Adeel
-----Original Message-----
From: Dan Aizenstros [mailto:daizenstros@quicklogic.com]
Sent: Thursday, August 28, 2003 8:43 PM
To: AdeelM@avaznet.com
Subject: Re: RE: Information required
Hello Adeel,
You need to pass -mlong-calls to the compiler.
You can add it the CFLAGS.
Regards,
Dan Aizenstros
Software Engineering Manager
QuickLogic Canada
>>> Adeel Malik <AdeelM@avaznet.com> 08/28/03 08:22 AM >>>
Hello Jun,
Thanks for the reply.I have checked for the unresolved function symbols like
"printk" and "register_chrdev", and found that they are present in
/proc/ksyms. So it appears to me that I may be compiling the module with
incorrect parameters.
Below is the Makefile for the Loadable Module:
/***************************************************************************
**************************************/
CROSS_COMPILE=
/backup/buildroot-QuickMIPS/build/staging_dir/bin/mipsel-uclibc-
TARGET = example_driver
INCLUDE = /backup/buildroot-QuickMIPS/build/linux-2.4.20/include
CC = $(CROSS_COMPILE)gcc -I${INCLUDE}
CFLAGS = -DMODVERSIONS -I${INCLUDE}/linux/modversions.h
${TARGET}.o: ${TARGET}.c
.PHONY: clean
clean:
rm -rf ${TARGET}.o
/***************************************************************************
*************************************/
Do you think that I need to modify the makefile or add some more options to
CFLAGS.
I have ensured that the kernel is compiled with "module-option" turned on.
Also my module uses symbol versioning (sometimes called module versioning).
I use the following lines of code at the start of header file to accomplish
this:
/***************************************************************************
**********************************/
#if defined (CONFIG_MODVERSIONS) && ! defined (MODVERSIONS)
#include <linux/modversions.h>
#define MODVERSIONS
#endif
/***************************************************************************
*********************************/
I have successfully cross-compiled user-space applications on the target
platform. Only when i do the kernel work, this unresolved symbol (like
printk, register_chrdev, etc..) phenomenon happens.
ADEEL MALIK,
-----Original Message-----
From: linux-mips-bounce@linux-mips.org
[mailto:linux-mips-bounce@linux-mips.org]On Behalf Of Jun Sun
Sent: Wednesday, August 27, 2003 9:51 PM
To: Adeel Malik
Cc: linux-mips@linux-mips.org; jsun@mvista.com
Subject: Re: Information required
On Wed, Aug 27, 2003 at 07:30:26PM +0500, Adeel Malik wrote:
> Hi All,
> I am involved in Embedded Linux Development for MIPS Processor. I
> need to write a device driver for a MIPS Target Platform. When I insmod
the
> driver.o file, the linux bash script running on the target hardware gives
me
> the error message like ;
> 1. unable to resolve the printk function
> 2. unable to resolve the register_chardev function
> etc.
> Can you plz give me the direction as to how to proceed to tackle this
> situation.
Make sure your kernel compiled with module option turned on.
Does it use module version (CONFIG_MODVERSIONS)?
If so, add -DMODVERSIONS -include $(KERNEL_PATH)/include/linux/modversions.h
to your CFLAGS.
Jun
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: RE: Information required
@ 2003-08-30 11:34 Adeel Malik
2003-08-31 12:04 ` Bradley D. LaRonde
0 siblings, 1 reply; 4+ messages in thread
From: Adeel Malik @ 2003-08-30 11:34 UTC (permalink / raw)
To: Dan Aizenstros; +Cc: linux-mips
Hi Dan,
I have been able to resolve all the unresolved function symbols, by
properly configuring the MODVERSIONING in the module code. Only two symbols
are left:
1. unresolved symbol Atomic_add
2. unresolved symbol Atomic_sub
These symbols are not even in /proc/ksyms and System.map file of the
cross-compild linux-2.4 directory.
So can you guide me further,
Thanks in advance,
Adeel
-----Original Message-----
From: Dan Aizenstros [mailto:daizenstros@quicklogic.com]
Sent: Thursday, August 28, 2003 8:43 PM
To: AdeelM@avaznet.com
Subject: Re: RE: Information required
Hello Adeel,
You need to pass -mlong-calls to the compiler.
You can add it the CFLAGS.
Regards,
Dan Aizenstros
Software Engineering Manager
QuickLogic Canada
>>> Adeel Malik <AdeelM@avaznet.com> 08/28/03 08:22 AM >>>
Hello Jun,
Thanks for the reply.I have checked for the unresolved function symbols like
"printk" and "register_chrdev", and found that they are present in
/proc/ksyms. So it appears to me that I may be compiling the module with
incorrect parameters.
Below is the Makefile for the Loadable Module:
/***************************************************************************
**************************************/
CROSS_COMPILE=
/backup/buildroot-QuickMIPS/build/staging_dir/bin/mipsel-uclibc-
TARGET = example_driver
INCLUDE = /backup/buildroot-QuickMIPS/build/linux-2.4.20/include
CC = $(CROSS_COMPILE)gcc -I${INCLUDE}
CFLAGS = -DMODVERSIONS -I${INCLUDE}/linux/modversions.h
${TARGET}.o: ${TARGET}.c
.PHONY: clean
clean:
rm -rf ${TARGET}.o
/***************************************************************************
*************************************/
Do you think that I need to modify the makefile or add some more options to
CFLAGS.
I have ensured that the kernel is compiled with "module-option" turned on.
Also my module uses symbol versioning (sometimes called module versioning).
I use the following lines of code at the start of header file to accomplish
this:
/***************************************************************************
**********************************/
#if defined (CONFIG_MODVERSIONS) && ! defined (MODVERSIONS)
#include <linux/modversions.h>
#define MODVERSIONS
#endif
/***************************************************************************
*********************************/
I have successfully cross-compiled user-space applications on the target
platform. Only when i do the kernel work, this unresolved symbol (like
printk, register_chrdev, etc..) phenomenon happens.
ADEEL MALIK,
-----Original Message-----
From: linux-mips-bounce@linux-mips.org
[mailto:linux-mips-bounce@linux-mips.org]On Behalf Of Jun Sun
Sent: Wednesday, August 27, 2003 9:51 PM
To: Adeel Malik
Cc: linux-mips@linux-mips.org; jsun@mvista.com
Subject: Re: Information required
On Wed, Aug 27, 2003 at 07:30:26PM +0500, Adeel Malik wrote:
> Hi All,
> I am involved in Embedded Linux Development for MIPS Processor. I
> need to write a device driver for a MIPS Target Platform. When I insmod
the
> driver.o file, the linux bash script running on the target hardware gives
me
> the error message like ;
> 1. unable to resolve the printk function
> 2. unable to resolve the register_chardev function
> etc.
> Can you plz give me the direction as to how to proceed to tackle this
> situation.
Make sure your kernel compiled with module option turned on.
Does it use module version (CONFIG_MODVERSIONS)?
If so, add -DMODVERSIONS -include $(KERNEL_PATH)/include/linux/modversions.h
to your CFLAGS.
Jun
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: RE: Information required
2003-08-30 11:34 RE: Information required Adeel Malik
@ 2003-08-31 12:04 ` Bradley D. LaRonde
2003-08-31 12:04 ` Bradley D. LaRonde
0 siblings, 1 reply; 4+ messages in thread
From: Bradley D. LaRonde @ 2003-08-31 12:04 UTC (permalink / raw)
To: Adeel Malik; +Cc: linux-mips
----- Original Message -----
From: "Adeel Malik" <AdeelM@avaznet.com>
To: "Dan Aizenstros" <daizenstros@quicklogic.com>
Cc: <linux-mips@linux-mips.org>
Sent: Saturday, August 30, 2003 7:34 AM
Subject: RE: RE: Information required
> I have been able to resolve all the unresolved function symbols, by
> properly configuring the MODVERSIONING in the module code. Only two
symbols
> are left:
>
> 1. unresolved symbol Atomic_add
> 2. unresolved symbol Atomic_sub
>
> These symbols are not even in /proc/ksyms and System.map file of the
> cross-compild linux-2.4 directory.
I don't think you'll find those in Linux. Maybe your module relies on
another module.
Regards,
Brad
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: RE: Information required
2003-08-31 12:04 ` Bradley D. LaRonde
@ 2003-08-31 12:04 ` Bradley D. LaRonde
0 siblings, 0 replies; 4+ messages in thread
From: Bradley D. LaRonde @ 2003-08-31 12:04 UTC (permalink / raw)
To: Adeel Malik; +Cc: linux-mips
----- Original Message -----
From: "Adeel Malik" <AdeelM@avaznet.com>
To: "Dan Aizenstros" <daizenstros@quicklogic.com>
Cc: <linux-mips@linux-mips.org>
Sent: Saturday, August 30, 2003 7:34 AM
Subject: RE: RE: Information required
> I have been able to resolve all the unresolved function symbols, by
> properly configuring the MODVERSIONING in the module code. Only two
symbols
> are left:
>
> 1. unresolved symbol Atomic_add
> 2. unresolved symbol Atomic_sub
>
> These symbols are not even in /proc/ksyms and System.map file of the
> cross-compild linux-2.4 directory.
I don't think you'll find those in Linux. Maybe your module relies on
another module.
Regards,
Brad
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-08-31 12:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-30 11:34 RE: Information required Adeel Malik
2003-08-31 12:04 ` Bradley D. LaRonde
2003-08-31 12:04 ` Bradley D. LaRonde
-- strict thread matches above, loose matches on Subject: below --
2003-08-29 11:21 Adeel Malik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox