diff options
| author | Tom Rini <[email protected]> | 2024-10-13 10:19:05 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-10-13 10:43:24 -0600 |
| commit | 82686e678e1587ddbd9570f82c58cdc3aecf2dbe (patch) | |
| tree | 74b15554a34cfac79cd695c114136410c83db171 /disk | |
| parent | 47e544f576699ca4630e20448db6a05178960697 (diff) | |
| parent | 711fcd3bdad52ba058e8ca3cf1673bf1b8299be2 (diff) | |
Merge branch 'staging' of https://source.denx.de/u-boot/custodians/u-boot-tegra
Assorted Tegra enhancements. Merged with the recent XPL_BUILD changes,
resolve some whitespace issues and fix the name of the new apalis-tk1
env file by Tom.
Signed-off-by: Tom Rini <[email protected]>
Diffstat (limited to 'disk')
| -rw-r--r-- | disk/Kconfig | 10 | ||||
| -rw-r--r-- | disk/part_efi.c | 11 |
2 files changed, 21 insertions, 0 deletions
diff --git a/disk/Kconfig b/disk/Kconfig index ffa835eb354..b0bd02539ee 100644 --- a/disk/Kconfig +++ b/disk/Kconfig @@ -49,6 +49,16 @@ config SPL_MAC_PARTITION default y if MAC_PARTITION select SPL_PARTITIONS +config TEGRA_PARTITION + bool "Enable Nvidia Tegra partition table" + select PARTITIONS + select EFI_PARTITION + help + Say Y here if you would like to use U-Boot on a device that + is using the Nvidia Tegra partition table and cannot alter it. + + If unsure, say N. + config DOS_PARTITION bool "Enable MS Dos partition table" default y if BOOT_DEFAULTS diff --git a/disk/part_efi.c b/disk/part_efi.c index 580821a6ee9..7f04c6ecd69 100644 --- a/disk/part_efi.c +++ b/disk/part_efi.c @@ -318,6 +318,17 @@ static int part_test_efi(struct blk_desc *desc) /* Read legacy MBR from block 0 and validate it */ if ((blk_dread(desc, 0, 1, (ulong *)legacymbr) != 1) || (is_pmbr_valid(legacymbr) != 1)) { + /* + * TegraPT is compatible with EFI part, but it + * cannot pass the Protective MBR check. Skip it + * if CONFIG_TEGRA_PARTITION is enabled and the + * device in question is eMMC. + */ + if (IS_ENABLED(CONFIG_TEGRA_PARTITION)) + if (!is_pmbr_valid(legacymbr) && + desc->uclass_id == UCLASS_MMC && + !desc->devnum) + return 0; return -1; } return 0; |
