All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] disk: dos: Add all options for EFI System Partitions
@ 2024-02-19  9:12 Peter Robinson
  2024-02-19 10:24 ` Mark Kettenis
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Robinson @ 2024-02-19  9:12 UTC (permalink / raw)
  To: Tom Rini, Simon Glass, Ilias Apalodimas, u-boot; +Cc: Peter Robinson

The EFI spec states that the ESP can be any of FAT12/16/32 but for
compatibility doesn't necssarily require the partition to be the
EFI partition table ID of 0xef. A number of arm devices will not
find their firmware on a FAT partition with an ID of 0xef so also
allow the original FAT12/16/32 partition IDs as they are also
permissable for an ESP.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
 disk/part_dos.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/disk/part_dos.c b/disk/part_dos.c
index 567ead7511d..303eb1d13ee 100644
--- a/disk/part_dos.c
+++ b/disk/part_dos.c
@@ -40,6 +40,12 @@ static int get_bootable(dos_partition_t *p)
 {
 	int ret = 0;
 
+	if (p->sys_ind == 0x1)
+		ret |= PART_EFI_SYSTEM_PARTITION;
+	if (p->sys_ind == 0x6)
+		ret |= PART_EFI_SYSTEM_PARTITION;
+	if (p->sys_ind == 0x0b)
+		ret |= PART_EFI_SYSTEM_PARTITION;
 	if (p->sys_ind == 0xef)
 		ret |= PART_EFI_SYSTEM_PARTITION;
 	if (p->boot_ind == 0x80)
-- 
2.43.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-02-19 12:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-19  9:12 [PATCH] disk: dos: Add all options for EFI System Partitions Peter Robinson
2024-02-19 10:24 ` Mark Kettenis
2024-02-19 10:53   ` Peter Robinson
2024-02-19 12:58     ` Ilias Apalodimas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.