This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Redboot boot script?
- To: "Dennis Ehlin (ECS)" <Dennis dot Ehlin at ecs dot ericsson dot se>
- Subject: Re: [ECOS] Redboot boot script?
- From: Jonathan Larmour <jlarmour at redhat dot com>
- Date: Mon, 23 Apr 2001 18:58:28 +0100
- Cc: ecos-discuss at sources dot redhat dot com
- Organization: Red Hat UK Ltd.
- References: <2310E22AE31BD51189DB00A0C9DF89F85A2798@eseklnt101.kl.sw.ericsson.se>
"Dennis Ehlin (ECS)" wrote:
>
> Is it possible to use a "static boot script" i.e a script defined when RedBoot is compiled ?
> And this without having any flash memory support compiled into RedBoot.
>
> What I want to do is to get RedBoot to load an image from flash into RAM an exec it after a delay.
Not at present but I think it would be trivial to add.
FWIW, here's my thoughts. Create a new CDL option for scripting,
CYGFUN_REDBOOT_BOOT_SCRIPT. This can be enabled either when
CYGSEM_REDBOOT_FLASH_CONFIG is enabled, or if a new option of flavor
booldata called CYGDAT_REDBOOT_DEFAULT_BOOT_SCRIPT is defined.
Change this ifdef in redboot.h:
#ifdef CYGSEM_REDBOOT_FLASH_CONFIG
EXTERN unsigned char *script;
EXTERN int script_timeout;
#endif
to #ifdef CYGFUN_REDBOOT_BOOT_SCRIPT
At around line 215 or so of redboot's main.c change:
#ifdef CYGSEM_REDBOOT_FLASH_CONFIG
// Give the guy a chance to abort any boot script
if (script) {
to
#ifdef CYGFUN_REDBOOT_BOOT_SCRIPT
// Give the guy a chance to abort any boot script
#ifdef CYGDAT_REDBOOT_DEFAULT_BOOT_SCRIPT
if (!script)
script = CYGDAT_REDBOOT_DEFAULT_BOOT_SCRIPT;
#endif
if (script) {
You'll need to do some further tweaking of the CDL options to move some of
the existing options to do with scripting underneath the new
CYGFUN_REDBOOT_BOOT_SCRIPT component.
If you did that and sent the patches, that would be brill :-).
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine