From 4ce521977f79a883f9c47984ef675c4b2267b7ad Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Tue, 14 Nov 2017 20:50:04 +0100 Subject: part: efi: Add a Kconfig option for the number of partition entries On some SoCs, the SPL needs to be located right in the middle of the GPT partition entries. One way to work around that is to create partition entries for a smaller number of partitions to accomodate with where the SPL will be. Create a Kconfig option to allow to do that. Reviewed-by: Andre Przywara Reviewed-by: Tom Rini Signed-off-by: Maxime Ripard --- disk/Kconfig | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'disk') diff --git a/disk/Kconfig b/disk/Kconfig index 9396562120..f82beef6e6 100644 --- a/disk/Kconfig +++ b/disk/Kconfig @@ -78,6 +78,19 @@ config EFI_PARTITION common when EFI is the bootloader. Note 2TB partition limit; see disk/part_efi.c +config EFI_PARTITION_ENTRIES_NUMBERS + int "Number of the EFI partition entries" + depends on EFI_PARTITION + default 128 + help + Specify the number of partition entries in the GPT. This is + meant to allow less than the standard specifies for devices + that might need to place their first-stage bootloader in the + middle of a regular GPT. + + If unsure, leave at 128 entries, which is the standard + number. + config EFI_PARTITION_ENTRIES_OFF int "Offset (in bytes) of the EFI partition entries" depends on EFI_PARTITION -- cgit v1.2.3 From 5dc0256d1210cb38ba11b22a8eb2ccc101460963 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Tue, 14 Nov 2017 21:07:51 +0100 Subject: part: efi: Add default number of partition entries for sunxi The SPL must be located at 8kB (16 sectors) offset. That's right in the middle of the GPT, so we need to define a smaller amount of partitions to accomodate for that location. Reviewed-by: Andre Przywara Signed-off-by: Maxime Ripard --- disk/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'disk') diff --git a/disk/Kconfig b/disk/Kconfig index f82beef6e6..0446bb63ca 100644 --- a/disk/Kconfig +++ b/disk/Kconfig @@ -81,6 +81,7 @@ config EFI_PARTITION config EFI_PARTITION_ENTRIES_NUMBERS int "Number of the EFI partition entries" depends on EFI_PARTITION + default 56 if ARCH_SUNXI default 128 help Specify the number of partition entries in the GPT. This is -- cgit v1.2.3