Skip to contentSkip to conversation

U-boot environment on Sheevaplug

U-Boot Simon Kagstrom 2 participants 6 messages Jul 8, 2009 – Sep 8, 2009

lore
Share & tools
lore
#0 lore raw

Hi Prafulla (and the list)!

I'm wondering a bit how Sheevaplug handles the U-boot environment area. On OpenRD base it's stored on the NAND flash, and is protected by a 4-bit ECC as required when read by the boot prom - it just goes together with the rest of the u-boot image.

The Marvell-supplied 1.1.4 version has code to handle this (basically switches to Reed-Solomon when reading/saving the environment), but it doesn't work with upstream U-boot. If I disable ECC altogether (in kirkwood_nand.c) I can read the environment, but since U-boot doesn't use Reed-Solomon, the soft ECC option doesn't cut it.

Is the situation the same with sheevaplug? I see there are patches for OpenOCD to handle the same thing there,

http://lists.berlios.de/pipermail/openocd-development/2009-May/006413.html

so perhaps something similar is bound for U-boot as well?

// Simon

#1 lore raw

Hi again!

I just wanted to check if there has been any progress on the issue below (4-bit ECC support to read for the kernel / U-boot) during the summer.

Quoted 14 lines · On Wed, 8 Jul 2009 15:59:27 +0200 Simon Kagstrom…

Hi Prafulla (and the list)!

I'm wondering a bit how Sheevaplug handles the U-boot environment area. On OpenRD base it's stored on the NAND flash, and is protected by a 4-bit ECC as required when read by the boot prom - it just goes together with the rest of the u-boot image.

The Marvell-supplied 1.1.4 version has code to handle this (basically switches to Reed-Solomon when reading/saving the environment), but it doesn't work with upstream U-boot. If I disable ECC altogether (in kirkwood_nand.c) I can read the environment, but since U-boot doesn't use Reed-Solomon, the soft ECC option doesn't cut it.

Quoted 6 lines

Is the situation the same with sheevaplug? I see there are patches for OpenOCD to handle the same thing there,

http://lists.berlios.de/pipermail/openocd-development/2009-May/006413.html

so perhaps something similar is bound for U-boot as well?

// Simon

#2 lore raw
Quoted 9 lines

-----Original Message-----
From: Simon Kagstrom [mailto:simon.kagstrom at netinsight.net]
Sent: Tuesday, August 25, 2009 1:00 PM
To: U-Boot ML
Cc: Prafulla Wadaskar; Nicolas Pitre
Subject: Re: [U-Boot] U-boot environment on Sheevaplug

Quoted 5 lines

Hi again!

I just wanted to check if there has been any progress on the issue below (4-bit ECC support to read for the kernel / U-boot) during the summer.

Hi Simon
For u-boot, so far no progress for this :-(
Regards..
Prafulla .

#3 lore raw
In reply to Simon Kagstrom
Quoted 9 lines

-----Original Message-----
From: Simon Kagstrom [mailto:simon.kagstrom at netinsight.net]
Sent: Tuesday, August 25, 2009 1:00 PM
To: U-Boot ML
Cc: Prafulla Wadaskar; Nicolas Pitre
Subject: Re: [U-Boot] U-boot environment on Sheevaplug

Quoted 5 lines

Hi again!

I just wanted to check if there has been any progress on the issue below (4-bit ECC support to read for the kernel / U-boot) during the summer.

Hi Simon

I am restarting work on this issue for u-boot, Does anybody have any suggestions? Those are welcomed..

Regards..
Prafulla . .

Quoted 34 lines
Quoted 3 lines · On Wed, 8 Jul 2009 15:59:27 +0200 Simon Kagstrom…

Hi Prafulla (and the list)!

I'm wondering a bit how Sheevaplug handles the U-boot

environment area.

Quoted 5 lines

On OpenRD base it's stored on the NAND flash, and is protected by a 4-bit ECC as required when read by the boot prom - it just goes together with the rest of the u-boot image.

The Marvell-supplied 1.1.4 version has code to handle this

(basically

Quoted 1 line

switches to Reed-Solomon when reading/saving the

environment), but it

Quoted 2 lines

doesn't work with upstream U-boot. If I disable ECC altogether (in kirkwood_nand.c) I can read the environment, but since

U-boot doesn't

Quoted 4 lines

use Reed-Solomon, the soft ECC option doesn't cut it.

Is the situation the same with sheevaplug? I see there are

patches for

Quoted 3 lines

OpenOCD to handle the same thing there,

http://lists.berlios.de/pipermail/openocd-development/2009-May
/006413.html

Quoted 2 lines

so perhaps something similar is bound for U-boot as well?

// Simon

#4 lore raw
Quoted 6 lines · On Thu, 3 Sep 2009 23:20:02 -0700 Prafulla Wadaskar <[email protected]>…
Quoted 3 lines

I just wanted to check if there has been any progress on the issue below (4-bit ECC support to read for the kernel / U-boot) during the summer.

I am restarting work on this issue for u-boot, Does anybody have any suggestions? Those are welcomed..

Good to hear!

I guess a starting point could be Nicolas patch for this to OpenOCD:

http://lists.berlios.de/pipermail/openocd-development/2009-May/006413.html

and/or the Reed-Solomon library in the Linux kernel, lib/reed_solomon/{reed_solomon.c, decode_rs.c, encode_rs.c} (I guess this will be needed to perform error correction and decoding as well).

// Simon

#5 lore raw
In reply to Simon Kagstrom
Quoted 26 lines

-----Original Message-----
From: Simon Kagstrom [mailto:simon.kagstrom at netinsight.net]
Sent: Tuesday, August 25, 2009 1:00 PM
To: U-Boot ML
Cc: Prafulla Wadaskar; Nicolas Pitre
Subject: Re: [U-Boot] U-boot environment on Sheevaplug

Hi again!

I just wanted to check if there has been any progress on the issue below (4-bit ECC support to read for the kernel / U-boot) during the summer.

Quoted 3 lines · On Wed, 8 Jul 2009 15:59:27 +0200 Simon Kagstrom…

Hi Prafulla (and the list)!

I'm wondering a bit how Sheevaplug handles the U-boot

environment area.

Quoted 4 lines

On OpenRD base it's stored on the NAND flash, and is protected by a 4-bit ECC as required when read by the boot prom - it just goes together with the rest of the u-boot image.

Quoted 8 lines
Quoted 1 line

The Marvell-supplied 1.1.4 version has code to handle this

(basically

Quoted 1 line

switches to Reed-Solomon when reading/saving the

environment), but it

Quoted 2 lines

doesn't work with upstream U-boot. If I disable ECC altogether (in kirkwood_nand.c) I can read the environment, but since

U-boot doesn't

Quoted 1 line

use Reed-Solomon, the soft ECC option doesn't cut it.

Hi Simon
As of now u-boot as well as Linux kernel supports only 1-bit ECC for Kirkwood. There are efforts going on to make 4-bit ECC support available for Kirkwood on Linux. Once this available, I will make it available on u-boot.

Meanwhile you can replace oob_softecc_kw with oob_softecc in openocd board config file to make it in sync with u-boot and kernel. This will ensure openocd to write NAND with 1-bit ECC.

Regards..
Prafulla . .

Quoted 14 lines
Quoted 3 lines

Is the situation the same with sheevaplug? I see there are

patches for

Quoted 3 lines

OpenOCD to handle the same thing there,

http://lists.berlios.de/pipermail/openocd-development/2009-May
/006413.html

Quoted 2 lines

so perhaps something similar is bound for U-boot as well?

// Simon