From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan Larmour To: "Dennis Ehlin (ECS)" Cc: ecos-discuss@sources.redhat.com Subject: Re: [ECOS] Redboot boot script? Date: Mon, 23 Apr 2001 10:58:00 -0000 Message-id: <3AE46D44.51FFDEE3@redhat.com> References: <2310E22AE31BD51189DB00A0C9DF89F85A2798@eseklnt101.kl.sw.ericsson.se> X-SW-Source: 2001-04/msg00327.html "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