Blame SOURCES/0337-util-grub-mkrescue.in-Add-mips-arc-support.patch

f96e0b
From 4918af06ff0742df83ae70ce57e7fabc99761177 Mon Sep 17 00:00:00 2001
f96e0b
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
f96e0b
Date: Wed, 24 Apr 2013 14:02:58 +0200
f96e0b
Subject: [PATCH 337/482] 	* util/grub-mkrescue.in: Add mips-arc support.
f96e0b
f96e0b
---
f96e0b
 ChangeLog             |  4 ++++
f96e0b
 Makefile.util.def     | 13 +------------
f96e0b
 util/grub-mkrescue.in | 22 +++++++++++++++++++++-
f96e0b
 3 files changed, 26 insertions(+), 13 deletions(-)
f96e0b
f96e0b
diff --git a/ChangeLog b/ChangeLog
f96e0b
index 598d16c..c2d56f1 100644
f96e0b
--- a/ChangeLog
f96e0b
+++ b/ChangeLog
f96e0b
@@ -1,5 +1,9 @@
f96e0b
 2013-04-24  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
 
f96e0b
+	* util/grub-mkrescue.in: Add mips-arc support.
f96e0b
+
f96e0b
+2013-04-24  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
+
f96e0b
 	* grub-core/kern/dl.c (grub_dl_resolve_symbols): Handle malloc failure.
f96e0b
 
f96e0b
 2013-04-24  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
diff --git a/Makefile.util.def b/Makefile.util.def
f96e0b
index ed7b412..4fa37bc 100644
f96e0b
--- a/Makefile.util.def
f96e0b
+++ b/Makefile.util.def
f96e0b
@@ -464,18 +464,7 @@ script = {
f96e0b
   name = grub-mkrescue;
f96e0b
   common = util/grub-install_header;
f96e0b
   common = util/grub-mkrescue.in;
f96e0b
-  enable = i386_pc;
f96e0b
-  enable = i386_efi;
f96e0b
-  enable = x86_64_efi;
f96e0b
-  enable = i386_qemu;
f96e0b
-  enable = i386_multiboot;
f96e0b
-  enable = i386_coreboot;
f96e0b
-  enable = i386_ieee1275;
f96e0b
-  enable = mips_qemu_mips;
f96e0b
-  enable = mips_loongson;
f96e0b
-  enable = ia64_efi;
f96e0b
-  enable = powerpc_ieee1275;
f96e0b
-  enable = sparc64_ieee1275;
f96e0b
+  enable = noemu;
f96e0b
 };
f96e0b
 
f96e0b
 script = {
f96e0b
diff --git a/util/grub-mkrescue.in b/util/grub-mkrescue.in
f96e0b
index 5a5d4e3..634318b 100644
f96e0b
--- a/util/grub-mkrescue.in
f96e0b
+++ b/util/grub-mkrescue.in
f96e0b
@@ -45,6 +45,7 @@ efi32_dir="${libdir}/@PACKAGE@/i386-efi"
f96e0b
 efi64_dir="${libdir}/@PACKAGE@/x86_64-efi"
f96e0b
 ia64_dir="${libdir}/@PACKAGE@/ia64-efi"
f96e0b
 sparc64_dir="${libdir}/@PACKAGE@/sparc64-ieee1275"
f96e0b
+arcs_dir="${libdir}/@PACKAGE@/mips-arc"
f96e0b
 ppc_dir="${libdir}/@PACKAGE@/powerpc-ieee1275"
f96e0b
 rom_directory=
f96e0b
 override_dir=
f96e0b
@@ -91,7 +92,8 @@ usage () {
f96e0b
     print_option_help "--label-bgcolor=$(gettext "COLOR")" "$(gettext "use COLOR for label background")"
f96e0b
     print_option_help "--product-name=$(gettext "STR")" "$(gettext "use STR as product")"
f96e0b
     print_option_help "--product-version=$(gettext "STR")" "$(gettext "use STR as product version")"
f96e0b
-    print_option_help "--sparc-boot" "$(gettext "enable sparc boot. Disables HFS+, APM and boot as disk image for i386-pc")"
f96e0b
+    print_option_help "--sparc-boot" "$(gettext "enable sparc boot. Disables HFS+, APM, ARCS and boot as disk image for i386-pc")"
f96e0b
+    print_option_help "--arcs-boot" "$(gettext "enable ARCS (big-endian mips machines, mostly SGI) boot. Disables HFS+, APM, sparc64 and boot as disk image for i386-pc")"
f96e0b
     echo
f96e0b
     gettext_printf "%s generates a bootable rescue image with specified source files, source directories, or mkisofs options listed by the output of \`%s'\n" "xorriso -as mkisofs -help" "$self" | grub_fmt
f96e0b
     echo
f96e0b
@@ -154,6 +156,9 @@ do
f96e0b
     --sparc-boot)
f96e0b
         system_area=sparc64 ;;
f96e0b
 
f96e0b
+    --arcs-boot)
f96e0b
+        system_area=arcs ;;
f96e0b
+
f96e0b
     --product-name)
f96e0b
         product_name=`argument $option "$@"`; shift ;;
f96e0b
     --product-name=*)
f96e0b
@@ -273,6 +278,8 @@ if [ "${override_dir}" = "" ] ; then
f96e0b
 	    system_area=common;
f96e0b
 	elif test -e "${sparc64_dir}" ; then
f96e0b
 	    system_area=sparc64;
f96e0b
+	elif test -e "${arcs_dir}" ; then
f96e0b
+	    system_area=arcs;
f96e0b
 	fi
f96e0b
     fi
f96e0b
     if test -e "${multiboot_dir}" ; then
f96e0b
@@ -314,6 +321,9 @@ if [ "${override_dir}" = "" ] ; then
f96e0b
     if test -e "${sparc64_dir}" ; then
f96e0b
         process_input_dir "${sparc64_dir}" sparc64-ieee1275
f96e0b
     fi
f96e0b
+    if test -e "${arcs_dir}" ; then
f96e0b
+        process_input_dir "${arcs_dir}" mips-arc
f96e0b
+    fi
f96e0b
 else
f96e0b
     . "${override_dir}"/modinfo.sh
f96e0b
     process_input_dir "${override_dir}" ${grub_modinfo_target_cpu}-${grub_modinfo_platform}
f96e0b
@@ -330,6 +340,7 @@ else
f96e0b
     ppc_dir=
f96e0b
     i386_ieee1275_dir=
f96e0b
     sparc64_dir=
f96e0b
+    arcs_dir=
f96e0b
     case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
f96e0b
         i386-multiboot) multiboot_dir="${override_dir}" ;;
f96e0b
         i386-coreboot) coreboot_dir="${override_dir}" ;;
f96e0b
@@ -343,6 +354,7 @@ else
f96e0b
 	mips-qemu_mips) mips_qemu_dir="${override_dir}" ;;
f96e0b
 	powerpc-ieee1275) ppc_dir="${override_dir}"; system_area=common ;;
f96e0b
 	sparc64-ieee1275) sparc64_dir="${override_dir}"; system_area=sparc64 ;;
f96e0b
+	mips-arc) arcs_dir="${override_dir}"; system_area=arcs ;;
f96e0b
 	i386-ieee1275) i386_ieee1275_dir="${override_dir}" ;;
f96e0b
     esac
f96e0b
 fi
f96e0b
@@ -470,6 +482,14 @@ if [ -e "${iso9660_dir}"/boot/grub/sparc64-ieee1275/core.img ] && [ "$system_are
f96e0b
    grub_mkisofs_arguments="${grub_mkisofs_arguments} -G $sysarea_img -B , --grub2-sparc-core /boot/grub/sparc64-ieee1275/core.img"
f96e0b
 fi
f96e0b
 
f96e0b
+make_image "${arcs_dir}" mips-arc "${iso9660_dir}/boot/grub/mips-arc/core.img" ""
f96e0b
+if [ -e "${iso9660_dir}/boot/grub/mips-arc/core.img" ]; then
f96e0b
+   grub_mkisofs_arguments="${grub_mkisofs_arguments} /boot/grub/mips-arc/grub=${iso9660_dir}/boot/grub/mips-arc/core.img /boot/grub/mips-arc/sashARCS=${iso9660_dir}/boot/grub/mips-arc/core.img"
f96e0b
+fi
f96e0b
+if [ -e "${iso9660_dir}/boot/grub/mips-arc/core.img" ] && [ "$system_area" = arcs ]; then
f96e0b
+   grub_mkisofs_arguments="${grub_mkisofs_arguments} -mips-boot /boot/grub/mips-arc/sashARCS -mips-boot /boot/grub/mips-arc/grub"
f96e0b
+fi
f96e0b
+
f96e0b
 make_image "${mipsel_qemu_dir}" mipsel-qemu_mips-elf "${iso9660_dir}/boot/mipsel-qemu_mips.elf" "pata"
f96e0b
 if [ -e "${iso9660_dir}/boot/mipsel-qemu_mips.elf" ] && [ -d "${rom_directory}" ]; then
f96e0b
     cp "${iso9660_dir}/boot/mipsel-qemu_mips.elf" "${rom_directory}/mipsel-qemu_mips.elf"
f96e0b
-- 
f96e0b
1.8.2.1
f96e0b