4 Commits

Author SHA1 Message Date
Simon Glass
1137ab205f cmd: Refactor part_find() into separate functions
This function uses #ifdefs and ends up with a very large indent, Split
it into two separate functions, one for the EFI app and one for other
builds.

Drop the use of config.h while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-25 09:47:09 -06:00
Simon Glass
004eb91bda cmd: part_find: Correct radix and calls
Recent work removed the if_type member. Update the code to use the new
method for obtaining the interface type.

Use hex so that large partition numbers (>=10) work correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-25 09:47:09 -06:00
Simon Glass
ca1f2dbd8e efi: Rename CONFIG_EFI to CONFIG_EFI_CLIENT
The generic name 'EFI' would be more useful for common EFI features. At
present it just refers to the EFI app and stub, which is confusing.

Rename it to EFI_CLIENT

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-05-28 08:02:11 +01:00
Matthew Garrett
e17915d63c Add part_find command
part_find takes a GPT GUID and searches for a partition that matches
that. It then sets the target_part environment variable to the media
type, device number and partition number that matched, allowing
$target_part to be passed directly to bootm and similar commands.

Signed-off-by: Matthew Garrett <mgarrett@aurora.tech>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-12-07 17:53:09 -07:00