[PATCH] lib: strto: Stop detection when invalid char is used
Tom Rini
trini at konsulko.com
Sun Apr 26 13:26:17 CEST 2020
On Wed, Apr 08, 2020 at 10:09:16AM +0200, Michal Simek wrote:
> This issue has been found when mtd partition are specified. Autodetection
> code should stop when the first invalid char is found.
>
> Here is the example of commands:
> setenv mtdids nand0=memory-controller at e000e000
> setenv mtdparts "mtdparts=nand0:4m(boot),4m(env),64m(kernel),96m(rootfs)"
> mtd list
>
> Before:
> Zynq> mtd list
> List of MTD devices:
> * nand0
> - type: NAND flash
> - block size: 0x20000 bytes
> - min I/O: 0x800 bytes
> - OOB size: 64 bytes
> - OOB available: 16 bytes
> - ECC strength: 1 bits
> - ECC step size: 2048 bytes
> - bitflip threshold: 1 bits
> - 0x000000000000-0x000010000000 : "nand0"
> - 0x000000000000-0x000000400000 : "boot"
> - 0x000000400000-0x000000800000 : "env"
> - 0x000000800000-0x000006c00000 : "kernel"
> - 0x000006c00000-0x000010000000 : "rootfs"
>
> Where it is visible that kernel partition has 100m instead of 64m
>
> After:
> Zynq> mtd list
> * nand0
> - type: NAND flash
> - block size: 0x20000 bytes
> - min I/O: 0x800 bytes
> - OOB size: 64 bytes
> - OOB available: 16 bytes
> - ECC strength: 1 bits
> - ECC step size: 2048 bytes
> - bitflip threshold: 1 bits
> - 0x000000000000-0x000010000000 : "nand0"
> - 0x000000000000-0x000000400000 : "boot"
> - 0x000000400000-0x000000800000 : "env"
> - 0x000000800000-0x000004800000 : "kernel"
> - 0x000004800000-0x00000a800000 : "rootfs"
>
> Signed-off-by: Michal Simek <michal.simek at xilinx.com>
> Tested-by: Heiko Schocher <hs at denx.de>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200426/68b84333/attachment.sig>
More information about the U-Boot
mailing list