This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Redboot - checksum boot loader
- From: Gary Thomas <gary at mlbassoc dot com>
- To: Andrew Lunn <andrew at lunn dot ch>
- Cc: nprasad3 at gmu dot edu, ecos-discuss at sources dot redhat dot com
- Date: Thu, 12 Feb 2004 09:30:59 -0700
- Subject: Re: [ECOS] Redboot - checksum boot loader
- Organization: MLB Associates
- References: <cb68acd07b.cd07bcb68a@gmu.edu> <20040212160414.GD2622@lunn.ch>
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