From bd42a94268b165a6f298b9ab13be7003e8d96b02 Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Fri, 27 Jan 2017 11:00:41 +0100 Subject: disk: convert CONFIG_EFI_PARTITION to Kconfig Signed-off-by: Patrick Delaunay Signed-off-by: Patrick Delaunay --- disk/Kconfig | 16 ++++++++++++++++ disk/Makefile | 2 +- disk/part.c | 2 +- disk/part_efi.c | 2 +- 4 files changed, 19 insertions(+), 3 deletions(-) (limited to 'disk') diff --git a/disk/Kconfig b/disk/Kconfig index 8adf59e821..03bf05d186 100644 --- a/disk/Kconfig +++ b/disk/Kconfig @@ -68,4 +68,20 @@ config SPL_AMIGA_PARTITION depends on SPL && PARTITIONS default y if AMIGA_PARTITION +config EFI_PARTITION + bool "Enable EFI GPT partition table" + depends on PARTITIONS + default y if DISTRO_DEFAULTS + default y if TEGRA + help + Say Y here if you would like to use device under U-Boot which + were partitioned using EFI GPT. + common when EFI is the bootloader. Note 2TB partition limit; + see disk/part_efi.c + +config SPL_EFI_PARTITION + bool "Enable EFI GPT partition table for SPL" + depends on SPL && PARTITIONS + default y if EFI_PARTITION + endmenu diff --git a/disk/Makefile b/disk/Makefile index aa6ee4591c..12c0531689 100644 --- a/disk/Makefile +++ b/disk/Makefile @@ -12,4 +12,4 @@ obj-$(CONFIG_$(SPL_)MAC_PARTITION) += part_mac.o obj-$(CONFIG_$(SPL_)DOS_PARTITION) += part_dos.o obj-$(CONFIG_$(SPL_)ISO_PARTITION) += part_iso.o obj-$(CONFIG_$(SPL_)AMIGA_PARTITION) += part_amiga.o -obj-$(CONFIG_EFI_PARTITION) += part_efi.o +obj-$(CONFIG_$(SPL_)EFI_PARTITION) += part_efi.o diff --git a/disk/part.c b/disk/part.c index ad381641ec..cd14e988ed 100644 --- a/disk/part.c +++ b/disk/part.c @@ -238,7 +238,7 @@ static void print_part_header(const char *type, struct blk_desc *dev_desc) CONFIG_IS_ENABLED(DOS_PARTITION) || \ CONFIG_IS_ENABLED(ISO_PARTITION) || \ CONFIG_IS_ENABLED(AMIGA_PARTITION) || \ - defined(CONFIG_EFI_PARTITION) + CONFIG_IS_ENABLED(EFI_PARTITION) puts ("\nPartition Map for "); switch (dev_desc->if_type) { case IF_TYPE_IDE: diff --git a/disk/part_efi.c b/disk/part_efi.c index 19243380da..f1b7116f48 100644 --- a/disk/part_efi.c +++ b/disk/part_efi.c @@ -171,7 +171,7 @@ static void prepare_backup_gpt_header(gpt_header *gpt_h) gpt_h->header_crc32 = cpu_to_le32(calc_crc32); } -#ifdef CONFIG_EFI_PARTITION +#if CONFIG_IS_ENABLED(EFI_PARTITION) /* * Public Functions (include/part.h) */ -- cgit v1.2.3