test_nand
Note: This test relies on boardenv_* containing configuration values to define the nand device total size and timeout available for testing. Without this, the test will be automatically skipped. This test will be also skipped if the NAND flash device is not detected.
For example:
# Setup env__nand_device_test to set the NAND flash total size and timeout.
env__nand_device_test = {
'size': '8192 MB',
'timeout': 100000,
}
- test_nand.nand_pre_commands(ubman)
Probe the NAND flash device and gather geometry from nand info.
- Args:
ubman: A U-Boot console connection.
- Returns:
- A dictionary with the following keys:
page_size: NAND page size in bytes. erase_size: NAND erase (sector) size in bytes. total_size: Usable NAND size in bytes (bad blocks subtracted). timeout: Timeout in milliseconds for long-running operations.
- test_nand.test_nand_read_twice(ubman)
This test reads the whole NAND flash twice, random_size till full flash size, random till page size.
- test_nand.test_nand_write_twice(ubman)
This test does the random writes till page size, size and full size
- test_nand.test_nand_erase_block(ubman)
Erase the NAND flash one erase block at a time.
- test_nand.test_nand_erase_all(ubman)
Erase the entire NAND flash in a single operation.