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]

Re: RedBoot without serial


Gary Thomas wrote:
> 
> On Wed, 2002-05-08 at 12:55, Jeremy Craner wrote:
> > Hi all,
> >
> > This may be a simple question, but I haven't been able to figure it out for
> > a few days now. Is it possible to run RedBoot without a serial port?
> >
> > I have one board with both serial and ethernet. RedBoot runs fine, and I can
> > Telnet to it at port 9000. I have another board with no serial port--just
> > ethernet. My build of RedBoot for this board gets up to the part where it
> > does the command line prompt, but I can't ping the board or connect via
> > Telnet. I am defining the virtual vector and GDB stub defines the same as
> > with the first board, except that I am setting
> > CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS to 0 instead of 1. I have also tried
> > simply running the RedBoot code for the first board on the second, but it
> > still doesn't ping.
> >
> > The whole virtual vector setup is confusing because it seems to only apply
> > to serial ports. Maybe I am just misreading it. Please enlighten me.
> 
> We've definitely done this (a number of times).  I'm pretty sure that the
> platforms involved had a serial port which was either present or not.  The
> drivers were left in and the bits just drop on the floor :-)
> 
> If this is something you could do, it would probably be best.  Alternatively,
> you could have a dummy serial driver for your platform which does not have
> a real serial port.  Having CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS might
> actually be confusing things, so having a dummy port might do the trick.

Or we could find and fix the code that fails to allow for this scenario
:-). Certainly the code in mon_read_char_with_timeout() in
redboot/current/src/io.c has a loop:
            for (i = 0;  i < CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS;  i++,
tot++) {
which should just mean it spins doing nothing until the timeout, at which
the idle function should allow the net stuff to intervene.

So the most likely thing would be that something somewhere is dereferencing
the console stuff anyway. It would require debugging, and the best place to
start is in hal_if_init in hal/common/current/src/hal_if.c. The calls to
set_debug_comm and set_console_comm shouldn't happen if
CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL isn't valid. redboot's main.c as
well as io.c may also need tweaking.

So Jeremy if you want to fix this properly in eCos that's where to start
:-).

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
--[ "You can complain because roses have thorns, or you ]--
--[  can rejoice because thorns have roses." -Lincoln   ]-- Opinions==mine

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


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