VerdexPro U-Boot Flashing Fix

From Gumstix User Wiki
Revision as of 10:51, 7 October 2010 by Ashcharles (Talk | contribs)

Jump to: navigation, search

Issue

The Numonyx NOR flash memory that Gumstix installed on a small quantity of Verdex Pro XL6P COMs in August 2010 as well as the inventory of Numonyx NOR flash memory that Gumstix has in stock for future builds show errors when written from u-boot.

Since the lead time on this Numonyx NOR flash memory has shot out to more than 6 months, Gumstix has endeavoured to resolve this issue with a software fix so that the current inventory of flash memory and the recently built Verdex Pro XL6P COMs can be made to perform to specification.

However, as this fix slows down writes to flash within u-boot by a factor of 20, this resolution is NOT considered to be a final answer to PKI 2010-3 by Gumstix. Note: this does not affect write performance in Linux.

See Gumstix PKI 2010-3 posted here for full details.

Symptoms

This faulty Numonyx NOR flash memory report errors when written from u-boot; this is due to an error in the Numonyx NOR flash memory itself.

Usually, users discover this problem when trying to replace the file system image. U-boot might report any or all of these message after a copy to flash command:

GUM> cp.b a2000000 40000 ${filesize}
Flash buffer write error at address 40000
Command Sequence Error.
Block locked.
Vpp Low Error.

Affected Parts

Verdex Pro XL6P COMs of build R2635 with Numonyx NOR flash memory (U$2) marked 256PF30TF as opposed to 256PF30T likely have this fault. Note, not all memory pages in the flash memory are necessarily affected. More details about affected parts can be found here.

While any software that modifies the block protection status of the Numonyx NOR flash memory is potentially susceptible to this hardware bug, we have only noticed the issue in u-boot.

Fix Details

The manufacturer notes that the block protection status is incorrectly set when software tries to unlock a flash block. By changing the block locking command sequence as shown in this fix, the silicon behaves correctly. In addition, it is necessary to disable the buffered write mode; this slows down writes to flash within u-boot by a factor of 20. This patch applies against Verdex Pro u-boot revision 1.2.0.

Usage

Caveats:

  • Installing a new version of u-boot to your Flash memory is risky and, if not done correctly, can result in your Verdex Pro XL6P COM being bricked. Proceed with caution.
  • This fix will slow down writes to flash within u-boot by a factor of 20
  1. Download this patched version of u-boot. (md5: 55e999c2bb21a5b963473f213c3911cc)
  2. Follow the instructions here to get a serial connection to your Verdex Pro XL6P COM.
  3. Type these commands to load the new u-boot to RAM and jump to it. This new u-boot will allow you to write to NAND:

GUM> loadb a2000000
CTRL+\, c
C-Kermit> send u-boot.bin (this should be the file you downloaded)
...tranfer for about 20 seconds...
C-Kermit> connect
GUM> go a2000000
U-Boot 1.2.0 (Oct  6 2010 - 00:42:27) - PXA270@600 MHz - 

*** Welcome to Gumstix ***

DRAM:  128 MB
Flash: 32 MB
Using default environment

Test that your new u-boot is working correctly by writing to a non-boot partitions. For example,

GUM> protect off 1:2-3
Un-Protect Flash Sectors 2-3 in Bank # 1
.. done
GUM> erase 1:2-3
Erase Flash Sectors 2-3 in Bank # 1 
.. done
GUM> loadb a2000000
CTRL+\, c
C-Kermit> send u-boot.bin (this should be the file you downloaded)
...tranfer for about 20 seconds...
C-Kermit> connect
GUM> cp.b a2000000 40000 ${filesize}
Copy to Flash... done

If everything went smoothly in the previous step, the new uboot is working. Let's carefully reflash the boot partition with the same steps but for sector 1:0-1 (0x0) rather than sector 1:2-3 (0x00040000):

GUM> protect off 1:0-1
Un-Protect Flash Sectors 0-1 in Bank # 1
.. done
GUM> erase 1:0-1
Erase Flash Sectors 0-1 in Bank # 1 
.. done
GUM> loadb a2000000
CTRL+\, c
C-Kermit> send u-boot.bin (this should be the file you downloaded)
...tranfer for about 20 seconds...
C-Kermit> connect
GUM> cp.b a2000000 0 ${filesize}
Copy to Flash... done
GUM> reset

The Verdex Pro XL6P COM should now boot into the new u-boot and the protect, erase, and cp.b commands should behave correctly albeit slowly.

Notes

  • Please contact ash (at) gumstix.com in case of problems with this procedure.