mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-19 19:34:35 +00:00
efi_loader: set partition GUID in device path for SIG_TYPE_GUID
Previously, the GPT device GUID was being used instead of the partition, which was incorrect. Signed-off-by: Alfonso Sánchez-Beato <alfonso.sanchez-beato@canonical.com> Let EFI_LOADER select CONFIG_PARTITION_UUIDS. Use log_warning() instead of printf() for warning. Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
parent
f929ce5072
commit
17f8cda505
2 changed files with 9 additions and 2 deletions
|
@ -12,6 +12,7 @@ config EFI_LOADER
|
||||||
depends on !EFI_STUB || !X86 || X86_64 || EFI_STUB_32BIT
|
depends on !EFI_STUB || !X86 || X86_64 || EFI_STUB_32BIT
|
||||||
default y if !ARM || SYS_CPU = armv7 || SYS_CPU = armv8
|
default y if !ARM || SYS_CPU = armv7 || SYS_CPU = armv8
|
||||||
select LIB_UUID
|
select LIB_UUID
|
||||||
|
select PARTITION_UUIDS
|
||||||
select HAVE_BLOCK_DEVICE
|
select HAVE_BLOCK_DEVICE
|
||||||
select REGEX
|
select REGEX
|
||||||
imply CFB_CONSOLE_ANSI
|
imply CFB_CONSOLE_ANSI
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
* (C) Copyright 2017 Rob Clark
|
* (C) Copyright 2017 Rob Clark
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define LOG_CATEGORY LOGC_EFI
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <blk.h>
|
#include <blk.h>
|
||||||
#include <dm.h>
|
#include <dm.h>
|
||||||
|
@ -16,6 +18,7 @@
|
||||||
#include <efi_loader.h>
|
#include <efi_loader.h>
|
||||||
#include <part.h>
|
#include <part.h>
|
||||||
#include <sandboxblockdev.h>
|
#include <sandboxblockdev.h>
|
||||||
|
#include <uuid.h>
|
||||||
#include <asm-generic/unaligned.h>
|
#include <asm-generic/unaligned.h>
|
||||||
#include <linux/compat.h> /* U16_MAX */
|
#include <linux/compat.h> /* U16_MAX */
|
||||||
|
|
||||||
|
@ -851,8 +854,11 @@ static void *dp_part_node(void *buf, struct blk_desc *desc, int part)
|
||||||
break;
|
break;
|
||||||
case SIG_TYPE_GUID:
|
case SIG_TYPE_GUID:
|
||||||
hddp->signature_type = 2;
|
hddp->signature_type = 2;
|
||||||
memcpy(hddp->partition_signature, &desc->guid_sig,
|
if (uuid_str_to_bin(info.uuid,
|
||||||
sizeof(hddp->partition_signature));
|
hddp->partition_signature, 1))
|
||||||
|
log_warning(
|
||||||
|
"Partition no. %d: invalid guid: %s\n",
|
||||||
|
part, info.uuid);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue