nand badblocks mark

Name

nand badblocks mark -- Manipulate the Bad Block Table

Synopsis

nand badblocks mark [-d <device>] -b <block> -s <state>

Arguments

-b block

The block number whose state is to be manipulated.

Note: Block numbers to this command are device block numbers, with 0 meaning the first block on the device.

-s state

The new state for the given block. This must be a state number, as output by nand badblocks states.

-d device

(Optional.) If not specified, and only one device is present, the command is assumed to apply to the NAND device; if more than one device is present, it must be specified.

Description

This command explicitly manipulates the Bad Block Table.

Note: This command may be configured out with the CYGSEM_REDBOOT_NAND_BADBLOCKS_MARK_CMD option.

Warning

Misuse of this command is likely to cause corruption of data you care about!

  • Live data in affected blocks can be rendered inaccessible to eCos.

  • Blocks which have been marked as unreliable due to wear can be brought back into circulation but will still be unreliable.

Examples

RedBoot> nand badblocks mark -d onboard -b 2000 -s 1
OK
RedBoot> nand badblocks list -d onboard 
factory bad: 100, 101. (count: 2 blocks)
worn bad: 2000. (count: 1 blocks)
reserved: 2046, 2047. (count: 2 blocks)
RedBoot> nand badblocks mark -d onboard -b 2000 -s 0
OK
RedBoot> nand badblocks list -d onboard 
factory bad: 100, 101. (count: 2 blocks)
worn bad: no blocks
reserved: 2046, 2047. (count: 2 blocks)
RedBoot>

2017-02-09
Documentation license for this page: Open Publication License