mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
spl: blk: partition numbers are hexadecimal
Loading u-boot.itb from device 0x00, partition 0x0f fails with:
Trying to boot from NVME
Device 0: Vendor: 0x4x Rev: 8.0.50 Prod: nvme-1
Type: Hard Disk
Capacity: 3814.6 MB = 3.7 GB (7812500 x 512)
** Invalid partition 21 **
Couldn't find partition nvme 0:15
Like the command line interface fs_det_blk_dev() expects that the device
number and the partition number are hexadecimal.
Fixes: 8ce6a2e175 ("spl: blk: Support loading images from fs")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mayuresh Chitale <mchitale@ventanamicro.com>
This commit is contained in:
@@ -66,7 +66,7 @@ int spl_blk_load_image(struct spl_image_info *spl_image,
|
||||
}
|
||||
|
||||
dev.ifname = blk_get_uclass_name(uclass_id);
|
||||
snprintf(dev.dev_part_str, sizeof(dev.dev_part_str) - 1, "%d:%d",
|
||||
snprintf(dev.dev_part_str, sizeof(dev.dev_part_str) - 1, "%x:%x",
|
||||
devnum, partnum);
|
||||
ret = fs_set_blk_dev(dev.ifname, dev.dev_part_str, FS_TYPE_ANY);
|
||||
if (ret) {
|
||||
|
||||
Reference in New Issue
Block a user