Page 1 of 1

AT91Bootstrap

Posted: Thu Jun 23, 2016 3:36 pm
by dla
Hi all,

I have a custom board based on a at91sam9g25 SOC.

I got the message "ubifs_scan: corrupt empty space at LEB..." that is why I'd like to know if at91boostrap is supposed to correct empty page bitflips.

I tried to check in the at91boostrap code and have a feeling that the check_pmecc_ecc_data function is related to it (see below). But I'm not sure of the purpose of this function.
static int check_pmecc_ecc_data(struct nand_info *nand, unsigned char *buffer)
{
unsigned int i;
unsigned char *ecc_data = buffer + nand->pagesize + nand->ecclayout->eccpos[0];

for (i = 0; i < nand->ecclayout->eccbytes; i++)
if (*ecc_data++ != 0xff)
break;

if (i >= nand->ecclayout->eccbytes)
return -1;
else
return 0;
}

Thanks for the help

Re: AT91Bootstrap

Posted: Thu Jun 23, 2016 8:16 pm
by blue_z
dla wrote:I got the message "ubifs_scan: corrupt empty space at LEB..."
Not from AT91Bootstrap!
dla wrote:... that is why I'd like to know if at91boostrap is supposed to correct empty page bitflips.
Why would a boot program be overloaded with a such a task?
dla wrote:I tried to check in the at91boostrap code and have a feeling that the check_pmecc_ecc_data function is related to it
You've misinterpreted your "feelings".
dla wrote:But I'm not sure of the purpose of this function.
As its name implies, this function tries to confirm that the ECC data is valid, i.e. something other than erased bytes.

Regards