Skip to main content.
Navigation:
DENX
>
DULG
>
UBootCmdGroupNand
Translations:
Edit
|
Attach
|
Raw
|
Ref-By
|
Printable
|
More
DULG
Sections of this site:
DENX Home
|
DULG
|
ELDK-5
|
Know
|
Training
|
U-Boot
|
U-Bootdoc
Topics
DULG Home
BoardSelect
Manual
FAQ
Application Notes
Changes
Index
List of pages in DULG
Search
%SECTION0{name=UBootCmdNand}% NAND devices U-Boot allows us to directly work with NAND devices attached directly or through a NAND controller. The commands are grouped under the =nand= subsystem: %INCLUDE{DULGData_%BOARD%.UBootNandHelp}% %SECTION1{name=UBootNandBad}% nand bad - show bad block information As NAND devices can develop bad blocks over their lifetime and usually even are delivered with bad blocks already, the NAND commands need to be aware of this fact. Getting information of the current bad block list is easy: %INCLUDE{DULGData_%BOARD%.UBootNandBad}% %SECTION1{name=UBootNandErase}% nand erase - erase region Ensuring that the NAND device functions properly, we will use the basic commands to construct a testpattern in memory, write that to the device, of course erasing it first, and read the data back. A final comparison will show if all data was transferred correctly. We begin be erasing 64k at the start of the NAND device: %INCLUDE{DULGData_%BOARD%.UBootNandErase}% %SECTION1{name=UBootNandWrite}% nand write - write to NAND device Let's create a testpattern in memory and write that to the previously erased NAND area: %INCLUDE{DULGData_%BOARD%.UBootNandWrite}% %SECTION1{name=UBootNandRead}% nand read - read from NAND device As everything worked ok, we ensure everything was fine by transferring the data to a different location in RAM and check this against the original written content: %INCLUDE{DULGData_%BOARD%.UBootNandRead}%