[ECOS] custom code to bypass redboot abort script
Gary Thomas
gary@mlbassoc.com
Mon Aug 25 23:31:00 GMT 2008
Jose Vasconcellos wrote:
> 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.
Fine - work up a more complete patch and send it to the list.
Note: if you connect via telnet, you should be able to use ^C now - it's
supposed to work that way (at least it did in the past)
--
------------------------------------------------------------
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
More information about the Ecos-discuss
mailing list