Home
last modified time | relevance | path

Searched hist:"36 df616a" (Results 1 – 1 of 1) sorted by relevance

/openbmc/u-boot/cmd/
H A Dpart.c36df616a Mon Feb 26 15:17:59 CST 2018 Sam Protsenko <semen.protsenko@linaro.org> cmd: part: Allow passing partition name to start and size

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 <semen.protsenko@linaro.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>