* Re: [ECOS] N00blet question on networking
@ 2007-02-22 3:47 Laurie.Gellatly
0 siblings, 0 replies; 5+ messages in thread
From: Laurie.Gellatly @ 2007-02-22 3:47 UTC (permalink / raw)
To: Chuck McManis, ECOS Discussion Group
Hi Chuck,
As Redboot and your application share the same NIC they are distinguished by
different IP addresses.
I would guess that the DHCP server, receiving a second request from the same
MAC, will simply reply with the same address again (maybe extending the
lease on the IP).
Have you tried making one of Redboot or the application use a static
address?
...Laurie:{)
--------- Original Message --------
From: Chuck McManis <ecos@mcmanis.com>
To: ECOS Discussion Group <ecos-discuss@sources.redhat.com>
Subject: [ECOS] N00blet question on networking
Date: 21/02/07 02:21
> Ok, so I have redboot working. Further I can build a libtarget.a with a
> basic set of options, I tried the simple program to get data from the
> console and echo it back, and I can boot redboot, 'load -h <my
server>
> simple' and 'go' to run it. All's cool.
>
> So I used ecosconfig to add in CYGPKG_NET and FREEBSD_STACK and
ETH_DRIVERS
> (actually there was a point where I had no conflicts but a couple of
> ethernet driver files were missing, its a CDL bug but I've not assured
> myself that I know enough about what I'm doing to call it a bug outright
> yet ;-)
>
> Now I can build the httpd1.c test and when I run it this is what I get:
> ----------------------------------------------------
> Ethernet eth0: MAC address 00:0a:00:c0:ff:ee
> IP: 192.168.110.124/255.255.255.0, Gateway: 192.168.110.254
> Default server: 0.0.0.0
>
> RedBoot(tm) bootstrap and debug environment [GRUB]
> Non-certified release, version UNKNOWN - built 21:38:48, Feb 19 2007
>
> Platform: PC (I386)
> Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
> Copyright (C) 2003, 2004, 2005, 2006 eCosCentric Limited
>
> RAM: 0x00100000-0x040f0000, [0x0018da10-0x01000000] available
> RedBoot> load -h 192.168.110.30 httpd1
> Using default protocol (TFTP)
> Entry point: 0x00208000, address range: 0x00208000-0x00244720
> RedBoot> go
> [cyg_net_init] Init: mbinit(0x00000000)
> [cyg_net_init] Init: cyg_net_init_devs(0x00000000)
> Init device 'vt8235_eth0'
> [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(0x00243f80)
> New domain internet at 0x00000000
> [cyg_net_init] Init: cyg_net_add_domain(0x002436c0)
> New domain route at 0x00000000
> [cyg_net_init] Init: call_route_init(0x00000000)
> [cyg_net_init] Done
> [eth_drv_ioctl] Warning: Driver can't set multi-cast mode
> [eth_drv_ioctl] Warning: Driver can't set multi-cast mode
>
> ----------------------------------------
>
> Ok, but when I do this, there doesn't seem to be any way to talk to my
> target board. Eventually it prints :
>
> BOOTP/DHCP failed on eth0
> [eth_drv_ioctl] Warning: Driver can't set multi-cast mode
> [eth_drv_ioctl] Warning: Driver can't set multi-cast mode
>
> Which seems unusual given that DHCP worked fine for Redboot.
>
> So here are some questions:
>
> What should this test print when it works? Should I be able to ping my
> target after using init_all_network_interfaces() ? What is different
> between Redboot's use of my driver and ECOS's use of the driver?
>
> --Chuck
>
>
> --
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>
>
________________________________________________
Message sent using UebiMiau 2.7.9
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ECOS] N00blet question on networking
2007-02-22 12:04 ` Gary Thomas
2007-02-23 2:43 ` Chuck McManis
@ 2007-02-23 2:49 ` Chuck McManis
1 sibling, 0 replies; 5+ messages in thread
From: Chuck McManis @ 2007-02-23 2:49 UTC (permalink / raw)
To: ECOS Discussion Group
At 04:04 AM 2/22/2007, Gary Thomas wrote:
The most likely cause is not getting interrupts from your
>ethernet card. RedBoot doesn't use them but eCos requires
>that they work.
Ok so many diag_printfs later ...
One of the things I discovered is that my CR0 register which has
control bits for enabling transmission and reception. Rx Enable is
bit 3 and Tx enable is bit 4, NIC "Start" is bit 1 so a "proper" CR0
should be 0x1a, but at somepoint it gets 0x12 in it and that disables
the receiver. Since my transmits were working fine slam 0x1a in to
periodically and I at least got through the handshake to the DHCP
server (it assigned my address Etc.) that tells me that interrupts
are hooked correctly if the CR0 register is correct.
Looking at it further, I was wondering if the Half duplex / full
duplex state of the PHY might have anything to do with it (its hooked
to a switch and so should be full duplex). Has anyone had an
experience where if the MAC thought the Phy was half duplex it would
disable the receiver when it was transmitting? In such a system would
I be adding code to my TxDone function to turn the receiver enable
bit back on? Clearly on a Hub it would be half duplex and some other
lame networking equipment so I want to do the right thing.
--Chuck
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ECOS] N00blet question on networking
2007-02-22 12:04 ` Gary Thomas
@ 2007-02-23 2:43 ` Chuck McManis
2007-02-23 2:49 ` Chuck McManis
1 sibling, 0 replies; 5+ messages in thread
From: Chuck McManis @ 2007-02-23 2:43 UTC (permalink / raw)
To: ecos-discuss
At 04:04 AM 2/22/2007, Gary Thomas wrote:
The most likely cause is not getting interrupts from your
>ethernet card. RedBoot doesn't use them but eCos requires
>that they work.
>
>Try putting some 'diag_printf()' calls in the ethernet driver to
>see what's happening.
Aye, that I've been doing and sure enough no Rx interrupts. I see the
transmit interrupts but not the receive ones ... hmmm.
--Chuck
>Note: at this point, it's best to access RedBoot via the serial port
>and leave network based debugging for later.
Sigh :-) I so wish this weren't the case but I understand why it is.
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ECOS] N00blet question on networking
2007-02-22 3:20 Chuck McManis
@ 2007-02-22 12:04 ` Gary Thomas
2007-02-23 2:43 ` Chuck McManis
2007-02-23 2:49 ` Chuck McManis
0 siblings, 2 replies; 5+ messages in thread
From: Gary Thomas @ 2007-02-22 12:04 UTC (permalink / raw)
To: Chuck McManis; +Cc: ECOS Discussion Group
Chuck McManis wrote:
> Ok, so I have redboot working. Further I can build a libtarget.a with a
> basic set of options, I tried the simple program to get data from the
> console and echo it back, and I can boot redboot, 'load -h <my server>
> simple' and 'go' to run it. All's cool.
>
> So I used ecosconfig to add in CYGPKG_NET and FREEBSD_STACK and ETH_DRIVERS
> (actually there was a point where I had no conflicts but a couple of
> ethernet driver files were missing, its a CDL bug but I've not assured
> myself that I know enough about what I'm doing to call it a bug outright
> yet ;-)
>
> Now I can build the httpd1.c test and when I run it this is what I get:
> ----------------------------------------------------
> Ethernet eth0: MAC address 00:0a:00:c0:ff:ee
> IP: 192.168.110.124/255.255.255.0, Gateway: 192.168.110.254
> Default server: 0.0.0.0
>
> RedBoot(tm) bootstrap and debug environment [GRUB]
> Non-certified release, version UNKNOWN - built 21:38:48, Feb 19 2007
>
> Platform: PC (I386)
> Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
> Copyright (C) 2003, 2004, 2005, 2006 eCosCentric Limited
>
> RAM: 0x00100000-0x040f0000, [0x0018da10-0x01000000] available
> RedBoot> load -h 192.168.110.30 httpd1
> Using default protocol (TFTP)
> Entry point: 0x00208000, address range: 0x00208000-0x00244720
> RedBoot> go
> [cyg_net_init] Init: mbinit(0x00000000)
> [cyg_net_init] Init: cyg_net_init_devs(0x00000000)
> Init device 'vt8235_eth0'
> [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(0x00243f80)
> New domain internet at 0x00000000
> [cyg_net_init] Init: cyg_net_add_domain(0x002436c0)
> New domain route at 0x00000000
> [cyg_net_init] Init: call_route_init(0x00000000)
> [cyg_net_init] Done
> [eth_drv_ioctl] Warning: Driver can't set multi-cast mode
> [eth_drv_ioctl] Warning: Driver can't set multi-cast mode
>
> ----------------------------------------
>
> Ok, but when I do this, there doesn't seem to be any way to talk to my
> target board. Eventually it prints :
>
> BOOTP/DHCP failed on eth0
> [eth_drv_ioctl] Warning: Driver can't set multi-cast mode
> [eth_drv_ioctl] Warning: Driver can't set multi-cast mode
>
> Which seems unusual given that DHCP worked fine for Redboot.
>
> So here are some questions:
>
> What should this test print when it works? Should I be able to ping my
> target after using init_all_network_interfaces() ? What is different
> between Redboot's use of my driver and ECOS's use of the driver?
The most likely cause is not getting interrupts from your
ethernet card. RedBoot doesn't use them but eCos requires
that they work.
Try putting some 'diag_printf()' calls in the ethernet driver to
see what's happening.
Note: at this point, it's best to access RedBoot via the serial port
and leave network based debugging for later.
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ECOS] N00blet question on networking
@ 2007-02-22 3:20 Chuck McManis
2007-02-22 12:04 ` Gary Thomas
0 siblings, 1 reply; 5+ messages in thread
From: Chuck McManis @ 2007-02-22 3:20 UTC (permalink / raw)
To: ECOS Discussion Group
Ok, so I have redboot working. Further I can build a libtarget.a with a
basic set of options, I tried the simple program to get data from the
console and echo it back, and I can boot redboot, 'load -h <my server>
simple' and 'go' to run it. All's cool.
So I used ecosconfig to add in CYGPKG_NET and FREEBSD_STACK and ETH_DRIVERS
(actually there was a point where I had no conflicts but a couple of
ethernet driver files were missing, its a CDL bug but I've not assured
myself that I know enough about what I'm doing to call it a bug outright
yet ;-)
Now I can build the httpd1.c test and when I run it this is what I get:
----------------------------------------------------
Ethernet eth0: MAC address 00:0a:00:c0:ff:ee
IP: 192.168.110.124/255.255.255.0, Gateway: 192.168.110.254
Default server: 0.0.0.0
RedBoot(tm) bootstrap and debug environment [GRUB]
Non-certified release, version UNKNOWN - built 21:38:48, Feb 19 2007
Platform: PC (I386)
Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
Copyright (C) 2003, 2004, 2005, 2006 eCosCentric Limited
RAM: 0x00100000-0x040f0000, [0x0018da10-0x01000000] available
RedBoot> load -h 192.168.110.30 httpd1
Using default protocol (TFTP)
Entry point: 0x00208000, address range: 0x00208000-0x00244720
RedBoot> go
[cyg_net_init] Init: mbinit(0x00000000)
[cyg_net_init] Init: cyg_net_init_devs(0x00000000)
Init device 'vt8235_eth0'
[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(0x00243f80)
New domain internet at 0x00000000
[cyg_net_init] Init: cyg_net_add_domain(0x002436c0)
New domain route at 0x00000000
[cyg_net_init] Init: call_route_init(0x00000000)
[cyg_net_init] Done
[eth_drv_ioctl] Warning: Driver can't set multi-cast mode
[eth_drv_ioctl] Warning: Driver can't set multi-cast mode
----------------------------------------
Ok, but when I do this, there doesn't seem to be any way to talk to my
target board. Eventually it prints :
BOOTP/DHCP failed on eth0
[eth_drv_ioctl] Warning: Driver can't set multi-cast mode
[eth_drv_ioctl] Warning: Driver can't set multi-cast mode
Which seems unusual given that DHCP worked fine for Redboot.
So here are some questions:
What should this test print when it works? Should I be able to ping my
target after using init_all_network_interfaces() ? What is different
between Redboot's use of my driver and ECOS's use of the driver?
--Chuck
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-02-23 2:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-22 3:47 [ECOS] N00blet question on networking Laurie.Gellatly
-- strict thread matches above, loose matches on Subject: below --
2007-02-22 3:20 Chuck McManis
2007-02-22 12:04 ` Gary Thomas
2007-02-23 2:43 ` Chuck McManis
2007-02-23 2:49 ` Chuck McManis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).