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: Redboots CRC checking


Hi,

i first had to buy a flash programmer and to make some holidays.
Now after some weeks i am again struggling with this old problem.
Remember:
I got a Patch from Gary Thomas for the "Linux exec", to
respect the CRC failure.

In an earlier mail i wrote:
> > after applying the patch i rebuilt Redboot and tried it.
> > But it doesn't work.
> > So i looked into the patch. The concerned file should be
> > pachages/hal/arm/arch/current/src/redboot_linux_exec.c.
> > There i find an addon 
> >     if (entry == (unsigned long)NO_MEMORY) {
> >         diag_printf("Can't execute Linux - invalid entry 
> address\n");
> >         return;
> >     }
> > For me this doesn't look like a CRC check.
> > Or did I make a mistake in building Redboot?

Gary Thomas answered: 
> No - the "fis load" command will set 'entry_address' to 'NO_MEMORY' if
> there is a CRC error.  This code should catch that and cause 
> the 'exec'
> command to fail.  Of course, it can only do this if you do not specify
> an entry point address.
> 
> Exactly what does it do?  Perhaps you could print the value of 'entry'
> when it gets to this point.

I added this print command (entry printed as %x) and got the following:

	RedBoot> fi loa kernel
	** Warning - checksum failure.  stored: 0x7ca3fe54, computed:
0xdde742c4
	RedBoot> e
	entry = 6000000
	Using base address 0x01008000 and length 0x000ba7c8
	Uncompressing Linux...........

	invalid compressed format (err=1)

	-- System halted

This means, that the CRC check is working out. But the exec command doesn't
respect this and is starting the defect kernel.
I had expected, that the exec command wouldn't start the kernel after
recognizing
the CRC failure. Therefore the value of entry should have been 0xffffffff.
Where does this value 0x6000000 come from?

Best Regards
Andreas

-- 
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]