Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Reg - MII Compilation: (9 Items)
   
Reg - MII Compilation  
Hi ,

I Wrote a sample MII interface driver,for that i refered exPhy.c.

After written i tried to compile that file it throws an error.

i got error from system files.

I have included my files also.

please find the below error:
==================


In file included from sam_mii.h:20,
                 from sam_mii.c:7:
/usr/qnx640/target/qnx6/usr/include/sys/device.h:97:23: error: sys/evcnt.h: No such file or directory
/usr/qnx640/target/qnx6/usr/include/sys/device.h:100:23: error: sys/systm.h: No such file or directory
In file included from sam_mii.h:20,
                 from sam_mii.c:7:
/usr/qnx640/target/qnx6/usr/include/sys/device.h:154: error: field 'dv_callback' has incomplete type
In file included from sam_mii.h:24,
                 from sam_mii.c:7:
/usr/qnx640/target/qnx6/usr/include/dev/mii/miivar.h:82: error: field 'mii_media' has incomplete type
/usr/qnx640/target/qnx6/usr/include/dev/mii/miivar.h:137: error: expected specifier-qualifier-list before 'u_int32_t'
/usr/qnx640/target/qnx6/usr/include/dev/mii/miivar.h:204: error: expected specifier-qualifier-list before 'u_int32_t'
sam_mii.c:10: error: 'samPHY' undeclared here (not in a function)
sam_mii.c:10: error: initializer element is not constant
sam_mii.c:10: error: (near initialization for 'samPHY_ca.ca_name')
sam_mii.c:10: error: 'mii_phy_detach' undeclared here (not in a function)
sam_mii.c:10: error: 'mii_phy_activate' undeclared here (not in a function)
sam_mii.c: In function 'samphy_attach':
sam_mii.c:99: error: 'struct mii_softc' has no member named 'mii_inst'
sam_mii.c:100: error: 'struct mii_softc' has no member named 'mii_phy'
sam_mii.c:101: error: 'struct mii_softc' has no member named 'mii_funcs'
sam_mii.c:102: error: 'struct mii_softc' has no member named 'mii_pdata'
sam_mii.c:103: error: 'struct mii_softc' has no member named 'mii_flags'
sam_mii.c:104: error: 'struct mii_softc' has no member named 'mii_anegticks'
sam_mii.c:119: error: 'struct mii_softc' has no member named 'mii_flags'
sam_mii.c:123: error: 'struct mii_softc' has no member named 'mii_capabilities'
sam_mii.c:126: error: 'struct mii_softc' has no member named 'mii_capabilities'
cc: /usr/qnx640/host/qnx6/x86/usr/lib/gcc/i386-pc-nto-qnx6.4.0/4.2.4/cc1 error 1
#


Thanks and Regards
K.Senthil
Attachment: Text sam_mii.h 11.33 KB
Re: Reg - MII Compilation  
On Mon, Aug 10, 2009 at 09:25:07AM -0400, Senthil K wrote:
> Hi ,
> 
> I Wrote a sample MII interface driver,for that i refered exPhy.c.
> 
> After written i tried to compile that file it throws an error.
> 
> i got error from system files.
> 
> I have included my files also.
> 
> please find the below error:

Check out the -I option to qcc.  It's probably
easiest to base your Makefile off an existing
one.

-seanb
Re: Reg - MII Compilation  
Hi Sean,

i gave the below command

 qcc -o mii -I /usr/qnx640/target/qnx6/usr/include/ sam_mii.c

The same error i faced .

Can you please tell me how other phy interface driver like exphy.c ikphy.c compiling.

is there any make file ,please tell me.

Thanks and Regards
K.Senthil
Re: Reg - MII Compilation  
On Mon, Aug 10, 2009 at 09:37:06AM -0400, Senthil K wrote:
> Hi Sean,
> 
> i gave the below command
> 
>  qcc -o mii -I /usr/qnx640/target/qnx6/usr/include/ sam_mii.c
> 
> The same error i faced .

You get /usr/qnx640/target/qnx6/usr/include/ by default.  The
files in question aren't there, they're in the networking repo.

> 
> Can you please tell me how other phy interface driver like exphy.c ikphy.c compiling.
> 
> is there any make file ,please tell me.

They compile with a straight 'make' if you check out the
entire networking repo and compile as described here:

http://community.qnx.com/sf/wiki/do/viewPage/projects.networking/wiki/Source_Guide

The required makefiles and environment are already
supplied in the networking repo.

Regards,

-seanb
Re: Reg - MII Compilation  
Hi Sean,

Shall i put my sam_mii.c file in directory where other mii driver resides example exphy.c,ikphy.c.

Then i follow the compilation procedure.

is that correct?

Thanks and Regards
K.Senthil

Re: Reg - MII Compilation  
Hi Sean,

I have followed steps which given in the link.


but i tried to compile,following are the logs.


Steps are done in my Pc.
===============

# cd $QNX_TARGET/../..
# ls
.                              host                           srcversion-patch-6.4.0.tar
..                             install                        target
# tar -xpf srcversion-patch-6.4.0.tar

# make CPULIST="x86" install
make: Nothing to be done for `install'.
# make CPULIST=x86 install
make: Nothing to be done for `install'.
# make install


Any thing i missed please guide me.

Thanks and Regards
K.Senthil
Re: Reg - MII Compilation  
On Mon, Aug 10, 2009 at 10:29:40AM -0400, Senthil K wrote:
> Hi Sean,
> 
> I have followed steps which given in the link.
> 
> 
> but i tried to compile,following are the logs.
> 
> 
> Steps are done in my Pc.
> ===============
> 
> # cd $QNX_TARGET/../..
> # ls
> .                              host                           srcversion-patch-6.4.0.tar
> ..                             install                        target
> # tar -xpf srcversion-patch-6.4.0.tar
> 
> # make CPULIST="x86" install
> make: Nothing to be done for `install'.
> # make CPULIST=x86 install
> make: Nothing to be done for `install'.
> # make install
> 
> 
> Any thing i missed please guide me.

There's no Makefile there.  You have to 'make'
where you've checked out the networking repo.

-seanb
Re: Reg - MII Compilation  
Hi Sean,

I refered one make file and compiled my code successfully and i got .so

while i mount

using

# mount -T io-pkt /lib/dll/devnp-MPC.so
mount: Can't mount / (type io-pkt)
mount: Possible reason: No such device or address.

Sloginfo
---------
Aug 11 18:08:13    2    14     0 Unable to load /lib/dll/devnp-MPC.so: Symbol not found

it throws symbol not found.

How can i see whcih symbol is not found.

Regards
Senthil

Re: Reg - MII Compilation  
Hi Sean,
one more question,

I have compiled the entire QNX core networking code.

But i found that, there is deirectory in /sys/dev/mii

there is no make file in that directory.

But in that directory there are lot of files how those files are getting compiled.




Thanks and Regards
K.Senthil