ixp42x NPE networking build issue.

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

ixp42x NPE networking build issue.

Karel Gardas-3

Hello,

I'm experimenting with CVS eCos and trying to get it working for ixp42x
board including NPE ethernet support. I've downloaded:

Redboot-v2_01-epk.zip
Redboot-v2_01-npe-microcode.zip

files from intel.com and installed them following their documentation.
Unfortunately when I try to build ixdp425 with NPE Ethernet with `all'
packages, I get this error message:

arm-elf-gcc -c  -I/home/karel/usr/local/xscale-npe1/full_install/include
-I/usr/local/src/cvs/ecos/ecos/packages/devs/eth/intel/npe/common/v2_0
-I/usr/local/src/cvs/ecos/ecos/packages/devs/eth/intel/npe/common/v2_0/src
-I/usr/local/src/cvs/ecos/ecos/packages/devs/eth/intel/npe/common/v2_0/tests
-I.
-I/usr/local/src/cvs/ecos/ecos/packages/devs/eth/intel/npe/common/v2_0/src/
-finline-limit=7000 -mcpu=xscale -Wall -Wpointer-arith -Wstrict-prototypes
-Winline -Wundef  -g -O2 -ffunction-sections -fdata-sections
-fno-exceptions  -mapcs-frame -D_KERNEL -D__ECOS -DCPU=33 -DXSCALE=33
-DIX_COMPONENT_NAME=1 -DNDEBUG
-I/home/karel/usr/local/xscale-npe1/full_install/include/osal
-I/home/karel/usr/local/xscale-npe1/full_install/include/osal/modules/bufferMgt
-I/home/karel/usr/local/xscale-npe1/full_install/include/osal/modules/ioMem
-I/home/karel/usr/local/xscale-npe1/full_install/include/osal/modules/ioMem
-I/home/karel/usr/local/xscale-npe1/full_install/include/osal/ecos/core
-I/home/karel/usr/local/xscale-npe1/full_install/include/osal/ecos/modules/bufferMgt
-I/home/karel/usr/local/xscale-npe1/full_install/include/osal/ecos/modules/ioMem
-I/home/karel/usr/local/xscale-npe1/full_install/include/osal/ecos/platforms/ixp400
-Wp,-MD,src/if_npe.tmp -o src/devs_eth_intel_npe_common_if_npe.o
/usr/local/src/cvs/ecos/ecos/packages/devs/eth/intel/npe/common/v2_0/src/if_npe.c
In file included from
/home/karel/usr/local/xscale-npe1/full_install/include/osal/modules/ioMem/IxOsalIoMem.h:58,
                  from
/home/karel/usr/local/xscale-npe1/full_install/include/osal/IxOsalConfig.h:68,
                  from
/home/karel/usr/local/xscale-npe1/full_install/include/osal/IxOsal.h:62,
                  from
/usr/local/src/cvs/ecos/ecos/packages/devs/eth/intel/npe/common/v2_0/src/if_npe.c:68:
/home/karel/usr/local/xscale-npe1/full_install/include/osal/modules/ioMem/IxOsalEndianess.h:74:2:
error: #error "Need something for non-RedBoot case!"
In file included from
/usr/local/src/cvs/ecos/ecos/packages/devs/eth/intel/npe/common/v2_0/src/if_npe.c:68:
/home/karel/usr/local/xscale-npe1/full_install/include/osal/IxOsal.h:1133:
warning: function declaration isn't a prototype
In file included from
/home/karel/usr/local/xscale-npe1/full_install/include/IxOsalBackward.h:57,
                  from
/home/karel/usr/local/xscale-npe1/full_install/include/IxOsBuffMgt.h:52,
                  from
/home/karel/usr/local/xscale-npe1/full_install/include/IxEthAcc.h:56,
                  from
/usr/local/src/cvs/ecos/ecos/packages/devs/eth/intel/npe/common/v2_0/src/if_npe.c:69:
/home/karel/usr/local/xscale-npe1/full_install/include/IxOsalBackwardOsServices.h:72:1:
warning: "LOG_WARNING" redefined
In file included from
/home/karel/usr/local/xscale-npe1/full_install/include/cyg/io/eth/eth_drv.h:63,
                  from
/usr/local/src/cvs/ecos/ecos/packages/devs/eth/intel/npe/common/v2_0/src/if_npe.c:66:
/home/karel/usr/local/xscale-npe1/full_install/include/sys/param.h:1023:1:
warning: this is the location of the previous definition
In file included from
/home/karel/usr/local/xscale-npe1/full_install/include/IxOsalBackward.h:63,
                  from
/home/karel/usr/local/xscale-npe1/full_install/include/IxOsBuffMgt.h:52,
                  from
/home/karel/usr/local/xscale-npe1/full_install/include/IxEthAcc.h:56,
                  from
/usr/local/src/cvs/ecos/ecos/packages/devs/eth/intel/npe/common/v2_0/src/if_npe.c:69:
/home/karel/usr/local/xscale-npe1/full_install/include/IxOsalBackwardOssl.h:166:
warning: function declaration isn't a prototype
/home/karel/usr/local/xscale-npe1/full_install/include/IxOsalBackwardOssl.h:246:
warning: function declaration isn't a prototype
/usr/local/src/cvs/ecos/ecos/packages/devs/eth/intel/npe/common/v2_0/src/if_npe.c:
In function 'npe_init':
/usr/local/src/cvs/ecos/ecos/packages/devs/eth/intel/npe/common/v2_0/src/if_npe.c:917:
warning: unused variable 'i'
make[1]: *** [src/if_npe.o.d] Error 1
make[1]: Leaving directory
`/home/karel/usr/local/xscale-npe1/full_build/devs/eth/intel/npe/common/v2_0'
make: *** [build] Error 2


Has anybody here succeed compiling this stuff?

Thanks,
Karel
--
Karel Gardas                  [hidden email]
ObjectSecurity Ltd.           http://www.objectsecurity.com

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

Re: ixp42x NPE networking build issue.

Andrew Lunn-2
On Wed, Dec 28, 2005 at 05:56:05PM +0100, Karel Gardas wrote:

>
> Hello,
>
> I'm experimenting with CVS eCos and trying to get it working for ixp42x
> board including NPE ethernet support. I've downloaded:
>
> Redboot-v2_01-epk.zip
> Redboot-v2_01-npe-microcode.zip
>
> files from intel.com and installed them following their documentation.
> Unfortunately when I try to build ixdp425 with NPE Ethernet with `all'
> packages, I get this error message:
>
> arm-elf-gcc -c  -I/home/karel/usr/local/xscale-npe1/full_install/include
> -I/usr/local/src/cvs/ecos/ecos/packages/devs/eth/intel/npe/common/v2_0
> -I/usr/local/src/cvs/ecos/ecos/packages/devs/eth/intel/npe/common/v2_0/src
> -I/usr/local/src/cvs/ecos/ecos/packages/devs/eth/intel/npe/common/v2_0/tests
> -I.
> -I/usr/local/src/cvs/ecos/ecos/packages/devs/eth/intel/npe/common/v2_0/src/
> -finline-limit=7000 -mcpu=xscale -Wall -Wpointer-arith -Wstrict-prototypes
> -Winline -Wundef  -g -O2 -ffunction-sections -fdata-sections
> -fno-exceptions  -mapcs-frame -D_KERNEL -D__ECOS -DCPU=33 -DXSCALE=33
> -DIX_COMPONENT_NAME=1 -DNDEBUG
> -I/home/karel/usr/local/xscale-npe1/full_install/include/osal
> -I/home/karel/usr/local/xscale-npe1/full_install/include/osal/modules/bufferMgt
> -I/home/karel/usr/local/xscale-npe1/full_install/include/osal/modules/ioMem
> -I/home/karel/usr/local/xscale-npe1/full_install/include/osal/modules/ioMem
> -I/home/karel/usr/local/xscale-npe1/full_install/include/osal/ecos/core
> -I/home/karel/usr/local/xscale-npe1/full_install/include/osal/ecos/modules/bufferMgt
> -I/home/karel/usr/local/xscale-npe1/full_install/include/osal/ecos/modules/ioMem
> -I/home/karel/usr/local/xscale-npe1/full_install/include/osal/ecos/platforms/ixp400
> -Wp,-MD,src/if_npe.tmp -o src/devs_eth_intel_npe_common_if_npe.o
> /usr/local/src/cvs/ecos/ecos/packages/devs/eth/intel/npe/common/v2_0/src/if_npe.c
> In file included from
> /home/karel/usr/local/xscale-npe1/full_install/include/osal/modules/ioMem/IxOsalIoMem.h:58,
>                  from
> /home/karel/usr/local/xscale-npe1/full_install/include/osal/IxOsalConfig.h:68,
>                  from
> /home/karel/usr/local/xscale-npe1/full_install/include/osal/IxOsal.h:62,
>                  from
> /usr/local/src/cvs/ecos/ecos/packages/devs/eth/intel/npe/common/v2_0/src/if_npe.c:68:
> /home/karel/usr/local/xscale-npe1/full_install/include/osal/modules/ioMem/IxOsalEndianess.h:74:2:
> error: #error "Need something for non-RedBoot case!"

The code from Intel is only for RedBoot, not normal eCos applications.

Search the archive, there have been a few people who have added the
extra code needed for using the ethernet in normal applications.

        Andrew

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

Re: ixp42x NPE networking build issue.

Mark Salter-2
In reply to this post by Karel Gardas-3
On Wed, 2005-12-28 at 17:56 +0100, Karel Gardas wrote:

> Hello,
>
> I'm experimenting with CVS eCos and trying to get it working for ixp42x
> board including NPE ethernet support. I've downloaded:
>
> Redboot-v2_01-epk.zip
> Redboot-v2_01-npe-microcode.zip
>
> files from intel.com and installed them following their documentation.
> Unfortunately when I try to build ixdp425 with NPE Ethernet with `all'
> packages, I get this error message:
>
> /home/karel/usr/local/xscale-npe1/full_install/include/osal/modules/ioMem/IxOsalEndianess.h:74:2:
> error: #error "Need something for non-RedBoot case!"

I think the error message is a pretty good clue.

>
> Has anybody here succeed compiling this stuff?
>

[hidden email] got the older NPE driver working as a full eCos
driver. But the 2_01 Intel code is a good bit different and I wasn't
able to include Jerzy's work due to time constraints in the contract
that paid for the RedBoot-only port.

--Mark



--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

Re: ixp42x NPE networking build issue.

Karel Gardas-3
On Wed, 28 Dec 2005, Mark Salter wrote:

> On Wed, 2005-12-28 at 17:56 +0100, Karel Gardas wrote:
>> Hello,
>>
>> I'm experimenting with CVS eCos and trying to get it working for ixp42x
>> board including NPE ethernet support. I've downloaded:
>>
>> Redboot-v2_01-epk.zip
>> Redboot-v2_01-npe-microcode.zip
>>
>> files from intel.com and installed them following their documentation.
>> Unfortunately when I try to build ixdp425 with NPE Ethernet with `all'
>> packages, I get this error message:
>>
>> /home/karel/usr/local/xscale-npe1/full_install/include/osal/modules/ioMem/IxOsalEndianess.h:74:2:
>> error: #error "Need something for non-RedBoot case!"
>
> I think the error message is a pretty good clue.

Yes, it is hence my question.

>>
>> Has anybody here succeed compiling this stuff?
>>
>
> [hidden email] got the older NPE driver working as a full eCos
> driver. But the 2_01 Intel code is a good bit different and I wasn't
> able to include Jerzy's work due to time constraints in the contract
> that paid for the RedBoot-only port.

Thanks to you both Mark and Andrew! The only older version available on
the intel website seems to be 1.94, I hope this is what Jerzy used and
which will also do the job for me.

Thanks!
Karel
--
Karel Gardas                  [hidden email]
ObjectSecurity Ltd.           http://www.objectsecurity.com

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

Re: ixp42x NPE networking build issue.

Karel Gardas-3
On Wed, 28 Dec 2005, Karel Gardas wrote:

>> [hidden email] got the older NPE driver working as a full eCos
>> driver. But the 2_01 Intel code is a good bit different and I wasn't
>> able to include Jerzy's work due to time constraints in the contract
>> that paid for the RedBoot-only port.
>
> Thanks to you both Mark and Andrew! The only older version available on the
> intel website seems to be 1.94, I hope this is what Jerzy used and which will
> also do the job for me.

FYI: adding npe-1.4.epk to the current CVS fails with:

silence:/usr/local/src/cvs/ecos/ecos/packages$ ./ecosadmin.tcl add /tmp/rebdoot/npe-1.4.epk
ecosadmin error: extracting pkgadd.db:
tar: Read 6144 bytes from -
silence:/usr/local/src/cvs/ecos/ecos/packages$

so it seems manual "merge" will be needed...

Karel
--
Karel Gardas                  [hidden email]
ObjectSecurity Ltd.           http://www.objectsecurity.com

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

Re: ixp42x NPE networking build issue.

Mark Salter-2
On Wed, 2005-12-28 at 21:39 +0100, Karel Gardas wrote:

> On Wed, 28 Dec 2005, Karel Gardas wrote:
>
> >> [hidden email] got the older NPE driver working as a full eCos
> >> driver. But the 2_01 Intel code is a good bit different and I wasn't
> >> able to include Jerzy's work due to time constraints in the contract
> >> that paid for the RedBoot-only port.
> >
> > Thanks to you both Mark and Andrew! The only older version available on the
> > intel website seems to be 1.94, I hope this is what Jerzy used and which will
> > also do the job for me.
>
> FYI: adding npe-1.4.epk to the current CVS fails with:
>
> silence:/usr/local/src/cvs/ecos/ecos/packages$ ./ecosadmin.tcl add /tmp/rebdoot/npe-1.4.epk
> ecosadmin error: extracting pkgadd.db:
> tar: Read 6144 bytes from -
> silence:/usr/local/src/cvs/ecos/ecos/packages$
>
> so it seems manual "merge" will be needed...
>

6144 bytes looks wrong. tar should be reading around 1MB. Looks
like something is wrong with the .epk file. The file is really
a gzip'ed tarball, so "tar -ztf npe-1.4.epk" should give you a
list of the contents.

--Mark



--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

Re: ixp42x NPE networking build issue.

Karel Gardas-3
On Wed, 28 Dec 2005, Mark Salter wrote:

> On Wed, 2005-12-28 at 21:39 +0100, Karel Gardas wrote:
>> On Wed, 28 Dec 2005, Karel Gardas wrote:
>>
>>>> [hidden email] got the older NPE driver working as a full eCos
>>>> driver. But the 2_01 Intel code is a good bit different and I wasn't
>>>> able to include Jerzy's work due to time constraints in the contract
>>>> that paid for the RedBoot-only port.
>>>
>>> Thanks to you both Mark and Andrew! The only older version available on the
>>> intel website seems to be 1.94, I hope this is what Jerzy used and which will
>>> also do the job for me.
>>
>> FYI: adding npe-1.4.epk to the current CVS fails with:
>>
>> silence:/usr/local/src/cvs/ecos/ecos/packages$ ./ecosadmin.tcl add /tmp/rebdoot/npe-1.4.epk
>> ecosadmin error: extracting pkgadd.db:
>> tar: Read 6144 bytes from -
>> silence:/usr/local/src/cvs/ecos/ecos/packages$
>>
>> so it seems manual "merge" will be needed...
>>
>
> 6144 bytes looks wrong. tar should be reading around 1MB. Looks
> like something is wrong with the .epk file. The file is really
> a gzip'ed tarball, so "tar -ztf npe-1.4.epk" should give you a
> list of the contents.

Yes, I think the intention of the error above is that ecosadmin "detects"
error in pkgadd.db and exists making tar also exists. Anyway, the file is
OK, I've decomplressed it and did
cat pkgadd.db >> <path>/ecos.db

I've also copied Jerzy's if_npe.c and now I'm fighting with various
compilation issues. Generaly Intel code's complaining about RebBoot not
enabled. Is RedBoot required for this to work? i.e. do I need to build my
NPE-enabled eCos app including RedBoot just to be able to build it?

Thanks,
Karel
--
Karel Gardas                  [hidden email]
ObjectSecurity Ltd.           http://www.objectsecurity.com

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

Re: ixp42x NPE networking build issue.

Andrew Lunn-2
> Yes, I think the intention of the error above is that ecosadmin "detects"
> error in pkgadd.db and exists making tar also exists. Anyway, the file is
> OK, I've decomplressed it and did
> cat pkgadd.db >> <path>/ecos.db
>
> I've also copied Jerzy's if_npe.c and now I'm fighting with various
> compilation issues. Generaly Intel code's complaining about RebBoot not
> enabled. Is RedBoot required for this to work? i.e. do I need to build my
> NPE-enabled eCos app including RedBoot just to be able to build it?

Now, you do not want RedBoot.

        Andrew

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

Re: ixp42x NPE networking build issue.

Karel Gardas-3
On Wed, 28 Dec 2005, Andrew Lunn wrote:

>> Yes, I think the intention of the error above is that ecosadmin "detects"
>> error in pkgadd.db and exists making tar also exists. Anyway, the file is
>> OK, I've decomplressed it and did
>> cat pkgadd.db >> <path>/ecos.db
>>
>> I've also copied Jerzy's if_npe.c and now I'm fighting with various
>> compilation issues. Generaly Intel code's complaining about RebBoot not
>> enabled. Is RedBoot required for this to work? i.e. do I need to build my
>> NPE-enabled eCos app including RedBoot just to be able to build it?
>
> Now, you do not want RedBoot.

I also though that, but unfortunatelly whole code looks like expecting
RedBoot... Now I'm fighting with this (RedBoot still not enabled in
config), which seems to be MAC address "detection":

if_npe.c file from Jerzy:

     806     // Set MAC address
     807 #if defined(CYGSEM_NPE_REDBOOT_HOLDS_ESA)
     808     {
     809         char *cfgname = NULL;
     810 #if defined(CYGSEM_INTEL_NPE_USE_ETH0)
     811         if (p_npe == &npe_eth0_priv_data)
     812             cfgname = "npe_eth0_esa";
     813 #endif
     814 #if defined(CYGSEM_INTEL_NPE_USE_ETH1)
     815         if (p_npe == &npe_eth1_priv_data)
     816             cfgname = "npe_eth1_esa";
     817 #endif
     818
     819 #elif defined(CYGHAL_GET_NPE_ESA)
     820
     821         mac_ok = CYGACC_CALL_IF_FLASH_CFG_OP(CYGNUM_CALL_IF_FLASH_CFG_GET, cfgname,
     822                                              p_npe->mac_address, CONFIG_ESA);
     823     }


1. cfgname is used here, but it is not defined. It is defined in above
#ifdef statement.

2. CONFIG_ESA is not defined. It seems CONFIG_ESA is defined to 6 when
RedBoot is enabled

     824 #else
     825 #error No mechanism to get MAC address
     826 #endif
     827
     828     if (!mac_ok) {
     829 #ifdef DEBUG
     830                 diag_printf("Error getting MAC address.\n");
     831 #endif
     832                 return 0;
     833     }


here we test !mac_ok, but strangely when CYGSEM_NPE_REDBOOT_HOLDS_ESA is
defined, then mac_ok is not set to true.

So now, I'm searching where is all these defines provided to find out more
info about this issue.

Thanks,
Karel
--
Karel Gardas                  [hidden email]
ObjectSecurity Ltd.           http://www.objectsecurity.com

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

Re: ixp42x NPE networking build issue.

Mark Salter-2
In reply to this post by Karel Gardas-3
On Wed, 2005-12-28 at 22:13 +0100, Karel Gardas wrote:
> I've also copied Jerzy's if_npe.c and now I'm fighting with various
> compilation issues. Generaly Intel code's complaining about RebBoot not
> enabled. Is RedBoot required for this to work? i.e. do I need to build my
> NPE-enabled eCos app including RedBoot just to be able to build it?
>

Hmm, Jerzy may have had to make changes in the Intel code to get it all
to build. RedBoot isn't the solution.

--Mark



--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

Re: ixp42x NPE networking build issue.

jerzy dyrda
Hello all,

On Wednesday 28 of December 2005 23:00, Mark Salter wrote:
> On Wed, 2005-12-28 at 22:13 +0100, Karel Gardas wrote:
> > I've also copied Jerzy's if_npe.c and now I'm fighting with various
> > compilation issues. Generaly Intel code's complaining about RebBoot not
> > enabled. Is RedBoot required for this to work? i.e. do I need to build my
> > NPE-enabled eCos app including RedBoot just to be able to build it?
>
> Hmm, Jerzy may have had to make changes in the Intel code to get it all
> to build. RedBoot isn't the solution.
>

Sorry, but I have had vacation.

I made some modification in Intel code ( very minor ) but without their npe
driver can't be compiled.  
Regarding MAC address - I "ported" this driver to custom board with own mac
getting mechanism ( I have special function to do it) - please don't suggest
actual state of CONFIG_ESA - it is valid only for RedBoot.

Karel :  I assume that you need to add some defines like DEBUG ( I made
mistake add counter - variable i - and forgot to remove, this problem appears
only when DEBUG is define ) or NPE_USE_INTS
( initially I tried to use suspended thread to pool dispatcherFunc() ) which
are added to cdl file.

Best Regards,
jerzy


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss