aboutsummaryrefslogtreecommitdiff
path: root/cmd/load.c
diff options
context:
space:
mode:
authorSam Protsenko <semen.protsenko@linaro.org>2018-02-26 23:17:59 +0200
committerTom Rini <trini@konsulko.com>2018-03-13 21:59:26 -0400
commit36df616a2deabdc2091d5ef837dc02622462bb2d (patch)
tree3370227e4cbf54b2271654ccedd9e53e7e85b4c8 /cmd/load.c
parent32090e5070845564e36c9c5ccc3dc708ece80298 (diff)
downloadu-boot-36df616a2deabdc2091d5ef837dc02622462bb2d.zip
u-boot-36df616a2deabdc2091d5ef837dc02622462bb2d.tar.gz
u-boot-36df616a2deabdc2091d5ef837dc02622462bb2d.tar.bz2
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>
Diffstat (limited to 'cmd/load.c')
0 files changed, 0 insertions, 0 deletions