This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
Re: [PATCH] add option to override redboot abort script check
- From: Jonathan Larmour <jifl at eCosCentric dot com>
- To: Jose Vasconcellos <jvasco at verizon dot net>
- Cc: ecos-patches at ecos dot sourceware dot org
- Date: Tue, 26 Aug 2008 17:12:53 +0100
- Subject: Re: [PATCH] add option to override redboot abort script check
- Openpgp: id=A5FB74E6
- References: <48B3643D.6050105@verizon.net>
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