From 3f2bdd8f556e72d9b441f9a0ea29ffa2e2a1ecf2 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Fri, 15 Jun 2012 18:35:11 +0200 Subject: [PATCH] * Makefile.util.def (grub-mkrescue): Enable on loongson. * util/grub-mkrescue.in: Handle loongson. --- ChangeLog | 5 +++++ Makefile.util.def | 2 ++ util/grub-mkrescue.in | 21 +++++++++++++++++++++ 3 files changed, 28 insertions(+) diff --git a/ChangeLog b/ChangeLog index 40c63a2d8..6ea130dee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-06-15 Vladimir Serbinenko + + * Makefile.util.def (grub-mkrescue): Enable on loongson. + * util/grub-mkrescue.in: Handle loongson. + 2012-06-14 Vladimir Serbinenko * util/getroot.c (convert_system_partition_to_system_disk) [__APPLE__]: diff --git a/Makefile.util.def b/Makefile.util.def index 79430e60a..b80187c81 100644 --- a/Makefile.util.def +++ b/Makefile.util.def @@ -456,6 +456,7 @@ script = { name = grub-mkrescue; x86 = util/grub-mkrescue.in; mips_qemu_mips = util/grub-mkrescue.in; + mips_loongson = util/grub-mkrescue.in; ia64_efi = util/grub-mkrescue.in; powerpc_ieee1275 = util/powerpc/ieee1275/grub-mkrescue.in; enable = i386_pc; @@ -465,6 +466,7 @@ script = { enable = i386_multiboot; enable = i386_coreboot; enable = mips_qemu_mips; + enable = mips_loongson; enable = ia64_efi; enable = powerpc_ieee1275; }; diff --git a/util/grub-mkrescue.in b/util/grub-mkrescue.in index 2ba5f0825..f71099ee0 100644 --- a/util/grub-mkrescue.in +++ b/util/grub-mkrescue.in @@ -41,6 +41,7 @@ multiboot_dir="${libdir}/@PACKAGE@/i386-multiboot" coreboot_dir="${libdir}/@PACKAGE@/i386-coreboot" qemu_dir="${libdir}/@PACKAGE@/i386-qemu" mipsel_qemu_dir="${libdir}/@PACKAGE@/mipsel-qemu_mips" +loongson_dir="${libdir}/@PACKAGE@/mipsel-loongson" mips_qemu_dir="${libdir}/@PACKAGE@/mips-qemu_mips" pc_dir="${libdir}/@PACKAGE@/i386-pc" efi32_dir="${libdir}/@PACKAGE@/i386-efi" @@ -253,6 +254,9 @@ if [ "${override_dir}" = "" ] ; then if test -e "${mipsel_qemu_dir}" ; then process_input_dir "${mipsel_qemu_dir}" mipsel-qemu_mips fi + if test -e "${loongson_dir}" ; then + process_input_dir "${loongson_dir}" mipsel-loongson + fi else . "${override_dir}"/modinfo.sh process_input_dir "${override_dir}" ${grub_modinfo_target_cpu}-${grub_modinfo_platform} @@ -265,6 +269,7 @@ else qemu_dir= mipsel_qemu_dir= mips_qemu_dir= + loongson_dir= case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in i386-multiboot) multiboot_dir="${override_dir}" ;; i386-coreboot) coreboot_dir="${override_dir}" ;; @@ -274,6 +279,7 @@ else x86_64-efi) efi64_dir="${override_dir}" ;; ia64-efi) ia64_dir="${override_dir}" ;; mipsel-qemu_mips) mipsel_qemu_dir="${override_dir}" ;; + mipsel-loongson) loongson_dir="${override_dir}" ;; mips-qemu_mips) mips_qemu_dir="${override_dir}" ;; esac fi @@ -333,6 +339,21 @@ make_image "${mipsel_qemu_dir}" mipsel-qemu_mips-elf "${iso9660_dir}/boot/mipsel if [ -e "${iso9660_dir}/boot/mipsel-qemu_mips.elf" ] && [ -d "${rom_directory}" ]; then cp "${iso9660_dir}/boot/mipsel-qemu_mips.elf" "${rom_directory}/mipsel-qemu_mips.elf" fi + +make_image "${loongson_dir}" mipsel-loongson-elf "${iso9660_dir}/boot/mipsel-loongson.elf" "pata -C xz" +if [ -e "${iso9660_dir}/boot/mipsel-loongson.elf" ] && [ -d "${rom_directory}" ]; then + cp "${iso9660_dir}/boot/mipsel-loongson.elf" "${rom_directory}/mipsel-loongson.elf" +fi +make_image "${loongson_dir}" mipsel-yeeloong-flash "${iso9660_dir}/boot/mipsel-yeeloong.bin" "pata -C xz" +if [ -e "${iso9660_dir}/boot/mipsel-yeeloong.bin" ] && [ -d "${rom_directory}" ]; then + cp "${iso9660_dir}/boot/mipsel-yeeloong.bin" "${rom_directory}/mipsel-yeeloong.bin" +fi + +make_image "${loongson_dir}" mipsel-fuloong2f-flash "${iso9660_dir}/boot/mipsel-fuloong2f.bin" "pata -C xz" +if [ -e "${iso9660_dir}/boot/mipsel-fulong.bin" ] && [ -d "${rom_directory}" ]; then + cp "${iso9660_dir}/boot/mipsel-fulong.bin" "${rom_directory}/mipsel-fulong.bin" +fi + make_image "${mips_qemu_dir}" mips-qemu_mips-elf "${iso9660_dir}/boot/mips-qemu_mips.elf" "pata" if [ -e "${iso9660_dir}/boot/mips-qemu_mips.elf" ] && [ -d "${rom_directory}" ]; then cp "${iso9660_dir}/boot/mips-qemu_mips.elf" "${rom_directory}/mips-qemu_mips.elf"