diff options
author | Philipp Tomsich <philipp.tomsich@theobroma-systems.com> | 2017-03-01 21:10:39 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-03-20 18:04:18 -0400 |
commit | 02e43537b3223702e8e0289bc1c25208944865d0 (patch) | |
tree | 5b930f5cf287f9b9aedb709df15ff5af1b4dda37 /disk/Kconfig | |
parent | ee6fdfadaafeb50a2e7d2a5a4f978332b5198000 (diff) |
part_efi: support padding between the GPT header and partition entries
Some architectures require their SPL loader at a fixed address within
the first 16KB of the disk. To avoid an overlap with the partition
entries of the EFI partition table, the first safe offset (in bytes,
from the start of the device) for the entries can be set through
CONFIG_EFI_PARTITION_ENTRIES_OFF (via Kconfig)
When formatting a device with an EFI partition table, we may need to
leave a gap between the GPT header (always in LBA 1) and the partition
entries. The GPT header already contains a field to specify the
on-disk location, which has so far always been set to LBA 2. With this
change, a configurable offset will be translated into a LBA address
indicating where to put the entries.
Now also allows an override via device-tree using a config-node (see
doc/device-tree-bindings/config.txt for documentation).
Tested (exporting an internal MMC formatted with this) against Linux,
MacOS X and Windows.
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
[trini: __maybe_unused on config_offset to avoid warning]
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'disk/Kconfig')
-rw-r--r-- | disk/Kconfig | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/disk/Kconfig b/disk/Kconfig index 16ff52da3e..8e328b47ef 100644 --- a/disk/Kconfig +++ b/disk/Kconfig @@ -79,6 +79,19 @@ config EFI_PARTITION common when EFI is the bootloader. Note 2TB partition limit; see disk/part_efi.c +config EFI_PARTITION_ENTRIES_OFF + int "Offset (in bytes) of the EFI partition entries" + depends on EFI_PARTITION + default 0 + help + Specify an earliest location (in bytes) where the partition + entries may be located. This is meant to allow "punching a + hole into a device" to create a gap for an SPL, its payload + and the U-Boot environment. + + If unsure, leave at 0 (which will locate the partition + entries at the first possible LBA following the GPT header). + config SPL_EFI_PARTITION bool "Enable EFI GPT partition table for SPL" depends on SPL && PARTITIONS |