nxp-imx / imx-kobs

Tool to create and write Freescale/NXP I.MX NAND boot related boot data structure to nand flash
GNU General Public License v2.0
29 stars 26 forks source link

Print exact addresses to stderr if there are wrong #15

Closed keelung-yang closed 5 years ago

keelung-yang commented 5 years ago

We got an error after installing our new nand chip.

mtd: bootstream too large

But how large exactly?

and in source code: `static int fill_fcb(struct mtd_data md, FILE fp) { ...

if (boot_stream_size_in_bytes >= max_boot_stream_size_in_bytes) {
    fprintf(stderr, "mtd: bootstream too large\n");
    return -1;

}`

SO please print boot_stream_size_in_bytes and max_boot_stream_size_in_bytes at least, it's very helpful to identify error.

This is just one case, other code should be improved too.

keelung-yang commented 5 years ago

Close it since I've done the job. See

Improve mtd error log #17