Support Apple FAT binaries on non-Apple platforms.
* include/grub/macho.h (GRUB_MACHO_FAT_EFI_MAGIC): New define. * include/grub/i386/macho.h (GRUB_MACHO_CPUTYPE_IS_HOST_CURRENT): Likewise. * grub-core/loader/efi/chainloader.c (grub_cmd_chainloader): Parse Apple FAT binaries.
This commit is contained in:
parent
4dedb13f51
commit
3e4f356646
4 changed files with 61 additions and 3 deletions
|
@ -23,6 +23,11 @@
|
|||
|
||||
#define GRUB_MACHO_CPUTYPE_IS_HOST32(x) ((x)==0x00000007)
|
||||
#define GRUB_MACHO_CPUTYPE_IS_HOST64(x) ((x)==0x01000007)
|
||||
#ifdef __x86_64__
|
||||
#define GRUB_MACHO_CPUTYPE_IS_HOST_CURRENT(x) ((x)==0x01000007)
|
||||
#else
|
||||
#define GRUB_MACHO_CPUTYPE_IS_HOST_CURRENT(x) ((x)==0x00000007)
|
||||
#endif
|
||||
|
||||
struct grub_macho_thread32
|
||||
{
|
||||
|
|
|
@ -27,6 +27,7 @@ struct grub_macho_fat_header
|
|||
grub_uint32_t nfat_arch;
|
||||
} __attribute__ ((packed));
|
||||
#define GRUB_MACHO_FAT_MAGIC 0xcafebabe
|
||||
#define GRUB_MACHO_FAT_EFI_MAGIC 0x0ef1fab9
|
||||
|
||||
typedef grub_uint32_t grub_macho_cpu_type_t;
|
||||
typedef grub_uint32_t grub_macho_cpu_subtype_t;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue