[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [microblaze-uclinux] GPIO as a Loadable module



Steven,
Thank you for the hint, although I had already done the export stuff, 
I forgot to add the xilinx_syms.o in the makefile. I do not have symbol reference problem anymore.  

To All,
It is out of topic, but while investigating module loading problem, I have found a little bug in 
linux-2.6.x/arch/microblaze/kernel/modules.c (line 134) 

I think we should replace :

				module->name, ELF32_R_TYPE(rela.r_info);
by 
				module->name, ELF32_R_TYPE(rela[i].r_info);

Regards,

Hugo

-----Message d'origine-----
De : Steven J. Magnani [mailto:steve@xxxxxxxxxxxxxxx] 
Envoyé : 13 octobre 2009 17:17
À : microblaze-uclinux@xxxxxxxxxxxxxx
Objet : Re: [microblaze-uclinux] GPIO as a Loadable module

Hi Hugo,

I believe some of the Xilinx API functions are not present in
drivers/xilinx_common/xilinx_syms.c and so are not exported to modules.
I believe it is OK to add EXPORT_SYMBOL_GPL statements for the things
you need; I seem to recall that this was done in one of the Xilinx GIT
trees, but last I checked had not made it to the mainline kernel.

Regards,
------------------------------------------------------------------------
 Steven J. Magnani               "I claim this network for MARS!
 www.digidescorp.com              Earthling, return my space modulator!"

 #include <standard.disclaimer>

On Tue, 2009-10-13 at 16:21 -0400, Hugo Marchand wrote:
> Hi,
> 
>  
> 
> When I try to load " xilinx_gpio.ko" , with insmod, there is the
> following unresolved symbols:
> 
>  
> 
> [42949666.150000] xilinx_gpio: Unknown symbol XIo_Out32
> 
> [42949666.160000] xilinx_gpio: Unknown symbol XAssertStatus
> 
> [42949666.170000] xilinx_gpio: Unknown symbol XIo_In32
> 
> [42949666.180000] xilinx_gpio: Unknown symbol XAssert
> 
>  
> 
> in the build process I have the following warnings:
> 
>  
> 
> WARNING: "XAssert" [drivers/char/xilinx_gpio/xilinx_gpio.ko]
> undefined!                        
> 
> WARNING: "XIo_In32" [drivers/char/xilinx_gpio/xilinx_gpio.ko]
> undefined!                       
> 
> WARNING: "XAssertStatus" [drivers/char/xilinx_gpio/xilinx_gpio.ko]
> undefined!                  
> 
> WARNING: "XIo_Out32" [drivers/char/xilinx_gpio/xilinx_gpio.ko]
> undefined!                      
> 
> make[2]: [__modpost] Error 1
> (ignored)                                                         
> 
>  
> 
>  
> 
> I am using the latest petalinux release (0.40-final) with Kernel 2.6
> on a MMu machine, and the gpio driver is working when linked
> statically into the kernel.
> 
>  
> 
> Question:
> 
> Is there something special to do in order to be able to use
> xilinx_gpio as a loadable module instead of a build-in driver ? 
> 
>  
> 
>  
> 
> Thanks
> 
>  
> 
>  
> 
> Hugo Marchand, B.Sc. Electrical Engineering
> 
> Software Engineer | Ingénieur Logiciel
> 
> Lyrtech
> 
> Phone/Tél. : (1) (418) 877-4644 #296
> 
> Toll-free/Sans frais - Canada & USA : (1) (888) 922-4644 #296
> 
> Fax/Téléc. : (1) (418) 877-7710
> 
> www.lyrtech.com
> 
> Infinite possibilities...TM
> 
>  
> 
>  
> 
> 
> ---
> THIS MESSAGE AND ALL ATTACHED DOCUMENTS ARE EXCLUSIVELY INTENDED
> TO THE INDICATED RECIPIENTS AND ITS CONTENTS MAY BE
> CONFIDENTIAL.
> IT IS STRICTLY FORBIDDEN TO ANYONE TO TAKE COGNIZANCE, USE, OR
> DIVULGE THE INFORMATION CONTAINED HEREIN. IF YOU MISTAKENLY
> RECEIVE THIS MESSAGE, IMMEDIATELY INFORM LYRTECH AND DESTROY
> THE
> MESSAGE AND ATTACHMENTS FORTHWITH.THANK YOU.
> 
> LE PRESENT MESSAGE ET LES DOCUMENTS QUI Y SONT JOINTS
> S'ADRESSENT EXCLUSIVEMENT AU(X)DESTINATAIRE(S) INDIQUE(S) ET
> LEUR TENEUR PEUT ETRE CONFIDENTIELLE. IL EST STRICTEMENT
> INTERDIT A QUICONQUE D'EN PRENDRE CONNAISSANCE, DE LES UTILISER
> OU DE LES DIVULGUER. SI VOUS RECEVEZ LE PRESENT MESSAGE PAR
> ERREUR, VEUILLEZ EN AVISER LYRTECH IMMEDIATEMENT ET DETRUIRE LE
> MESSAGE SEANCE TENANTE, AINSI QUE LES DOCUMENTS QUI Y SONT
> JOINTS.
> 


___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/




---
THIS MESSAGE AND ALL ATTACHED DOCUMENTS ARE EXCLUSIVELY INTENDED
TO THE INDICATED RECIPIENTS AND ITS CONTENTS MAY BE
CONFIDENTIAL.
IT IS STRICTLY FORBIDDEN TO ANYONE TO TAKE COGNIZANCE, USE, OR
DIVULGE THE INFORMATION CONTAINED HEREIN. IF YOU MISTAKENLY
RECEIVE THIS MESSAGE, IMMEDIATELY INFORM LYRTECH AND DESTROY
THE
MESSAGE AND ATTACHMENTS FORTHWITH.THANK YOU.

LE PRESENT MESSAGE ET LES DOCUMENTS QUI Y SONT JOINTS
S'ADRESSENT EXCLUSIVEMENT AU(X)DESTINATAIRE(S) INDIQUE(S) ET
LEUR TENEUR PEUT ETRE CONFIDENTIELLE. IL EST STRICTEMENT
INTERDIT A QUICONQUE D'EN PRENDRE CONNAISSANCE, DE LES UTILISER
OU DE LES DIVULGUER. SI VOUS RECEVEZ LE PRESENT MESSAGE PAR
ERREUR, VEUILLEZ EN AVISER LYRTECH IMMEDIATEMENT ET DETRUIRE LE
MESSAGE SEANCE TENANTE, AINSI QUE LES DOCUMENTS QUI Y SONT
JOINTS.



___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/