This is the mail archive of the ecos-patches@sourceware.org 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: [PATCH] add option to override redboot abort script check


Jose Vasconcellos wrote:
> 
> diff -r 690e1f51d092 packages/redboot/current/src/main.c
> --- a/packages/redboot/current/src/main.c    Sun May 04 17:02:34 2008 -0400
> +++ b/packages/redboot/current/src/main.c    Mon Aug 25 21:44:30 2008 -0400
> @@ -234,6 +234,29 @@
> }
> #endif
> 
> +// Check for ^C on console
> +bool redboot_abort_script(int script_timeout_ms) CYBLD_ATTRIB_WEAK;

NB the above line should be CYGBLD_ATTRIB_WEAK.

Gary wrote:
> 
> The attached patch affects the same change you'd like, with the benefit of
> retaining existing functionality (e.g. being able to connect and abort
> via ^C) while giving your target platform the ability to handle the abort
> button.  Simply define the macro HAL_REDBOOT_ABORT_FUNCTION in your HAL
> to return true on abort and you're done.

Although it doesn't allow you to disallow ctrl-c - i.e. ensure a compulsory
boot script - for some products that ship with RedBoot as primary boot
loader, this may be desirable (with a jumper or some other special physical
means being the _only_ way to get into redboot).

Maybe the best solution is to take Jose's idea of a separate weak
redboot_abort_script, and _also_ include Gary's HAL_REDBOOT_ABORT_FUNCTION
check.

Jifl
-- 
eCosCentric Limited      http://www.eCosCentric.com/     The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.       Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["Si fractum non sit, noli id reficere"]------       Opinions==mine


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