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]

Re: x86 - redboot - networking - how do they interconnect?



Ron Kundla <rkundla@nband.com> writes:
> (1) When redboot has come up, it has already initialized the Ethernet with
> an IP address. When I type 'continue' to start the kernel and my
> application, do I still have to do 'init_all_network_interfaces' to start
> the networking code? I tried to do this and it rebooted my target machine.

Yes - assuming your app is using the network.  You need to bring up the
network interface in your app.  This is the only way the app IP stack can
know about it.  The fact that RedBoot already init'd the hardware is by the
by - it's attached to a completely different IP stack.  When RedBoot and an
eCos app co-operate, the switching is down at the hardware driver level.

Specifically, the app must get (by whatever means) a different IP address
from RedBoot's.  In practice this means that at most one of RedBoot and app
can use DHCP or BOOTP or whatever, because the ESA (MAC address) must be
the same for both users of the network hardware.

I usually use IP from RedBoot's fconfig for RedBoot, and DHCP for my app.

> (2) If I try to jumpstart SNMP with 'cyg_net_snmp_init()', and I check the
> threads that are executing, I see that the snmpd thread has exited. Further
> investigation shows that a return from init_master_agent() in snmpd.c is
> failing, causing the code to exit. That seems to mean that I have a problem,
> is it related to the network possibly not being ready or properly
> initialized? (per #1)

Likely, if you didn't do 'init_all_network_interfaces' then not even the
loopback interface will be initialized.  So I guess snmpd (that's what it
is, essentially) will give up, there's clearly nothing to do!
 
> I can't quite grasp the interface between redboot and the downloaded image
> that I start executing. Is the network seamlessly integrated between them or
> do I need to do some manual stitching?

"Seamlessly" is too nice a word ;-)

One simple reason for re-init'ing the network in the app failing when using
the net to debug, is that it prints some diagnostic during re-init.  That
then tries to go, via RedBoot, via the same ethernet hardware, which is in
a half-setup state.  This obviously fails.

The best test for this is, until your ethernet app *works*, debug it via
serial.  Yeah yeah, it's slow. ;-(   Depending on various things, you might
be able to use the gdb "detach" command, to load over the nice fast net,
detach, re-connect via serial, then run the app.

	- Huge


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