u-boot/boot
Mathew McBride 484e701d74 bootstd: Use blk uclass device numbers to set efi bootdev
When loading a file from a block device, efiload_read_file
was using the seq_num of the device (e.g "35" of virtio_blk#35)
instead of the block device id (e.g what you get from running
the corresponding device scan command, like "virtio 0")

This cause EFI booting from these devices to fail as an
invalid device number is passed to blk_get_device_part_str:

  Scanning bootdev 'virtio-blk#35.bootdev':
  distro_efi_read_bootflow_file start (efi,fname=<NULL>)
  distro_efi_read_bootflow_file start (efi,fname=<NULL>)
  setting bootdev virtio, 35, efi/boot/bootaa64.efi, 00000000beef9a40, 170800
  efi_dp_from_name calling blk_get_device_part_str
  dev=virtio devnr=35 path=efi/boot/bootaa64.efi
  blk_get_device_part_str (virtio,35)
  blk_get_device_by_str (virtio, 35)
  ** Bad device specification virtio 35 **
  Using default device tree: dtb/qemu-arm.dtb
  No device tree available
  0  efi          ready   virtio       1  virtio-blk#35.bootdev.par efi/boot/bootaa64.efi
  ** Booting bootflow 'virtio-blk#35.bootdev.part_1' with efi
  blk_get_device_part_str (virtio,0:1)
  blk_get_device_by_str (virtio, 0)
  No UEFI binary known at beef9a40 (image buf=00000000beef9a40,addr=0000000000000000)
  Boot failed (err=-22)

Signed-off-by: Mathew McBride <matt@traverse.com.au>
Signed-off-by: Simon Glass <sjg@chromium.org>
2023-04-26 08:43:05 -04:00
..
android_ab.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
boot_fit.c treewide: Drop image_header_t typedef 2022-09-29 16:07:57 -04:00
bootdev-uclass.c bootstd: Adjust code ordering to work around compiler quirk 2023-04-26 08:43:05 -04:00
bootflow.c bootstd: Replicate the dtb-filename quirks of distroboot 2023-03-08 11:40:49 -08:00
bootflow_internal.h bootstd: Support creating a boot menu 2023-01-16 18:26:50 -05:00
bootflow_menu.c bootstd: Support setting a theme for the menu 2023-01-16 18:26:51 -05:00
bootm.c android: boot: support boot image header version 3 and 4 2023-04-04 14:50:47 -04:00
bootm_os.c treewide: Drop image_header_t typedef 2022-09-29 16:07:57 -04:00
bootmeth-uclass.c bootstd: Add a new bootmeth method to set the bootflow 2023-01-23 18:11:41 -05:00
bootmeth_distro.c bootstd: Rename bootdev checkers 2023-01-23 18:11:40 -05:00
bootmeth_efi.c bootstd: Use blk uclass device numbers to set efi bootdev 2023-04-26 08:43:05 -04:00
bootmeth_efi_mgr.c bootstd: Rename bootdev checkers 2023-01-23 18:11:40 -05:00
bootmeth_pxe.c bootstd: Treat DHCP and PXE as bootdev labels 2023-01-23 18:11:41 -05:00
bootmeth_qfw.c qemu: Add a bootmeth for qfw 2023-02-06 13:04:53 -05:00
bootmeth_sandbox.c bootstd: Add a sandbox bootmeth driver 2022-04-25 10:00:04 -04:00
bootmeth_script.c bootstd: Treat DHCP and PXE as bootdev labels 2023-01-23 18:11:41 -05:00
bootretry.c cyclic: Use schedule() instead of WATCHDOG_RESET() 2022-09-18 10:26:33 +02:00
bootstd-uclass.c bootstd: Remove special-case code for boot_targets 2023-01-23 18:11:39 -05:00
common_fit.c Create a new boot/ directory 2021-11-11 19:01:56 -05:00
expo.c expo: Add basic implementation 2023-01-16 18:26:50 -05:00
fdt_region.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
image-android-dt.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
image-android.c android: boot: support bootconfig 2023-04-04 14:50:47 -04:00
image-board.c boot/image-board.c: Silence warning in select_ramdisk 2023-04-25 15:31:27 -04:00
image-cipher.c Create a new boot/ directory 2021-11-11 19:01:56 -05:00
image-fdt.c android: boot: support boot image header version 3 and 4 2023-04-04 14:50:47 -04:00
image-fit-sig.c mkimage: fit: Fix signing of configs with external data 2022-10-26 11:36:06 -04:00
image-fit.c image: Allow loading a FIT image for a particular phase 2022-10-31 11:02:45 -04:00
image-host.c Create a new boot/ directory 2021-11-11 19:01:56 -05:00
image-pre-load.c boot: image-pre-load: Check environment for location of signature info 2022-10-11 15:40:48 -04:00
image-sig.c Create a new boot/ directory 2021-11-11 19:01:56 -05:00
image.c tools: mkimage: add new image type "fdt_legacy" 2022-12-08 09:29:02 -05:00
Kconfig Merge branch 'master' into next 2023-03-27 15:19:57 -04:00
Makefile boot: Add Kconfigs for BOOTMETH_VBE_REQUEST 2023-03-02 17:45:58 -05:00
pxe_utils.c Merge branch 'next' 2023-01-09 11:30:08 -05:00
scene.c expo: Add support for scenes 2023-01-16 18:26:50 -05:00
scene_internal.h expo: Add support for scenes 2023-01-16 18:26:50 -05:00
scene_menu.c expo: Add support for scene menus 2023-01-16 18:26:50 -05:00
vbe.c boot: fix vbe_find_first_device() 2022-08-26 16:32:59 -06:00
vbe_request.c Correct SPL use of DM_RNG 2023-03-02 17:45:58 -05:00
vbe_simple.c vbe: Move OS implementation into a separate file 2022-10-31 11:03:36 -04:00
vbe_simple.h vbe: Move OS implementation into a separate file 2022-10-31 11:03:36 -04:00
vbe_simple_fw.c bootstd: Treat DHCP and PXE as bootdev labels 2023-01-23 18:11:41 -05:00
vbe_simple_os.c vbe: Allow probing the VBE bootmeth to fail in OS fixup 2023-01-18 19:41:16 -05:00