This is the mail archive of the ecos-discuss@sources.redhat.com 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: Redboot - checksum boot loader


On Thu, 2004-02-12 at 09:04, Andrew Lunn wrote:
> On Thu, Feb 12, 2004 at 10:55:03AM -0500, nprasad3@gmu.edu wrote:
> > Hi,
> > 
> > I am looking for a boot loader that will perform some kind of check on the code before blindly jumping into it and running it (flash update failure, power loss etc.). 
> > 
> > If the checksum fails, the boot loader will leave the hardware in a sane state.
> > 
> > Is such functionality already built into one redboot? If so can someone point me to the usage.
> 
> from redboot.cdl:
> 
>            cdl_option CYGSEM_REDBOOT_FIS_CRC_CHECK {
>                 display       "Use CRC checksums on FIS images."
>                 flavor        bool
>                 default_value 1
>                 description "
>                   When this option is enabled, RedBoot will use CRC checksums
>                   when reading and writing flash images."
> 
> Read the code to find out exactly what it does when the crc fails.

It should do the "right thing".  If you try to load an image which fails
the CRC, the entry point will not be set and thus the "go" command will
fail.  e.g. (simulated)
  RedBoot> fi lo image
  ** Warning - checksum failure.  stored: 0x12345678, computed: 0x99887766
  RedBoot> go
  No entry point known - aborted
 
Of course, it would work the same if these commands were coming from a startup
script, etc.

-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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