This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

problem with network initialization


Hello all

We got the 'Hello, eCos World' message displayed on the terminal now.

Just to recap, we started by building the Redboot image and got the Redboot
prompt on the serial port. Then we built the application image with
'hello.c' and ran it from the Redboot prompt after loading it via
TFTP/XModem. We got the 'hello world' message displayed, but the system
still doesn't respond to pings!!

For the Redboot image, we selected the 'Redboot' template with the following
packages:

--------------------------------------------------------------------

- CYGPKG_IO_SERIAL_POWERPC_MPC8XXX  <--- disabled

- CYGPKG_DEVS_ETH_POWERPC_RATTLER
- CYGPKG_IO_ETH_DRIVERS
- CYGPKG_DEVS_ETH_POWERPC_FCC
- CYGPKG_DEVS_ETH_PHY

- CYGPKG_IO_FLASH
- CYGPKG_DEVS_FLASH_POWERPC_RATTLER
- CYGPKG_DEVS_FLASH_STRATA

- CYGPKG_CRC
- CYGPKG_INFRA
- CYGPKG_ISOINFRA
- CYGPKG_LIBC_STRING

- CYGPKG_HAL
- CYGPKG_HAL_POWERPC
- CYGPKG_HAL_POWERPC_RATTLER
- CYGPKG_HAL_POWERPC_MPC8XXX

- CYGPKG_REDBOOT

--------------------------------------------------------------------

For the application image, we built the 'Default' template with the
following packages:

--------------------------------------------------------------------

- CYGPKG_IO_SERIAL
- CYGPKG_IO_SERIAL_POWERPC_MPC8XXX

- CYGPKG_IO_ETH_DRIVERS
- CYGPKG_DEVS_ETH_POWERPC_RATTLER
- CYGPKG_DEVS_ETH_POWERPC_FCC
- CYGPKG_DEVS_ETH_PHY

- CYGPKG_IO
- CYGPKG_IO_FILEIO
- CYGPKG_IO_WALLCLOCK

- CYGPKG_IO_FLASH
- CYGPKG_DEVS_FLASH_POWERPC_RATTLER
- CYGPKG_DEVS_FLASH_STRATA

- CYGPKG_NET
- CYGPKG_NET_FREEBSD_STACK

- CYGPKG_INFRA
- CYGPKG_ISOINFRA
- CYGPKG_LIBC_TIME
- CYGPKG_LIBC_STDLIB
- CYGPKG_LIBC_I18N
- CYGPKG_LIBC_SETJMP
- CYGPKG_LIBC_SIGNALS
- CYGPKG_LIBC_STDIO
- CYGPKG_LIBC_STRING
- CYGPKG_LIBC_STARTUP
- CYGPKG_LIBC
- CYGPKG_ERROR

- CYGPKG_HAL
- CYGPKG_HAL_POWERPC
- CYGPKG_HAL_POWERPC_RATTLER
- CYGPKG_HAL_POWERPC_MPC8XXX

- CYGPKG_KERNEL
- CYGPKG_MEMALLOC

--------------------------------------------------------------------

Andrew asked us to initialize the network interfaces through the
init_all_network_interfaces() routine. But we're only using FCC1 for
Ethernet, and that, I believe, is being configured in the 'Basic Networking
Framework' package, through the option "Initialization options for 'eth1'".
Do we need to initialize it elsewhere?

Our Redboot initialization looks like this:

--------------------------------------------------------------------

+PHY: Intel LXT971A
FCC eth0: /***NO LINK***
PHY: Intel LXT971A
FCC eth1: 100Mb/Full Duplex
.. waiting for BOOTP information
Ethernet eth1: MAC address 0c:00:00:00:3c:20
IP: 192.168.128.165/255.255.255.0, Gateway: 192.168.128.1
Default server: 192.168.128.215

RedBoot(tm) bootstrap and debug environment [ROMRAM]
Non-certified release, version UNKNOWN - built 20:38:26, Sep 22 2004

Platform: Rattler (PowerPC MPC8250)
Copyright (C) 2000, 2001, 2002, Red Hat, Inc.

RAM: 0x00000000-0x08000000, [0x000382b0-0x07fbd000] available
FLASH: 0xfe000000 - 0x00000000, 128 blocks of 0x00040000 bytes each.
RedBoot>

--------------------------------------------------------------------

It's clear that it's initializing FCC1 & FCC2 here. Then again when we run
the application image, we see:

--------------------------------------------------------------------

RedBoot> load -v -h 192.168.144.207 -p 69 hello.srec
Using default protocol (TFTP)
Entry point: 0x00040000, address range: 0x00040000-0x00090134
RedBoot> go
[cyg_net_init] Init: mbinit(0x00000000)
[cyg_net_init] Init: cyg_net_init_devs(0x00000000)
Init device 'fcc_eth0'
PHY: Intel LXT971A
FCC eth0: 100Mb/Full Duplex

Init device 'fcc_eth1'
PHY: Intel LXT971A
FCC eth1: 100Mb/Full Duplex
[cyg_net_init] Init: loopattach(0x00000000)
[cyg_net_init] Init: ifinit(0x00000000)
[cyg_net_init] Init: domaininit(0x00000000)
[cyg_net_init] Init: cyg_net_add_domain(0x0008f824)
New domain internet at 0x00000000
[cyg_net_init] Init: cyg_net_add_domain(0x0008f2ac)
New domain route at 0x00000000
[cyg_net_init] Init: call_route_init(0x00000000)
[cyg_net_init] Done
Hello, eCos world!        <--- hello world message

--------------------------------------------------------------------

So as we can see, it is again initializing FCC1 & FCC2 from the application
code. Is this correct? Or should we leave out the 'Common Ethernet' package
in one of the two images (Redboot and application)?

Not only this, during the second initialization, both FCC1 & FCC2 are
configured as '100Mb/Full Duplex', which is not the case during the first
setup. This is incorrect too, since we're not using FCC1 at all.

And, as I mentioned above, the system doesn't respond to pings once the
application image is run, though all the MPC8260 FCC registers show the
correct values, and even the FCC2 event register never shows a buffer
overflow.

If we don't include the 'Common Ethernet' package in Redboot (and retain it
in Default) and download the application via YModem, we get the correct
initialization when the application is run, i.e. FCC1 shows '***NO LINK***'
and FCC2 shows '100Mb/Full Duplex'. But then it doesn't display the MAC
address and IP address, etc (which we see with Redboot). Is there a
provision for displaying this from the application/kernel image? See below:

--------------------------------------------------------------------

[cyg_net_init] Init: mbinit(0x00000000)
[cyg_net_init] Init: cyg_net_init_devs(0x00000000)
Init device 'fcc_eth0'
FCC_ETH - Warning! Using default ESA for 'fcc_eth0'
PHY: Intel LXT971A
FCC eth0: /***NO LINK***

Init device 'fcc_eth1'
FCC_ETH - Warning! Using default ESA for 'fcc_eth1'
PHY: Intel LXT971A
FCC eth1: 100Mb/Full Duplex
[cyg_net_init] Init: loopattach(0x00000000)
[cyg_net_init] Init: ifinit(0x00000000)
[cyg_net_init] Init: domaininit(0x00000000)
[cyg_net_init] Init: cyg_net_add_domain(0x0008f824)
New domain internet at 0x00000000
[cyg_net_init] Init: cyg_net_add_domain(0x0008f2ac)
New domain route at 0x00000000
[cyg_net_init] Init: call_route_init(0x00000000)
[cyg_net_init] Done
Hello, eCos world!

--------------------------------------------------------------------

Guidance please!!! Where are we going wrong??

Regards

Chandrashekhar Padiyar

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]