From 36ac10e085ecf53e9c76685e05a1ebe7b5221ca3 Mon Sep 17 00:00:00 2001 From: Ram Pai Date: Tue, 25 Feb 2014 00:07:43 +0000 Subject: [PATCH 05/23] recognize and install a LE grub boot loader grub-install can now recognize and install a LE grub boot loader Signed-off-by: Ram Pai --- util/mkimage.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/util/mkimage.c b/util/mkimage.c index 26d9816..9374ccd 100644 --- a/util/mkimage.c +++ b/util/mkimage.c @@ -354,8 +354,21 @@ static const struct grub_install_image_target_desc image_targets[] = { .dirname = "powerpc-ieee1275", .names = { "powerpc-ieee1275", NULL }, + +#ifdef __powerpc64__ + .voidp_sizeof = 8, + .elf_target = EM_PPC64, +#else .voidp_sizeof = 4, + .elf_target = EM_PPC, +#endif + +#ifdef __powerpc64le__ + .bigendian = 0, +#else .bigendian = 1, +#endif + .id = IMAGE_PPC, .flags = PLATFORM_FLAGS_NONE, .total_module_size = TARGET_NO_FIELD, @@ -365,7 +378,6 @@ static const struct grub_install_image_target_desc image_targets[] = .section_align = 1, .vaddr_offset = 0, .link_addr = GRUB_KERNEL_POWERPC_IEEE1275_LINK_ADDR, - .elf_target = EM_PPC, .mod_gap = GRUB_KERNEL_POWERPC_IEEE1275_MOD_GAP, .mod_align = GRUB_KERNEL_POWERPC_IEEE1275_MOD_ALIGN, .link_align = 4 -- 1.8.3.1