MLK-22259-2: cmd: mtdparts: skip invalid devices rather than quit
authorHan Xu <han.xu@nxp.com>
Fri, 12 Jul 2019 20:52:58 +0000 (15:52 -0500)
committerHan Xu <han.xu@nxp.com>
Tue, 16 Jul 2019 03:25:28 +0000 (22:25 -0500)
commite674896123983e152ef3cc9d1304b775e5086a5e
tree064f775757305e6935bd1f494e170fff71ed54aa
parentdbe3763931e536cba4925fdd04fda39cc748fc1c
MLK-22259-2: cmd: mtdparts: skip invalid devices rather than quit

mtdparts quit when invalid mtd devices found. Add thes patches to skip
the invalid devices, so NAND partitions can be alway found to burn boot
images.

For instance,

On i.MX6DL Sabreauto, nand config u-boot didn't enable the weim nor, so
parsing 8000000.nor leads to error:

Device nor0 not found!

With the patches, we can skip this invalid device and still get nand
boot partition table:

Device nor0 not found!
current device is invalid, skip it and check the next one

device nand0 <gpmi-nand>, # parts = 5
0: nandboot 0x04000000 0x00000000 0
1: nandkernel 0x01000000 0x04000000 0
2: nanddtb 0x01000000 0x05000000 0
3: nandtee 0x01000000 0x06000000 0
4: nandrootfs 0xf9000000 0x07000000 0

active partition: nand0,0 - (nandboot) 0x04000000 @ 0x00000000

Signed-off-by: Han Xu <han.xu@nxp.com>
cmd/mtdparts.c