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 <[email protected]> Reviewed-by: Mark Kettenis <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]> --- v2: - Add 0x0c option - Make hex constants consistent - Move from if to switch statement v3: - Fix switch brain fart v4: - Drop boot_ind out of switch This is just a resend, it fell off my radar, and there was a CI failure. disk/part_dos.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/disk/part_dos.c b/disk/part_dos.c index 18dd35c9b98..92d6fa6e028 100644 --- a/disk/part_dos.c +++ b/disk/part_dos.c @@ -39,10 +39,21 @@ static int get_bootable(dos_partition_t *p) { int ret = 0; - if (p->sys_ind == 0xef) + switch (p->sys_ind) { + case 0x01: + case 0x06: + case 0x0b: + case 0x0c: + case 0xef: ret |= PART_EFI_SYSTEM_PARTITION; + break; + default: + break; + } + if (p->boot_ind == 0x80) ret |= PART_BOOTABLE; + return ret; } -- 2.51.0

