Gary Thomas wrote:
n.b. this should really have been posted to ecos-patches

Jose Vasconcellos wrote:
I have a device that does not have an easily accessible serial port.
Access to redboot is normally done via telnet from the ethernet port.
Of course, if there's a boot script installed then there's no opportunity
to abort the script. It does have a button, so I wanted the user to
power-on with the button pressed to bypass or abort the start-up script.
I had to rework packages/redboot/current/main.c

The following patch creates a function redboot_abort_script that handles
the existing console check. The idea is to be able to replace this routine
for unusual cases.

I don't see what your patch does other than factor out this portion of
the code.  Are you expecting to add other features, such as the ability
to add a platform defined test which simulates ^C?

Also if your platform doesn't have a serial port, how does one see the
message/prompt?

[snip]

I don't like this change.  I would prefer it still use the full test
(res == _GETS_CTRLC).

[snip]

Perhaps you can expand on what you're really after here.
Please post further discussion to the patches list.


I will move this discussion to ecos-patches when a more complete patch is
ready. My reason for posting was to get some feedback whether this is
even of interest and the approach I was taking was wothwhile. For it to
be a complete patch, I would have to add some option to override the
function from CDL.

To clarify your other concerns, access to the redboot prompt is done by telnet: (e.g. telnet 192.168.1.1 9000). The reason for the function redboot_abort_script being a boolean is that if it doesn't use the serial port then it shouldn't have to reference constants that are serial port specific (i.e. _GETS_CTRLC). In my case,
the replacement function looks at a gpio button to determine if the script
should be aborted.

-jose

--
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 via email to