nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

Blame SOURCES/0318-powerpc-Drop-Open-Hack-Ware.patch

b35c50
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
b35c50
From: Daniel Axtens <dja@axtens.net>
b35c50
Date: Mon, 6 Sep 2021 15:46:11 +1000
b35c50
Subject: [PATCH] powerpc: Drop Open Hack'Ware
b35c50
b35c50
Open Hack'Ware was an alternative firmware of powerpc under QEMU.
b35c50
b35c50
The last commit to any Open Hack'Ware repo I can find is from 2014 [1].
b35c50
b35c50
Open Hack'Ware was used for the QEMU "prep" machine type, which was
b35c50
deprecated in QEMU in commit 54c86f5a4844 (hw/ppc: deprecate the
b35c50
machine type 'prep', replaced by '40p') in QEMU v3.1, and had reportedly
b35c50
been broken for years before without anyone noticing. Support was removed
b35c50
in February 2020 by commit b2ce76a0730e (hw/ppc/prep: Remove the
b35c50
deprecated "prep" machine and the OpenHackware BIOS).
b35c50
b35c50
Open Hack'Ware's limitations require some messy code in GRUB. This
b35c50
complexity is not worth carrying any more.
b35c50
b35c50
Remove detection of Open Hack'Ware. We will clean up the feature flags
b35c50
in following commits.
b35c50
b35c50
[1]: https://github.com/qemu/openhackware and
b35c50
     https://repo.or.cz/w/openhackware.git are QEMU submodules. They have
b35c50
     only small changes on top of OHW v0.4.1, which was imported into
b35c50
     QEMU SCM in 2010. I can't find anything resembling an official repo
b35c50
     any more.
b35c50
b35c50
Signed-off-by: Daniel Axtens <dja@axtens.net>
b35c50
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
b35c50
(cherry picked from commit f9ce538eec88c5cffbfde021c4e8a95a5e9d0e8f)
b35c50
---
b35c50
 grub-core/kern/ieee1275/cmain.c | 16 ----------------
b35c50
 1 file changed, 16 deletions(-)
b35c50
b35c50
diff --git a/grub-core/kern/ieee1275/cmain.c b/grub-core/kern/ieee1275/cmain.c
b35c50
index dce7b84922..cb42f60ebe 100644
b35c50
--- a/grub-core/kern/ieee1275/cmain.c
b35c50
+++ b/grub-core/kern/ieee1275/cmain.c
b35c50
@@ -49,7 +49,6 @@ grub_ieee1275_find_options (void)
b35c50
   grub_ieee1275_phandle_t root;
b35c50
   grub_ieee1275_phandle_t options;
b35c50
   grub_ieee1275_phandle_t openprom;
b35c50
-  grub_ieee1275_phandle_t bootrom;
b35c50
   int rc;
b35c50
   grub_uint32_t realmode = 0;
b35c50
   char tmp[256];
b35c50
@@ -198,21 +197,6 @@ grub_ieee1275_find_options (void)
b35c50
 
b35c50
       grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_HAS_CURSORONOFF);
b35c50
     }
b35c50
-
b35c50
-  if (! grub_ieee1275_finddevice ("/rom/boot-rom", &bootrom)
b35c50
-      || ! grub_ieee1275_finddevice ("/boot-rom", &bootrom))
b35c50
-    {
b35c50
-      rc = grub_ieee1275_get_property (bootrom, "model", tmp, sizeof (tmp), 0);
b35c50
-      if (rc >= 0 && !grub_strncmp (tmp, "PPC Open Hack'Ware",
b35c50
-				    sizeof ("PPC Open Hack'Ware") - 1))
b35c50
-	{
b35c50
-	  grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_BROKEN_OUTPUT);
b35c50
-	  grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_CANNOT_SET_COLORS);
b35c50
-	  grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_CANNOT_INTERPRET);
b35c50
-	  grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_FORCE_CLAIM);
b35c50
-	  grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_NO_ANSI);
b35c50
-	}
b35c50
-    }
b35c50
 }
b35c50
 
b35c50
 void