public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Jonathan Larmour <jlarmour@redhat.com>
To: "Dennis Ehlin (ECS)" <Dennis.Ehlin@ecs.ericsson.se>
Cc: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] Redboot boot script?
Date: Mon, 23 Apr 2001 10:58:00 -0000	[thread overview]
Message-ID: <3AE46D44.51FFDEE3@redhat.com> (raw)
In-Reply-To: <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

  reply	other threads:[~2001-04-23 10:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-23  7:22 Dennis Ehlin (ECS)
2001-04-23 10:58 ` Jonathan Larmour [this message]
2001-05-01 22:57 Dennis Ehlin (ECS)
2001-05-02 11:55 ` Jonathan Larmour
2001-05-17 23:48 Dennis Ehlin (ECS)
2001-05-18  6:49 ` Jonathan Larmour

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3AE46D44.51FFDEE3@redhat.com \
    --to=jlarmour@redhat.com \
    --cc=Dennis.Ehlin@ecs.ericsson.se \
    --cc=ecos-discuss@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).