On Mon, Feb 26, 2018 at 11:17:59PM +0200, Sam Protsenko wrote:
> Allow passing the partition name to "part start" and "part size"
> commands, so we can avoid magic numbers in the environment.
>
> Consider one real use-case: in include/environment/ti/boot.h we have
> commands like these:
>
> setenv boot_part 9
> part start mmc ${mmcdev} ${boot_part} boot_start
> part size mmc ${mmcdev} ${boot_part} boot_size
> mmc read ${loadaddr} ${boot_start} ${boot_size}
>
> Now suppose that we have changed the partition table and boot_part now
> is 10. We will need to fix commands above. And anyone who relies on
> these boot commands, will need to change them accordingly, too (this was
> an actual case in our lab while testing Linux boot on Android
> environment).
>
> By providing the option to pass partition name instead, we fix mentioned
> issue, by eliminating the necessity to use magic numbers.
>
> Signed-off-by: Sam Protsenko <[email protected]>
> Reviewed-by: Lukasz Majewski <[email protected]>Applied to u-boot/master, thanks! -- Tom
signature.asc
Description: PGP signature
_______________________________________________ U-Boot mailing list [email protected] https://lists.denx.de/listinfo/u-boot

