Use mipsel- rather than mips- in directories involving mipsel ports to

allow both endiannesses coexist.

	* configure.ac: proparate target_cpu=mipsel rather than resetting to
	mips. All conditions adjusted.
	* tests/util/grub-shell-tester.in: Remove gratuitious target_cpu
	variable.
	* util/grub-install.in: Adjust conditions to take renaming into account.
	* util/grub-mkimage.c (image_targets): Likewise. New target
	mips-qemu_mips-elf for bigendian mips.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-05-17 22:48:20 +02:00
parent 35341bbc96
commit 4959e11109
5 changed files with 68 additions and 23 deletions

View file

@ -554,13 +554,13 @@ fi
case "${target_cpu}-${platform}" in
sparc64-ieee1275) mkimage_target=sparc64-ieee1275-raw ;;
mips-loongson) mkimage_target=mipsel-loongson-elf ;;
mipsel-loongson) mkimage_target=mipsel-loongson-elf ;;
*) mkimage_target="${target_cpu}-${platform}" ;;
esac
case "${target_cpu}-${platform}" in
i386-efi | x86_64-efi) imgext=efi ;;
mips-loongson | i386-coreboot | i386-multiboot | i386-ieee1275 \
mipsel-loongson | i386-coreboot | i386-multiboot | i386-ieee1275 \
| powerpc-ieee1275) imgext=elf ;;
*) imgext=img ;;
esac
@ -569,7 +569,7 @@ esac
"$grub_mkimage" ${config_opt} -d "${pkglibdir}" -O ${mkimage_target} --output="${grubdir}/core.${imgext}" --prefix="${prefix_drive}${relative_grubdir}" $modules || exit 1
# Backward-compatibility kludges
if [ "${target_cpu}-${platform}" = "mips-loongson" ]; then
if [ "${target_cpu}-${platform}" = "mipsel-loongson" ]; then
cp "${grubdir}/core.${imgext}" "${bootdir}"/grub.elf
elif [ "${target_cpu}-${platform}" = "i386-ieee1275" ] || [ "${target_cpu}-${platform}" = "powerpc-ieee1275" ]; then
cp "${grubdir}/core.${imgext}" "${grubdir}/grub"

View file

@ -274,7 +274,7 @@ struct image_target_desc image_targets[] =
.elf_target = EM_X86_64,
},
{
.dirname = "mips-loongson",
.dirname = "mipsel-loongson",
.names = { "mipsel-yeeloong-flash", NULL },
.voidp_sizeof = 4,
.bigendian = 0,
@ -296,7 +296,7 @@ struct image_target_desc image_targets[] =
.default_compression = COMPRESSION_NONE
},
{
.dirname = "mips-loongson",
.dirname = "mipsel-loongson",
.names = { "mipsel-fuloong-flash", NULL },
.voidp_sizeof = 4,
.bigendian = 0,
@ -318,7 +318,7 @@ struct image_target_desc image_targets[] =
.default_compression = COMPRESSION_NONE
},
{
.dirname = "mips-loongson",
.dirname = "mipsel-loongson",
.names = { "mipsel-loongson-elf", "mipsel-yeeloong-elf",
"mipsel-fuloong-elf", NULL },
.voidp_sizeof = 4,
@ -445,7 +445,7 @@ struct image_target_desc image_targets[] =
.default_compression = COMPRESSION_NONE
},
{
.dirname = "mips-qemu_mips",
.dirname = "mipsel-qemu_mips",
.names = { "mipsel-qemu_mips-elf", NULL },
.voidp_sizeof = 4,
.bigendian = 0,
@ -466,6 +466,28 @@ struct image_target_desc image_targets[] =
.link_align = GRUB_KERNEL_MIPS_QEMU_MIPS_LINK_ALIGN,
.default_compression = COMPRESSION_NONE
},
{
.dirname = "mips-qemu_mips",
.names = { "mips-qemu_mips-elf", NULL },
.voidp_sizeof = 4,
.bigendian = 1,
.id = IMAGE_LOONGSON_ELF,
.flags = PLATFORM_FLAGS_DECOMPRESSORS,
.prefix = GRUB_KERNEL_MIPS_QEMU_MIPS_PREFIX,
.prefix_end = GRUB_KERNEL_MIPS_QEMU_MIPS_PREFIX_END,
.raw_size = 0,
.total_module_size = GRUB_KERNEL_MIPS_QEMU_MIPS_TOTAL_MODULE_SIZE,
.compressed_size = TARGET_NO_FIELD,
.kernel_image_size = TARGET_NO_FIELD,
.section_align = 1,
.vaddr_offset = 0,
.install_dos_part = TARGET_NO_FIELD,
.install_bsd_part = TARGET_NO_FIELD,
.link_addr = GRUB_KERNEL_MIPS_QEMU_MIPS_LINK_ADDR,
.elf_target = EM_MIPS,
.link_align = GRUB_KERNEL_MIPS_QEMU_MIPS_LINK_ALIGN,
.default_compression = COMPRESSION_NONE
},
};
#define grub_target_to_host32(x) (grub_target_to_host32_real (image_target, (x)))