nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

Blame SOURCES/0282-Merge-powerpc-grub-mkrescue-flavour-with-common.-Use.patch

f96e0b
From 575b44b648a5007217689a857f82129a56cabc7c Mon Sep 17 00:00:00 2001
f96e0b
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
f96e0b
Date: Thu, 11 Apr 2013 23:15:26 +0200
f96e0b
Subject: [PATCH 282/482] 	Merge powerpc grub-mkrescue flavour with
f96e0b
 common. Use xorriso HFS+ 	feature for it.
f96e0b
f96e0b
---
f96e0b
 ChangeLog                              |   5 +
f96e0b
 Makefile.util.def                      |  38 +++-
f96e0b
 configure.ac                           |   1 +
f96e0b
 docs/man/grub-render-label.h2m         |   3 +
f96e0b
 grub-core/Makefile.core.def            |   6 +
f96e0b
 grub-core/boot/powerpc/grub.chrp.in    | 172 +++++++++++++++
f96e0b
 grub-core/font/font.c                  |   6 +-
f96e0b
 grub-core/font/font_cmd.c              |   2 +-
f96e0b
 grub-core/video/video.c                |   8 +
f96e0b
 include/grub/font.h                    |   2 +-
f96e0b
 include/grub/video.h                   |   5 +
f96e0b
 util/grub-mkrescue.in                  |  80 +++++++
f96e0b
 util/grub-render-label.c               | 393 +++++++++++++++++++++++++++++++++
f96e0b
 util/powerpc/ieee1275/grub-mkrescue.in | 146 ------------
f96e0b
 14 files changed, 707 insertions(+), 160 deletions(-)
f96e0b
 create mode 100644 docs/man/grub-render-label.h2m
f96e0b
 create mode 100644 grub-core/boot/powerpc/grub.chrp.in
f96e0b
 create mode 100644 util/grub-render-label.c
f96e0b
 delete mode 100644 util/powerpc/ieee1275/grub-mkrescue.in
f96e0b
f96e0b
diff --git a/ChangeLog b/ChangeLog
f96e0b
index 70f0074..0d62509 100644
f96e0b
--- a/ChangeLog
f96e0b
+++ b/ChangeLog
f96e0b
@@ -1,5 +1,10 @@
f96e0b
 2013-04-11  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
 
f96e0b
+	Merge powerpc grub-mkrescue flavour with common. Use xorriso HFS+
f96e0b
+	feature for it.
f96e0b
+
f96e0b
+2013-04-11  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
+
f96e0b
 	* docs/grub.texi: Fix description of GRUB_CMDLINE_XEN and
f96e0b
 	GRUB_CMDLINE_XEN_DEFAULT.
f96e0b
 	Reported by: 	Marc Warne (GigaTux) <gigatux>
f96e0b
diff --git a/Makefile.util.def b/Makefile.util.def
f96e0b
index 513dc38..bd286fc 100644
f96e0b
--- a/Makefile.util.def
f96e0b
+++ b/Makefile.util.def
f96e0b
@@ -59,6 +59,17 @@ library = {
f96e0b
   common = grub-core/disk/mdraid1x_linux.c;
f96e0b
   common = grub-core/disk/raid5_recover.c;
f96e0b
   common = grub-core/disk/raid6_recover.c;
f96e0b
+  common = grub-core/font/font.c;
f96e0b
+  common = grub-core/gfxmenu/font.c;
f96e0b
+  common = grub-core/normal/charset.c;
f96e0b
+  common = grub-core/video/fb/fbblit.c;
f96e0b
+  common = grub-core/video/fb/fbutil.c;
f96e0b
+  common = grub-core/video/fb/fbfill.c;
f96e0b
+  common = grub-core/video/fb/video_fb.c;
f96e0b
+  common = grub-core/video/video.c;
f96e0b
+  common = grub-core/video/colors.c;
f96e0b
+  common = grub-core/unidata.c;
f96e0b
+  common = grub-core/io/bufio.c;
f96e0b
   common = grub-core/fs/affs.c;
f96e0b
   common = grub-core/fs/afs.c;
f96e0b
   common = grub-core/fs/bfs.c;
f96e0b
@@ -451,15 +462,8 @@ script = {
f96e0b
 script = {
f96e0b
   mansection = 1;
f96e0b
   name = grub-mkrescue;
f96e0b
-  x86 = util/grub-install_header;
f96e0b
-  x86 = util/grub-mkrescue.in;
f96e0b
-  mips_qemu_mips = util/grub-install_header;
f96e0b
-  mips_qemu_mips = util/grub-mkrescue.in;
f96e0b
-  mips_loongson = util/grub-install_header;
f96e0b
-  mips_loongson = util/grub-mkrescue.in;
f96e0b
-  ia64_efi = util/grub-install_header;
f96e0b
-  ia64_efi = util/grub-mkrescue.in;
f96e0b
-  powerpc_ieee1275 = util/powerpc/ieee1275/grub-mkrescue.in;
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
@@ -763,3 +767,19 @@ program = {
f96e0b
   ldadd = grub-core/gnulib/libgnu.a;
f96e0b
   ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
f96e0b
 };
f96e0b
+
f96e0b
+program = {
f96e0b
+  name = grub-render-label;
f96e0b
+  mansection = 1;
f96e0b
+
f96e0b
+  common = util/grub-render-label.c;
f96e0b
+  common = grub-core/kern/emu/argp_common.c;
f96e0b
+  common = grub-core/kern/emu/hostfs.c;
f96e0b
+  common = grub-core/disk/host.c;
f96e0b
+
f96e0b
+  ldadd = libgrubmods.a;
f96e0b
+  ldadd = libgrubgcry.a;
f96e0b
+  ldadd = libgrubkern.a;
f96e0b
+  ldadd = grub-core/gnulib/libgnu.a;
f96e0b
+  ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
f96e0b
+};
f96e0b
diff --git a/configure.ac b/configure.ac
f96e0b
index a39a025..19febfd 100644
f96e0b
--- a/configure.ac
f96e0b
+++ b/configure.ac
f96e0b
@@ -65,6 +65,7 @@ grub_TRANSFORM([grub-reboot])
f96e0b
 grub_TRANSFORM([grub-script-check])
f96e0b
 grub_TRANSFORM([grub-set-default])
f96e0b
 grub_TRANSFORM([grub-sparc64-setup])
f96e0b
+grub_TRANSFORM([grub-render-label])
f96e0b
 
f96e0b
 # Optimization flag.  Allow user to override.
f96e0b
 if test "x$TARGET_CFLAGS" = x; then
f96e0b
diff --git a/docs/man/grub-render-label.h2m b/docs/man/grub-render-label.h2m
f96e0b
new file mode 100644
f96e0b
index 0000000..50ae524
f96e0b
--- /dev/null
f96e0b
+++ b/docs/man/grub-render-label.h2m
f96e0b
@@ -0,0 +1,3 @@
f96e0b
+[NAME]
f96e0b
+grub-render-label \- generate a .disk_label for Apple Macs.
f96e0b
+
f96e0b
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
f96e0b
index 4c8e947..6aead4c 100644
f96e0b
--- a/grub-core/Makefile.core.def
f96e0b
+++ b/grub-core/Makefile.core.def
f96e0b
@@ -30,6 +30,12 @@ script = {
f96e0b
   common = gdb_grub.in;
f96e0b
 };
f96e0b
 
f96e0b
+script = {
f96e0b
+  installdir = platform;
f96e0b
+  name = grub.chrp;
f96e0b
+  common = boot/powerpc/grub.chrp.in;
f96e0b
+};
f96e0b
+
f96e0b
 kernel = {
f96e0b
   name = kernel;
f96e0b
 
f96e0b
diff --git a/grub-core/boot/powerpc/grub.chrp.in b/grub-core/boot/powerpc/grub.chrp.in
f96e0b
new file mode 100644
f96e0b
index 0000000..9b22183
f96e0b
--- /dev/null
f96e0b
+++ b/grub-core/boot/powerpc/grub.chrp.in
f96e0b
@@ -0,0 +1,172 @@
f96e0b
+<CHRP-BOOT>
f96e0b
+<COMPATIBLE>
f96e0b
+MacRISC MacRISC3 MacRISC4
f96e0b
+</COMPATIBLE>
f96e0b
+<DESCRIPTION>
f96e0b
+@PACKAGE@ @VERSION@
f96e0b
+</DESCRIPTION>
f96e0b
+<OS-BADGE-ICONS>
f96e0b
+3434
f96e0b
+00000000000000F781FB8181818181FBFAF500000000000000000000000000000000000000F6FAFAFAFA81F9F600000000000000
f96e0b
+0000000000F8FBF9F500F95656FCFB5656FBF800000000000000000000000000000000F5FAF9F5F7F600F6F6F9FAF70000000000
f96e0b
+000000F5FBFA0056FDFEFEFDFDFAAC81FB56568181560000000000000000000000F9F9F9F7FCFDFEFEFEFFFC81F656FA00000000
f96e0b
+0000F5AC2BF7FBFEFEFD2BF6568181F9F7F6F6F8FBF50000000000000000000000FAF700F600F5F7F7F6F7FEFFACF82BFB000000
f96e0b
+0000FC2BF5FEFFFFF5F7FC81F70000F7F9FAFAF8000000000000000000000000000056F9F9FAF9F7F7FA812BF7FFFF56F7FA0000
f96e0b
+005656F5FEFFAC2BF9FA000000000000000000000000000000000000000000000000000000000000000000FA56FAFEFEF8F9F700
f96e0b
+00FB00F7FFFF56F9F800000000000000000000F656FAFA56F50000000000F5F8F9F8F5000000000000000000F9F7FCFFFB00FB00
f96e0b
+F8F800ACFFACF6FA000000000000000000F6FA562BF5F5F781FA000000F9FA2B00F556F9F5000000000000000081F8FFFEF6562B
f96e0b
+810000FFFFF9FAF500000000000000002B8100F5F9FCACFBF82BFBF6FCFAF6FAFC81F600FA2B000000000000002BF8FEFFF8F5FA
f96e0b
+FA00F5FEFFFA8100000000000000002B8100F9FEFFFFFFFFFFFBF6FDFEACFDFEFFFFFFFBF581F600000000000000F9FEFFF700FA
f96e0b
+FA00FBFFFEF6F900000000000000F6FB00FCFFFFFFFFFFFFFFFFFCF600FCF7ACFEFFFFFFFDF6810000000000000056F9FFAC00FA
f96e0b
+FA00F6FFFFF856000000000000F5FBF5ACFFFFFFFFFFFFFFFFFFFF2B002BF8F5ACFFFFFFFFFDF6FA000000000000F9FCFF560081
f96e0b
+FA0081FFFFF8F9000000000000FBF6FBFFFFFFFFFFFFFFFFFFFFFFF800F55600FCFFFFFFFFFF81F8F80000000000F981FFAC0081
f96e0b
+FA0000FEFEF8FB0000000000812BFAFFFFFFFFFFFFFEFFFFFDF92BFA0000F6F981ACFEFFFFFFFF56F9F600000000F9FDFF2B0081
f96e0b
+FA00FAFFFF81812B000000FAF8F9FFFFFEACFBF80000F500000000F9F900562B0000FCF7F9ACFFFF2BF9F50000F9F6FEFFFB0081
f96e0b
+810000FCFFFBF6FB56F7FBF8F9FFFE5600000000F5FAAC000000F82BF6FAFBF800F556F80000F9FFFE2BFAFAFAF8FAFFFEF60081
f96e0b
+FAF6F5ACFFFFAC00F856F7ACFFFCF500000000FAFCFFFC00000056AC00F581F92BFEF9FAF6000081FFFFFBF6F62BFFFFACF6F6FA
f96e0b
+F6FA00FAFFFFFFACFA56FFFFAC0000000000F6FD2BFEF6F5565600F5F800F60081FEF7F656000000FDFFFFFDFDFFFFFFAC0081F5
f96e0b
+0081F52BFDFFFFFFFFFFFFFFF60000000000FBF6F6F5F656F52BF900FA000000FCFAF5F656000000F7FFFFFFFFFFFFFDF7F68100
f96e0b
+00F6FB00F8FDFFFFFFFFFF810000000000F6F5000000F52B56F9FC00F7F70000FCF881FCF500000000FEFFFFFFFFAC5600FBF500
f96e0b
+000056F900F8ACFDFFFFFFF5000000000000002B0000FDFEFFFE560000F60000F9ACFFFE810000000081FFFEFDFAF800FAF70000
f96e0b
+000000FAF9002B56FAFDFC0000000000000000F80000FBF5FEFEF5000000000000ACFFFA2B0000000000FEFB2BF5008156000000
f96e0b
+00000000F9FBF600F6FBF800000000000000F7F8000000F9F9F9F82B0000000000F6ACACF70000000000F7FD2BFA812B00000000
f96e0b
+0000000000F681FCFBFD0000000000000000FBF6000000000000F52B000000000000F92B810000000000008181F6000000000000
f96e0b
+0000000000000000F6FC00000000000000F6FF0000000000000000000000000000000081FBFB2B00000000F7F900000000000000
f96e0b
+000000000000000000FC00000000000000FCFAF600000000000000000000000000000056ACF581FBF700000081FB000000000000
f96e0b
+0000000000000000FAF90000000000008156F5F8000000000000002BFBFCFBF800000000FD2B000056FB8181FBF8000000000000
f96e0b
+0000000000000000AC0000000000F5FBF90000F6000000000000F5AC56F6005681F50000F6ACFCFBF70000000000000000000000
f96e0b
+00000000000000F881000000F5FAFDFD00000000000000000000F7FEFA2B0000F581F70000000000810000000000000000000000
f96e0b
+000000000000F9FCF500FAFDACFAF5FD00000000000000000000F5ACF5FDFEFA0000F82B00000000810000000000000000000000
f96e0b
+000000000000FCF8F9AC81FD000000FD000000000000FAF7000000F50081F9FAF800000000000000FB0000000000000000000000
f96e0b
+000000000000FC81F956F5FD000000FD0000000000000000F800F5000000000056000000000000F7FB0000000000000000000000
f96e0b
+00000000000000000000F5AC000000ACF800000000000000F5FAF80000000000F50000000000F8ACF50000000000000000000000
f96e0b
+00000000000000000000F5AC000000F5AC000000000000000056F9000000000000000000F7ACFCF5000000000000000000000000
f96e0b
+00000000000000000000F5FD00000000AC000000000000000000FB0000000000000000F5F6F5FCF6000000000000000000000000
f96e0b
+0000000000000000000000FD00000000FBFDF600000000000000F8F900000000000000000000F5FB000000000000000000000000
f96e0b
+0000000000000000000000FDF500000000F9ACF800000000000000815600000000F656818181AC56000000000000000000000000
f96e0b
+000000000000000000000081F80000000000F9FC0000000000000000F9ACACACFCFBFAFA81FD2B00000000000000000000000000
f96e0b
+0000000000000000000000F7FB0000000000FBF70000000000000000000000000000000000FB0000000000000000000000000000
f96e0b
+000000000000000000000000ACF500000000F9FD56F5000000000000000000000000000000FB0000000000000000000000000000
f96e0b
+000000000000000000000000F8FA0000000000F6FEFEF5000000000000F55681FCACFDACFC560000000000000000000000000000
f96e0b
+00000000000000000000000000FBF600000000002BFCFA00F700000000F9FDFDFAFEF90000000000000000000000000000000000
f96e0b
+00000000000000000000000000F5FB0000000000F5FEF7ACAC0000000000000000FCF50000000000000000000000000000000000
f96e0b
+0000000000000000000000000000F6FA000000002BFF2BFFFFAC00000000000000F7FA0000000000000000000000000000000000
f96e0b
+000000000000000000000000000000F65600000000FAFEFFFFAC0000000000F800F6810000000000000000000000000000000000
f96e0b
+00000000000000000000000000000000F52B00000000F8FEFBFF5600000000FCFAACF60000000000000000000000000000000000
f96e0b
+0000000000000000000000000000000000000000000000F9FCFCFFFB00F8FEFFFDF5000000000000000000000000000000000000
f96e0b
+00000000000000000000000000000000000000000000F9FDF7F5FFFD56FFFFFFFD00000000000000000000000000000000000000
f96e0b
+00000000000000000000000000000000000000000000810000FBFFFFFBFFFFFFFFACF9F5F5000000000000000000000000000000
f96e0b
+0000000000000000000000000000000000000000000000F600FC81FFFEFFFFFFFFFFFE8100000000000000000000000000000000
f96e0b
+00000000000000000000000000000000000000000000000000F7F6FDFFFFFFFEFFFFACF500000000000000000000000000000000
f96e0b
+000000000000000000000000000000000000000000000000000000F5FC81FC81FAFBF9F500000000000000000000000000000000
f96e0b
+
f96e0b
+00000000000000F781FB8181818181FBFAF500000000000000000000000000000000000000F6FAFAFAFA81F9F600000000000000
f96e0b
+0000000000F8FBF9F500F95656FCFB5656FBF800000000000000000000000000000000F5FAF9F5F7F600F6F6F9FAF70000000000
f96e0b
+000000F5FBFA0056FDFEFEFDFDFAAC81FB56568181560000000000000000000000F9F9F9F7FCFDFEFEFEFFFC81F656FA00000000
f96e0b
+0000F5AC2BF7FBFEFEFD2BF6568181F9F7F6F6F8FBF50000000000000000000000FAF700F600F5F7F7F6F7FEFFACF82BFB000000
f96e0b
+0000FC2BF5FEFFFFF5F7FC81F70000F7F9FAFAF8000000000000000000000000000056F9F9FAF9F7F7FA812BF7FFFF56F7FA0000
f96e0b
+005656F5FEFFAC2BF9FA000000000000000000000000000000000000000000000000000000000000000000FA56FAFEFEF8F9F700
f96e0b
+00FB00F7FFFF56F9F800000000000000000000F656FAFA56F50000000000F5F8F9F8F5000000000000000000F9F7FCFFFB00FB00
f96e0b
+F8F800ACFFACF6FA000000000000000000F6FA562BF5F5F781FA000000F9FA2B00F556F9F5000000000000000081F8FFFEF6562B
f96e0b
+810000FFFFF9FAF500000000000000002B8100F5F9FCACFBF82BFBF6FCFAF6FAFC81F600FA2B000000000000002BF8FEFFF8F5FA
f96e0b
+FA00F5FEFFFA8100000000000000002B8100F9FEFFFFFFFFFFFBF6FDFEACFDFEFFFFFFFBF581F600000000000000F9FEFFF700FA
f96e0b
+FA00FBFFFEF6F900000000000000F6FB00FCFFFFFFFFFFFFFFFFFCF600FCF7ACFEFFFFFFFDF6810000000000000056F9FFAC00FA
f96e0b
+FA00F6FFFFF856000000000000F5FBF5ACFFFFFFFFFFFFFFFFFFFF2B002BF8F5ACFFFFFFFFFDF6FA000000000000F9FCFF560081
f96e0b
+FA0081FFFFF8F9000000000000FBF6FBFFFFFFFFFFFFFFFFFFFFFFF800F55600FCFFFFFFFFFF81F8F80000000000F981FFAC0081
f96e0b
+FA0000FEFEF8FB0000000000812BFAFFFFFFFFFFFFFEFFFFFDF92BFA0000F6F981ACFEFFFFFFFF56F9F600000000F9FDFF2B0081
f96e0b
+FA00FAFFFF81812B000000FAF8F9FFFFFEACFBF80000F500000000F9F900562B0000FCF7F9ACFFFF2BF9F50000F9F6FEFFFB0081
f96e0b
+810000FCFFFBF6FB56F7FBF8F9FFFE5600000000F5FAAC000000F82BF6FAFBF800F556F80000F9FFFE2BFAFAFAF8FAFFFEF60081
f96e0b
+FAF6F5ACFFFFAC00F856F7ACFFFCF500000000FAFCFFFC00000056AC00F581F92BFEF9FAF6000081FFFFFBF6F62BFFFFACF6F6FA
f96e0b
+F6FA00FAFFFFFFACFA56FFFFAC0000000000F6FD2BFEF6F5565600F5F800F60081FEF7F656000000FDFFFFFDFDFFFFFFAC0081F5
f96e0b
+0081F52BFDFFFFFFFFFFFFFFF60000000000FBF6F6F5F656F52BF900FA000000FCFAF5F656000000F7FFFFFFFFFFFFFDF7F68100
f96e0b
+00F6FB00F8FDFFFFFFFFFF810000000000F6F5000000F52B56F9FC00F7F70000FCF881FCF500000000FEFFFFFFFFAC5600FBF500
f96e0b
+000056F900F8ACFDFFFFFFF5000000000000002B0000FDFEFFFE560000F60000F9ACFFFE810000000081FFFEFDFAF800FAF70000
f96e0b
+000000FAF9002B56FAFDFC0000000000000000F80000FBF5FEFEF5000000000000ACFFFA2B0000000000FEFB2BF5008156000000
f96e0b
+00000000F9FBF600F6FBF800000000000000F7F8000000F9F9F9F82B0000000000F6ACACF70000000000F7FD2BFA812B00000000
f96e0b
+0000000000F681FCFBFD0000000000000000FBF6000000000000F52B000000000000F92B810000000000008181F6000000000000
f96e0b
+0000000000000000F6FC00000000000000F6FF0000000000000000000000000000000081FBFB2B00000000F7F900000000000000
f96e0b
+000000000000000000FC00000000000000FCFAF600000000000000000000000000000056ACF581FBF700000081FB000000000000
f96e0b
+0000000000000000FAF90000000000008156F5F8000000000000002BFBFCFBF800000000FD2B000056FB8181FBF8000000000000
f96e0b
+0000000000000000AC0000000000F5FBF90000F6000000000000F5AC56F6005681F50000F6ACFCFBF70000000000000000000000
f96e0b
+00000000000000F881000000F5FAFDFD00000000000000000000F7FEFA2B0000F581F70000000000810000000000000000000000
f96e0b
+000000000000F9FCF500FAFDACFAF5FD00000000000000000000F5ACF5FDFEFA0000F82B00000000810000000000000000000000
f96e0b
+000000000000FCF8F9AC81FD000000FD000000000000FAF7000000F50081F9FAF800000000000000FB0000000000000000000000
f96e0b
+000000000000FC81F956F5FD000000FD0000000000000000F800F5000000000056000000000000F7FB0000000000000000000000
f96e0b
+00000000000000000000F5AC000000ACF800000000000000F5FAF80000000000F50000000000F8ACF50000000000000000000000
f96e0b
+00000000000000000000F5AC000000F5AC000000000000000056F9000000000000000000F7ACFCF5000000000000000000000000
f96e0b
+00000000000000000000F5FD00000000AC000000000000000000FB0000000000000000F5F6F5FCF6000000000000000000000000
f96e0b
+0000000000000000000000FD00000000FBFDF600000000000000F8F900000000000000000000F5FB000000000000000000000000
f96e0b
+0000000000000000000000FDF500000000F9ACF800000000000000815600000000F656818181AC56000000000000000000000000
f96e0b
+000000000000000000000081F80000000000F9FC0000000000000000F9ACACACFCFBFAFA81FD2B00000000000000000000000000
f96e0b
+0000000000000000000000F7FB0000000000FBF70000000000000000000000000000000000FB0000000000000000000000000000
f96e0b
+000000000000000000000000ACF500000000F9FD56F5000000000000000000000000000000FB0000000000000000000000000000
f96e0b
+000000000000000000000000F8FA0000000000F6FEFEF5000000000000F55681FCACFDACFC560000000000000000000000000000
f96e0b
+00000000000000000000000000FBF600000000002BFCFA00F700000000F9FDFDFAFEF90000000000000000000000000000000000
f96e0b
+00000000000000000000000000F5FB0000000000F5FEF7ACAC0000000000000000FCF50000000000000000000000000000000000
f96e0b
+0000000000000000000000000000F6FA000000002BFF2BFFFFAC00000000000000F7FA0000000000000000000000000000000000
f96e0b
+000000000000000000000000000000F65600000000FAFEFFFFAC0000000000F800F6810000000000000000000000000000000000
f96e0b
+00000000000000000000000000000000F52B00000000F8FEFBFF5600000000FCFAACF60000000000000000000000000000000000
f96e0b
+0000000000000000000000000000000000000000000000F9FCFCFFFB00F8FEFFFDF5000000000000000000000000000000000000
f96e0b
+00000000000000000000000000000000000000000000F9FDF7F5FFFD56FFFFFFFD00000000000000000000000000000000000000
f96e0b
+00000000000000000000000000000000000000000000810000FBFFFFFBFFFFFFFFACF9F5F5000000000000000000000000000000
f96e0b
+0000000000000000000000000000000000000000000000F600FC81FFFEFFFFFFFFFFFE8100000000000000000000000000000000
f96e0b
+00000000000000000000000000000000000000000000000000F7F6FDFFFFFFFEFFFFACF500000000000000000000000000000000
f96e0b
+000000000000000000000000000000000000000000000000000000F5FC81FC81FAFBF9F500000000000000000000000000000000
f96e0b
+
f96e0b
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
f96e0b
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
f96e0b
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
f96e0b
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
f96e0b
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
f96e0b
+FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF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FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
f96e0b
+</OS-BADGE-ICONS>
f96e0b
+<BOOT-SCRIPT>
f96e0b
+boot &device;:&partition;,\System\Library\CoreServices\grub.elf
f96e0b
+</BOOT-SCRIPT>
f96e0b
+</CHRP-BOOT>
f96e0b
diff --git a/grub-core/font/font.c b/grub-core/font/font.c
f96e0b
index 6b54a84..fbbb988 100644
f96e0b
--- a/grub-core/font/font.c
f96e0b
+++ b/grub-core/font/font.c
f96e0b
@@ -422,7 +422,7 @@ read_section_as_short (struct font_file_section *section,
f96e0b
 
f96e0b
 /* Load a font and add it to the beginning of the global font list.
f96e0b
    Returns 0 upon success, nonzero upon failure.  */
f96e0b
-int
f96e0b
+grub_font_t
f96e0b
 grub_font_load (const char *filename)
f96e0b
 {
f96e0b
   grub_file_t file = 0;
f96e0b
@@ -657,7 +657,7 @@ grub_font_load (const char *filename)
f96e0b
   if (register_font (font) != 0)
f96e0b
     goto fail;
f96e0b
 
f96e0b
-  return 0;
f96e0b
+  return font;
f96e0b
 
f96e0b
 fail:
f96e0b
   if (file)
f96e0b
@@ -666,7 +666,7 @@ fail:
f96e0b
     font->file = 0;
f96e0b
 
f96e0b
   free_font (font);
f96e0b
-  return 1;
f96e0b
+  return 0;
f96e0b
 }
f96e0b
 
f96e0b
 /* Read a 16-bit big-endian integer from FILE, convert it to native byte
f96e0b
diff --git a/grub-core/font/font_cmd.c b/grub-core/font/font_cmd.c
f96e0b
index 90f605d..1d9ddea 100644
f96e0b
--- a/grub-core/font/font_cmd.c
f96e0b
+++ b/grub-core/font/font_cmd.c
f96e0b
@@ -32,7 +32,7 @@ loadfont_command (grub_command_t cmd __attribute__ ((unused)),
f96e0b
     return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
f96e0b
 
f96e0b
   while (argc--)
f96e0b
-    if (grub_font_load (*args++) != 0)
f96e0b
+    if (grub_font_load (*args++) == 0)
f96e0b
       {
f96e0b
 	if (!grub_errno)
f96e0b
 	  return grub_error (GRUB_ERR_BAD_FONT, "invalid font");
f96e0b
diff --git a/grub-core/video/video.c b/grub-core/video/video.c
f96e0b
index c36994f..aab9b18 100644
f96e0b
--- a/grub-core/video/video.c
f96e0b
+++ b/grub-core/video/video.c
f96e0b
@@ -711,3 +711,11 @@ grub_video_set_mode (const char *modestring,
f96e0b
   return grub_error (GRUB_ERR_BAD_ARGUMENT,
f96e0b
 		     N_("no suitable video mode found"));
f96e0b
 }
f96e0b
+
f96e0b
+#ifdef GRUB_UTIL
f96e0b
+void
f96e0b
+grub_video_set_adapter (grub_video_adapter_t adapter)
f96e0b
+{
f96e0b
+  grub_video_adapter_active = adapter;
f96e0b
+}
f96e0b
+#endif
f96e0b
diff --git a/include/grub/font.h b/include/grub/font.h
f96e0b
index 690363f..975432e 100644
f96e0b
--- a/include/grub/font.h
f96e0b
+++ b/include/grub/font.h
f96e0b
@@ -81,7 +81,7 @@ void grub_font_loader_init (void);
f96e0b
 
f96e0b
 /* Load a font and add it to the beginning of the global font list.
f96e0b
    Returns: 0 upon success; nonzero upon failure.  */
f96e0b
-int grub_font_load (const char *filename);
f96e0b
+grub_font_t grub_font_load (const char *filename);
f96e0b
 
f96e0b
 /* Get the font that has the specified name.  Font names are in the form
f96e0b
    "Family Name Bold Italic 14", where Bold and Italic are optional.
f96e0b
diff --git a/include/grub/video.h b/include/grub/video.h
f96e0b
index 9fe4783..40a7711 100644
f96e0b
--- a/include/grub/video.h
f96e0b
+++ b/include/grub/video.h
f96e0b
@@ -542,4 +542,9 @@ extern void grub_video_sis315pro_fini (void);
f96e0b
 extern void grub_video_radeon_fuloong2e_fini (void);
f96e0b
 #endif
f96e0b
 
f96e0b
+#ifdef GRUB_UTIL
f96e0b
+void
f96e0b
+grub_video_set_adapter (grub_video_adapter_t adapter);
f96e0b
+#endif
f96e0b
+
f96e0b
 #endif /* ! GRUB_VIDEO_HEADER */
f96e0b
diff --git a/util/grub-mkrescue.in b/util/grub-mkrescue.in
f96e0b
index c57a0d9..a6e4de6 100644
f96e0b
--- a/util/grub-mkrescue.in
f96e0b
+++ b/util/grub-mkrescue.in
f96e0b
@@ -43,9 +43,16 @@ pc_dir="${libdir}/@PACKAGE@/i386-pc"
f96e0b
 efi32_dir="${libdir}/@PACKAGE@/i386-efi"
f96e0b
 efi64_dir="${libdir}/@PACKAGE@/x86_64-efi"
f96e0b
 ia64_dir="${libdir}/@PACKAGE@/ia64-efi"
f96e0b
+ppc_dir="${libdir}/@PACKAGE@/powerpc-ieee1275"
f96e0b
 rom_directory=
f96e0b
 override_dir=
f96e0b
 grub_mkimage="${bindir}/@grub_mkimage@"
f96e0b
+grub_render_label="${bindir}/@grub_render_label@"
f96e0b
+label_font="${pkgdatadir}/unicode.pf2"
f96e0b
+label_color="black"
f96e0b
+label_bgcolor="white"
f96e0b
+product_name="${PACKAGE_NAME}"
f96e0b
+product_version="${PACKAGE_VERSION}"
f96e0b
 
f96e0b
 xorriso=xorriso
f96e0b
 
f96e0b
@@ -74,6 +81,12 @@ usage () {
f96e0b
     # TRANSLATORS: xorriso is a program for creating ISOs and burning CDs
f96e0b
     print_option_help "--xorriso=$filetrans" "$(gettext "use FILE as xorriso [optional]")"
f96e0b
     print_option_help "--grub-mkimage=$filetrans" "$(gettext "use FILE as grub-mkimage")"
f96e0b
+    print_option_help "--grub-render-label=$filetrans" "$(gettext "use FILE as grub-render-label")"
f96e0b
+    print_option_help "--label-font=$filetrans" "$(gettext "use FILE as font for label")"
f96e0b
+    print_option_help "--label-color=$(gettext "COLOR")" "$(gettext "use COLOR for label")"
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
     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
@@ -131,11 +144,41 @@ do
f96e0b
 	export PATH
f96e0b
 	;;
f96e0b
 
f96e0b
+    --product-name)
f96e0b
+        product_name=`argument $option "$@"`; shift ;;
f96e0b
+    --product-name=*)
f96e0b
+	product_name=`echo "$option" | sed 's/--product-name=//'` ;;
f96e0b
+
f96e0b
+    --product-version)
f96e0b
+        product_version=`argument $option "$@"`; shift ;;
f96e0b
+    --product-version=*)
f96e0b
+	product_version=`echo "$option" | sed 's/--product-version=//'` ;;
f96e0b
+
f96e0b
     --grub-mkimage)
f96e0b
 	grub_mkimage=`argument $option "$@"`; shift ;;
f96e0b
     --grub-mkimage=*)
f96e0b
 	grub_mkimage=`echo "$option" | sed 's/--grub-mkimage=//'` ;;
f96e0b
 
f96e0b
+    --grub-render-label)
f96e0b
+	grub_render_label=`argument $option "$@"`; shift ;;
f96e0b
+    --grub-render-label=*)
f96e0b
+	grub_render_label=`echo "$option" | sed 's/--grub-render-label=//'` ;;
f96e0b
+
f96e0b
+    --label-font)
f96e0b
+	label_font=`argument $option "$@"`; shift ;;
f96e0b
+    --label-font=*)
f96e0b
+	label_font=`echo "$option" | sed 's/--label-font=//'` ;;
f96e0b
+
f96e0b
+    --label-color)
f96e0b
+	label_color=`argument $option "$@"`; shift ;;
f96e0b
+    --label-color=*)
f96e0b
+	label_color=`echo "$option" | sed 's/--label-color=//'` ;;
f96e0b
+
f96e0b
+    --label-bgcolor)
f96e0b
+	label_bgcolor=`argument $option "$@"`; shift ;;
f96e0b
+    --label-bgcolor=*)
f96e0b
+	label_bgcolor=`echo "$option" | sed 's/--label-bgcolor=//'` ;;
f96e0b
+
f96e0b
     --xorriso)
f96e0b
 	xorriso=`argument $option "$@"`; shift ;;
f96e0b
     --xorriso=*)
f96e0b
@@ -231,6 +274,9 @@ if [ "${override_dir}" = "" ] ; then
f96e0b
     if test -e "${loongson_dir}" ; then
f96e0b
         process_input_dir "${loongson_dir}" mipsel-loongson
f96e0b
     fi
f96e0b
+    if test -e "${ppc_dir}" ; then
f96e0b
+        process_input_dir "${ppc_dir}" mipsel-loongson
f96e0b
+    fi
f96e0b
 else
f96e0b
     . "${override_dir}"/modinfo.sh
f96e0b
     process_input_dir "${override_dir}" ${grub_modinfo_target_cpu}-${grub_modinfo_platform}
f96e0b
@@ -244,6 +290,7 @@ else
f96e0b
     mipsel_qemu_dir=
f96e0b
     mips_qemu_dir=
f96e0b
     loongson_dir=
f96e0b
+    ppc_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
@@ -255,6 +302,7 @@ else
f96e0b
 	mipsel-qemu_mips) mipsel_qemu_dir="${override_dir}" ;;
f96e0b
 	mipsel-loongson) loongson_dir="${override_dir}" ;;
f96e0b
 	mips-qemu_mips) mips_qemu_dir="${override_dir}" ;;
f96e0b
+	powerpc-ieee1275) ppc_dir="${override_dir}" ;;
f96e0b
     esac
f96e0b
 fi
f96e0b
 
f96e0b
@@ -309,6 +357,38 @@ if test -e "${efi64_dir}" || test -e "${efi32_dir}" || test -e "${ia64_dir}"; th
f96e0b
     grub_mkisofs_arguments="${grub_mkisofs_arguments} --efi-boot efi.img"
f96e0b
 fi
f96e0b
 
f96e0b
+make_image "${ppc_dir}" powerpc-ieee1275 "${iso9660_dir}/boot/powerpc.elf" ""
f96e0b
+if [ -e "${iso9660_dir}"/System/Library/CoreServices/boot.efi ] || [ -e "${iso9660_dir}/boot/powerpc.elf" ]; then
f96e0b
+    mkdir -p "${iso9660_dir}"/System/Library/CoreServices
f96e0b
+    touch "${iso9660_dir}/mach_kernel"
f96e0b
+    cat > "${iso9660_dir}/System/Library/CoreServices/SystemVersion.plist" <
f96e0b
+<plist version="1.0">
f96e0b
+<dict>
f96e0b
+        <key>ProductBuildVersion</key>
f96e0b
+        <string></string>
f96e0b
+        <key>ProductName</key>
f96e0b
+        <string>${product_name}</string>
f96e0b
+        <key>ProductVersion</key>
f96e0b
+        <string>${product_version}</string>
f96e0b
+</dict>
f96e0b
+</plist>
f96e0b
+EOF
f96e0b
+    "$grub_render_label" -f "$label_font" -b "$label_bgcolor" -c "$label_color" -t "${product_name} ${product_version}" -o "${iso9660_dir}/System/Library/CoreServices/.disk_label"
f96e0b
+    echo "${product_name} ${product_version}" > "${iso9660_dir}/System/Library/CoreServices/.disk_label.contentDetails"
f96e0b
+    grub_mkisofs_arguments="${grub_mkisofs_arguments} -hfsplus -hfsplus-file-creator-type chrp tbxj /System/Library/CoreServices/.disk_label"
f96e0b
+fi
f96e0b
+
f96e0b
+if [ -e "${iso9660_dir}/boot/powerpc.elf" ] ; then
f96e0b
+    cp "${ppc_dir}/grub.chrp" "${iso9660_dir}"/System/Library/CoreServices/BootX
f96e0b
+    cp "${iso9660_dir}/boot/powerpc.elf" "${iso9660_dir}"/System/Library/CoreServices/grub.elf
f96e0b
+    # FIXME: add PreP
f96e0b
+    grub_mkisofs_arguments="${grub_mkisofs_arguments} -hfsplus-file-creator-type chrp tbxi /System/Library/CoreServices/BootX -hfs-bless-by p /System/Library/CoreServices -sysid PPC"
f96e0b
+fi
f96e0b
+
f96e0b
+if [ -e "${iso9660_dir}"/System/Library/CoreServices/boot.efi ]; then
f96e0b
+    grub_mkisofs_arguments="${grub_mkisofs_arguments} -hfs-bless-by i /System/Library/CoreServices/boot.efi"
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
diff --git a/util/grub-render-label.c b/util/grub-render-label.c
f96e0b
new file mode 100644
f96e0b
index 0000000..7237759
f96e0b
--- /dev/null
f96e0b
+++ b/util/grub-render-label.c
f96e0b
@@ -0,0 +1,393 @@
f96e0b
+/*
f96e0b
+ *  GRUB  --  GRand Unified Bootloader
f96e0b
+ *  Copyright (C) 2010,2012 Free Software Foundation, Inc.
f96e0b
+ *
f96e0b
+ *  GRUB is free software: you can redistribute it and/or modify
f96e0b
+ *  it under the terms of the GNU General Public License as published by
f96e0b
+ *  the Free Software Foundation, either version 3 of the License, or
f96e0b
+ *  (at your option) any later version.
f96e0b
+ *
f96e0b
+ *  GRUB is distributed in the hope that it will be useful,
f96e0b
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
f96e0b
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
f96e0b
+ *  GNU General Public License for more details.
f96e0b
+ *
f96e0b
+ *  You should have received a copy of the GNU General Public License
f96e0b
+ *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
f96e0b
+ */
f96e0b
+
f96e0b
+
f96e0b
+#define grub_video_render_target grub_video_fbrender_target
f96e0b
+
f96e0b
+#include <config.h>
f96e0b
+
f96e0b
+#include <grub/util/misc.h>
f96e0b
+#include <grub/i18n.h>
f96e0b
+#include <grub/term.h>
f96e0b
+#include <grub/font.h>
f96e0b
+#include <grub/gfxmenu_view.h>
f96e0b
+
f96e0b
+#define _GNU_SOURCE	1
f96e0b
+
f96e0b
+#include <stdio.h>
f96e0b
+#include <stdlib.h>
f96e0b
+#include <string.h>
f96e0b
+#include <argp.h>
f96e0b
+#include <unistd.h>
f96e0b
+#include <errno.h>
f96e0b
+
f96e0b
+#include "progname.h"
f96e0b
+
f96e0b
+struct arguments
f96e0b
+{
f96e0b
+  char *input;
f96e0b
+  char *text;
f96e0b
+  char *output;
f96e0b
+  char *font;
f96e0b
+  grub_video_rgba_color_t fgcolor;
f96e0b
+  grub_video_rgba_color_t bgcolor;
f96e0b
+  int verbosity;
f96e0b
+};
f96e0b
+
f96e0b
+static struct argp_option options[] = {
f96e0b
+  {"input",  'i', N_("FILE"), 0,
f96e0b
+   N_("read text from FILE."), 0},
f96e0b
+  {"color",  'c', N_("COLOR"), 0,
f96e0b
+   N_("use COLOR for text"), 0},
f96e0b
+  {"bgcolor",  'b', N_("COLOR"), 0,
f96e0b
+   N_("use COLOR for background"), 0},
f96e0b
+  {"text",  't', N_("STR"), 0,
f96e0b
+   N_("supply the string."), 0},
f96e0b
+  {"output",  'o', N_("FILE"), 0,
f96e0b
+   N_("set output filename. Default is STDOUT"), 0},
f96e0b
+  {"font",  'f', N_("FILE"), 0,
f96e0b
+   N_("use FILE as font (PF2)."), 0},
f96e0b
+  {"verbose",     'v', 0,      0, N_("print verbose messages."), 0},
f96e0b
+  { 0, 0, 0, 0, 0, 0 }
f96e0b
+};
f96e0b
+
f96e0b
+#include <grub/err.h>
f96e0b
+#include <grub/types.h>
f96e0b
+#include <grub/dl.h>
f96e0b
+#include <grub/misc.h>
f96e0b
+#include <grub/mm.h>
f96e0b
+#include <grub/video.h>
f96e0b
+#include <grub/video_fb.h>
f96e0b
+
f96e0b
+static struct
f96e0b
+{
f96e0b
+  struct grub_video_mode_info mode_info;
f96e0b
+  struct grub_video_render_target *render_target;
f96e0b
+  grub_uint8_t *ptr;
f96e0b
+} framebuffer;
f96e0b
+
f96e0b
+static grub_err_t
f96e0b
+grub_video_text_render_swap_buffers (void)
f96e0b
+{
f96e0b
+  return GRUB_ERR_NONE;
f96e0b
+}
f96e0b
+
f96e0b
+static grub_err_t
f96e0b
+grub_video_text_render_set_active_render_target (struct grub_video_render_target *target)
f96e0b
+{
f96e0b
+  if (target == GRUB_VIDEO_RENDER_TARGET_DISPLAY)
f96e0b
+    target = framebuffer.render_target;
f96e0b
+
f96e0b
+  return grub_video_fb_set_active_render_target (target);
f96e0b
+}
f96e0b
+
f96e0b
+static struct grub_video_adapter grub_video_text_render_adapter =
f96e0b
+  {
f96e0b
+    .name = "Text rendering",
f96e0b
+
f96e0b
+    .prio = GRUB_VIDEO_ADAPTER_PRIO_FIRMWARE,
f96e0b
+
f96e0b
+    .fini = grub_video_fb_fini,
f96e0b
+    .get_info = grub_video_fb_get_info,
f96e0b
+    .get_info_and_fini = 0,
f96e0b
+    .set_palette = grub_video_fb_set_palette,
f96e0b
+    .get_palette = grub_video_fb_get_palette,
f96e0b
+    .set_viewport = grub_video_fb_set_viewport,
f96e0b
+    .get_viewport = grub_video_fb_get_viewport,
f96e0b
+    .map_color = grub_video_fb_map_color,
f96e0b
+    .map_rgb = grub_video_fb_map_rgb,
f96e0b
+    .map_rgba = grub_video_fb_map_rgba,
f96e0b
+    .unmap_color = grub_video_fb_unmap_color,
f96e0b
+    .fill_rect = grub_video_fb_fill_rect,
f96e0b
+    .blit_bitmap = grub_video_fb_blit_bitmap,
f96e0b
+    .blit_render_target = grub_video_fb_blit_render_target,
f96e0b
+    .scroll = grub_video_fb_scroll,
f96e0b
+    .swap_buffers = grub_video_text_render_swap_buffers,
f96e0b
+    .create_render_target = grub_video_fb_create_render_target,
f96e0b
+    .delete_render_target = grub_video_fb_delete_render_target,
f96e0b
+    .set_active_render_target = grub_video_text_render_set_active_render_target,
f96e0b
+    .get_active_render_target = grub_video_fb_get_active_render_target,
f96e0b
+
f96e0b
+    .next = 0
f96e0b
+  };
f96e0b
+
f96e0b
+static error_t
f96e0b
+argp_parser (int key, char *arg, struct argp_state *state)
f96e0b
+{
f96e0b
+  /* Get the input argument from argp_parse, which we
f96e0b
+     know is a pointer to our arguments structure. */
f96e0b
+  struct arguments *arguments = state->input;
f96e0b
+  grub_err_t err;
f96e0b
+
f96e0b
+  switch (key)
f96e0b
+    {
f96e0b
+    case 'i':
f96e0b
+      arguments->input = xstrdup (arg);
f96e0b
+      break;
f96e0b
+
f96e0b
+    case 'b':
f96e0b
+      err = grub_video_parse_color (arg, &arguments->bgcolor);
f96e0b
+      if (err)
f96e0b
+	grub_util_error (_("Invalud color `%s'"), arg);
f96e0b
+      break;
f96e0b
+
f96e0b
+    case 'c':
f96e0b
+      err = grub_video_parse_color (arg, &arguments->fgcolor);
f96e0b
+      if (err)
f96e0b
+	grub_util_error (_("Invalud color `%s'"), arg);
f96e0b
+      break;
f96e0b
+
f96e0b
+    case 'f':
f96e0b
+      arguments->font = xstrdup (arg);
f96e0b
+      break;
f96e0b
+
f96e0b
+    case 't':
f96e0b
+      arguments->text = xstrdup (arg);
f96e0b
+      break;
f96e0b
+
f96e0b
+    case 'o':
f96e0b
+      arguments->output = xstrdup (arg);
f96e0b
+      break;
f96e0b
+
f96e0b
+    case 'v':
f96e0b
+      arguments->verbosity++;
f96e0b
+      break;
f96e0b
+
f96e0b
+    default:
f96e0b
+      return ARGP_ERR_UNKNOWN;
f96e0b
+    }
f96e0b
+
f96e0b
+  return 0;
f96e0b
+}
f96e0b
+
f96e0b
+void grub_hostfs_init (void);
f96e0b
+void grub_host_init (void);
f96e0b
+
f96e0b
+struct header
f96e0b
+{
f96e0b
+  grub_uint8_t magic;
f96e0b
+  grub_uint16_t width;
f96e0b
+  grub_uint16_t height;
f96e0b
+} __attribute__ ((packed));
f96e0b
+
f96e0b
+static struct argp argp = {
f96e0b
+  options, argp_parser, N_("[OPTIONS]"),
f96e0b
+  N_("Render Apple .disk_label."),
f96e0b
+  NULL, NULL, NULL
f96e0b
+};
f96e0b
+
f96e0b
+static struct grub_video_palette_data ieee1275_palette[256];
f96e0b
+
f96e0b
+int
f96e0b
+main (int argc, char *argv[])
f96e0b
+{
f96e0b
+  FILE *out;
f96e0b
+  char *text;
f96e0b
+  char *fontfull;
f96e0b
+  struct arguments arguments;
f96e0b
+  grub_font_t font;
f96e0b
+  int width, height;
f96e0b
+  struct header head;
f96e0b
+  const grub_uint8_t vals[] = { 0xff, 0xda, 0xb3, 0x87, 0x54, 0x00 };
f96e0b
+  const grub_uint8_t vals2[] = { 0xf3, 0xe7, 0xcd, 0xc0, 0xa5, 0x96,
f96e0b
+				 0x77, 0x66, 0x3f, 0x27 };
f96e0b
+  int i, j, k, cptr = 0;
f96e0b
+  grub_uint8_t bg, fg;
f96e0b
+
f96e0b
+  for (i = 0; i < 256; i++)
f96e0b
+    ieee1275_palette[i].a = 0xff;
f96e0b
+
f96e0b
+  for (i = 0; i < 6; i++)
f96e0b
+    for (j = 0; j < 6; j++)
f96e0b
+      for (k = 0; k < 6; k++)
f96e0b
+	{
f96e0b
+	  ieee1275_palette[cptr].r = vals[i];
f96e0b
+	  ieee1275_palette[cptr].g = vals[j];
f96e0b
+	  ieee1275_palette[cptr].b = vals[k];
f96e0b
+	  ieee1275_palette[cptr].a = 0xff;
f96e0b
+	  cptr++;
f96e0b
+	}
f96e0b
+  cptr--;
f96e0b
+  for (i = 0; i < 10; i++)
f96e0b
+    {
f96e0b
+      ieee1275_palette[cptr].r = vals2[i];
f96e0b
+      ieee1275_palette[cptr].g = 0;
f96e0b
+      ieee1275_palette[cptr].b = 0;
f96e0b
+      ieee1275_palette[cptr].a = 0xff;
f96e0b
+      cptr++;
f96e0b
+    }
f96e0b
+  for (i = 0; i < 10; i++)
f96e0b
+    {
f96e0b
+      ieee1275_palette[cptr].r = 0;
f96e0b
+      ieee1275_palette[cptr].g = vals2[i];
f96e0b
+      ieee1275_palette[cptr].b = 0;
f96e0b
+      ieee1275_palette[cptr].a = 0xff;
f96e0b
+      cptr++;
f96e0b
+    }
f96e0b
+  for (i = 0; i < 10; i++)
f96e0b
+    {
f96e0b
+      ieee1275_palette[cptr].r = 0;
f96e0b
+      ieee1275_palette[cptr].g = 0;
f96e0b
+      ieee1275_palette[cptr].b = vals2[i];
f96e0b
+      ieee1275_palette[cptr].a = 0xff;
f96e0b
+      cptr++;
f96e0b
+    }
f96e0b
+  for (i = 0; i < 10; i++)
f96e0b
+    {
f96e0b
+      ieee1275_palette[cptr].r = vals2[i];
f96e0b
+      ieee1275_palette[cptr].g = vals2[i];
f96e0b
+      ieee1275_palette[cptr].b = vals2[i];
f96e0b
+      ieee1275_palette[cptr].a = 0xff;
f96e0b
+      cptr++;
f96e0b
+    }
f96e0b
+  ieee1275_palette[cptr].r = 0;
f96e0b
+  ieee1275_palette[cptr].g = 0;
f96e0b
+  ieee1275_palette[cptr].b = 0;
f96e0b
+  ieee1275_palette[cptr].a = 0xff;
f96e0b
+
f96e0b
+  set_program_name (argv[0]);
f96e0b
+
f96e0b
+  grub_util_init_nls ();
f96e0b
+
f96e0b
+  /* Check for options.  */
f96e0b
+  memset (&arguments, 0, sizeof (struct arguments));
f96e0b
+  arguments.bgcolor.red = 0xff;
f96e0b
+  arguments.bgcolor.green = 0xff;
f96e0b
+  arguments.bgcolor.blue = 0xff;
f96e0b
+  arguments.bgcolor.alpha = 0xff;
f96e0b
+  arguments.fgcolor.red = 0x00;
f96e0b
+  arguments.fgcolor.green = 0x00;
f96e0b
+  arguments.fgcolor.blue = 0x00;
f96e0b
+  arguments.fgcolor.alpha = 0xff;
f96e0b
+  if (argp_parse (&argp, argc, argv, 0, 0, &arguments) != 0)
f96e0b
+    {
f96e0b
+      fprintf (stderr, "%s", _("Error in parsing command line arguments\n"));
f96e0b
+      exit(1);
f96e0b
+    }
f96e0b
+
f96e0b
+  if ((!arguments.input && !arguments.text) || !arguments.font)
f96e0b
+    {
f96e0b
+      fprintf (stderr, "%s", _("Missing arguments\n"));
f96e0b
+      exit(1);
f96e0b
+    }
f96e0b
+
f96e0b
+  if (arguments.text)
f96e0b
+    text = arguments.text;
f96e0b
+  else
f96e0b
+    {
f96e0b
+      FILE *in = fopen (arguments.input, "r");
f96e0b
+      size_t s;
f96e0b
+      if (!in)
f96e0b
+	grub_util_error (_("cannot open `%s': %s"), arguments.input,
f96e0b
+			 strerror (errno));
f96e0b
+      fseek (in, 0, SEEK_END);
f96e0b
+      s = ftell (in);
f96e0b
+      fseek (in, 0, SEEK_SET);
f96e0b
+      text = xmalloc (s + 1);
f96e0b
+      if (fread (text, 1, s, in) != s)
f96e0b
+	grub_util_error (_("cannot read `%s': %s"), arguments.input,
f96e0b
+			 strerror (errno));
f96e0b
+      text[s] = 0;
f96e0b
+      fclose (in);
f96e0b
+    }
f96e0b
+
f96e0b
+  if (arguments.output)
f96e0b
+    out = fopen (arguments.output, "wb");
f96e0b
+  else
f96e0b
+    out = stdout;
f96e0b
+  if (!out)
f96e0b
+    {
f96e0b
+      grub_util_error (_("cannot open `%s': %s"), arguments.output ? : "stdout",
f96e0b
+		       strerror (errno));
f96e0b
+    }
f96e0b
+
f96e0b
+  fontfull = canonicalize_file_name (arguments.font);
f96e0b
+  if (!fontfull)
f96e0b
+    {
f96e0b
+      grub_util_error (_("cannot open `%s': %s"), arguments.font,
f96e0b
+		       strerror (errno));
f96e0b
+    }  
f96e0b
+
f96e0b
+  fontfull = xasprintf ("(host)/%s", fontfull);
f96e0b
+
f96e0b
+  grub_init_all ();
f96e0b
+  grub_hostfs_init ();
f96e0b
+  grub_host_init ();
f96e0b
+
f96e0b
+  grub_font_loader_init ();
f96e0b
+  font = grub_font_load (fontfull);
f96e0b
+  if (!font)
f96e0b
+    {
f96e0b
+      grub_util_error (_("cannot open `%s': %s"), arguments.font,
f96e0b
+		       grub_errmsg);
f96e0b
+    }  
f96e0b
+
f96e0b
+  width = grub_font_get_string_width (font, text) + 10;
f96e0b
+  height = grub_font_get_height (font);
f96e0b
+
f96e0b
+  grub_memset (&framebuffer, 0, sizeof (framebuffer));
f96e0b
+
f96e0b
+  grub_video_fb_init ();
f96e0b
+
f96e0b
+  framebuffer.mode_info.width = width;
f96e0b
+  framebuffer.mode_info.height = height;
f96e0b
+  framebuffer.mode_info.pitch = width;
f96e0b
+
f96e0b
+  framebuffer.mode_info.mode_type = GRUB_VIDEO_MODE_TYPE_INDEX_COLOR;
f96e0b
+  framebuffer.mode_info.bpp = 8;
f96e0b
+  framebuffer.mode_info.bytes_per_pixel = 1;
f96e0b
+  framebuffer.mode_info.number_of_colors = 256;
f96e0b
+
f96e0b
+  framebuffer.mode_info.blit_format = grub_video_get_blit_format (&framebuffer.mode_info);
f96e0b
+
f96e0b
+  /* For some reason sparc64 uses 32-bit pointer too.  */
f96e0b
+  framebuffer.ptr = xmalloc (height * width);
f96e0b
+  
f96e0b
+  grub_video_fb_create_render_target_from_pointer (&framebuffer.render_target,
f96e0b
+						   &framebuffer.mode_info,
f96e0b
+						   framebuffer.ptr);
f96e0b
+  grub_video_fb_set_active_render_target (framebuffer.render_target);
f96e0b
+  grub_video_fb_set_palette (0, ARRAY_SIZE (ieee1275_palette),
f96e0b
+			     ieee1275_palette);
f96e0b
+
f96e0b
+  grub_video_set_adapter (&grub_video_text_render_adapter);
f96e0b
+
f96e0b
+  fg = grub_video_map_rgb (arguments.fgcolor.red,
f96e0b
+			   arguments.fgcolor.green,
f96e0b
+			   arguments.fgcolor.blue);
f96e0b
+  bg = grub_video_map_rgb (arguments.bgcolor.red,
f96e0b
+			   arguments.bgcolor.green,
f96e0b
+			   arguments.bgcolor.blue);
f96e0b
+
f96e0b
+  grub_memset (framebuffer.ptr, bg, height * width);
f96e0b
+  grub_font_draw_string (text, font, fg,
f96e0b
+                         5, grub_font_get_ascent (font));
f96e0b
+
f96e0b
+  grub_video_set_adapter (0);
f96e0b
+
f96e0b
+  head.magic = 1;
f96e0b
+  head.width = grub_cpu_to_be16 (width);
f96e0b
+  head.height = grub_cpu_to_be16 (height);
f96e0b
+  fwrite (&head, 1, sizeof (head), out);
f96e0b
+  fwrite (framebuffer.ptr, 1, width * height, out);
f96e0b
+
f96e0b
+  if (out != stdout)
f96e0b
+    fclose (out);
f96e0b
+
f96e0b
+  return 0;
f96e0b
+}
f96e0b
diff --git a/util/powerpc/ieee1275/grub-mkrescue.in b/util/powerpc/ieee1275/grub-mkrescue.in
f96e0b
deleted file mode 100644
f96e0b
index 2615cab..0000000
f96e0b
--- a/util/powerpc/ieee1275/grub-mkrescue.in
f96e0b
+++ /dev/null
f96e0b
@@ -1,146 +0,0 @@
f96e0b
-#! /bin/sh
f96e0b
-set -e
f96e0b
-
f96e0b
-# Make GRUB rescue image
f96e0b
-# Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008  Free Software Foundation, Inc.
f96e0b
-#
f96e0b
-# GRUB is free software: you can redistribute it and/or modify
f96e0b
-# it under the terms of the GNU General Public License as published by
f96e0b
-# the Free Software Foundation, either version 3 of the License, or
f96e0b
-# (at your option) any later version.
f96e0b
-#
f96e0b
-# GRUB is distributed in the hope that it will be useful,
f96e0b
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
f96e0b
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
f96e0b
-# GNU General Public License for more details.
f96e0b
-#
f96e0b
-# You should have received a copy of the GNU General Public License
f96e0b
-# along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
f96e0b
-
f96e0b
-# Initialize some variables.
f96e0b
-prefix="@prefix@"
f96e0b
-exec_prefix="@exec_prefix@"
f96e0b
-bindir="@bindir@"
f96e0b
-libdir="@libdir@"
f96e0b
-PACKAGE_NAME=@PACKAGE_NAME@
f96e0b
-PACKAGE_TARNAME=@PACKAGE_TARNAME@
f96e0b
-PACKAGE_VERSION=@PACKAGE_VERSION@
f96e0b
-input_dir="${libdir}/@PACKAGE@/powerpc-ieee1275"
f96e0b
-datarootdir="@datarootdir@"
f96e0b
-datadir="@datadir@"
f96e0b
-if [ "x$pkgdatadir" = x ]; then
f96e0b
-    pkgdatadir="${datadir}/@PACKAGE@"
f96e0b
-fi
f96e0b
-
f96e0b
-self=`basename $0`
f96e0b
-
f96e0b
-grub_mkimage="${bindir}/@grub_mkimage@"
f96e0b
-
f96e0b
-export TEXTDOMAIN=@PACKAGE@
f96e0b
-export TEXTDOMAINDIR="@localedir@"
f96e0b
-
f96e0b
-. "${pkgdatadir}/grub-mkconfig_lib"
f96e0b
-
f96e0b
-# Usage: usage
f96e0b
-# Print the usage.
f96e0b
-usage () {
f96e0b
-    gettext_printf "Usage: %s [OPTION] SOURCE...\n" "$self"
f96e0b
-    gettext "Make GRUB CD-ROM, disk, pendrive and floppy bootable image."; echo
f96e0b
-    echo
f96e0b
-    print_option_help "-h, --help" "$(gettext "print this message and exit")"
f96e0b
-    print_option_help "-v, --version" "$(gettext "print the version information and exit")"
f96e0b
-    print_option_help "--modules=$(gettext "MODULES")" "$(gettext "pre-load specified modules MODULES")"
f96e0b
-    print_option_help "--grub-mkimage=$(gettext "FILE")" "$(gettext "use FILE as grub-mkimage")"
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" "genisoimage -help" "$self" | grub_fmt
f96e0b
-    echo
f96e0b
-    gettext "Report bugs to <bug-grub@gnu.org>."; echo
f96e0b
-}
f96e0b
-
f96e0b
-argument () {
f96e0b
-  opt=$1
f96e0b
-  shift
f96e0b
-
f96e0b
-  if test $# -eq 0; then
f96e0b
-      gettext_printf "%s: option requires an argument -- \`%s'\n" "$0" "$opt" 1>&2
f96e0b
-      exit 1
f96e0b
-  fi
f96e0b
-  echo $1
f96e0b
-}
f96e0b
-
f96e0b
-source=
f96e0b
-output_image=
f96e0b
-
f96e0b
-# Check the arguments.
f96e0b
-while test $# -gt 0
f96e0b
-do
f96e0b
-    option=$1
f96e0b
-    shift
f96e0b
-
f96e0b
-    case "$option" in
f96e0b
-    -h | --help)
f96e0b
-	usage
f96e0b
-	exit 0 ;;
f96e0b
-    -v | --version)
f96e0b
-	echo "$self (${PACKAGE_NAME}) ${PACKAGE_VERSION}"
f96e0b
-	exit 0 ;;
f96e0b
-
f96e0b
-    --modules)
f96e0b
-	modules=`argument $option "$@"`; shift ;;
f96e0b
-    --modules=*)
f96e0b
-	modules=`echo "$option" | sed 's/--modules=//'` ;;
f96e0b
-
f96e0b
-    --override-directory)
f96e0b
-	input_dir=`argument $option "$@"`; shift ;;
f96e0b
-    --override-directory=*)
f96e0b
-	input_dir=`echo "$option" | sed 's/--override-directory=//'` ;;
f96e0b
-
f96e0b
-    --grub-mkimage)
f96e0b
-	grub_mkimage=`argument $option "$@"`; shift ;;
f96e0b
-    --grub-mkimage=*)
f96e0b
-	grub_mkimage=`echo "$option" | sed 's/--grub-mkimage=//'` ;;
f96e0b
-
f96e0b
-    -o | --output)
f96e0b
-	output_image=`argument $option "$@"`; shift ;;
f96e0b
-    --output=*)
f96e0b
-	output_image=`echo "$option" | sed 's/--output=//'` ;;
f96e0b
-
f96e0b
-    --rom-directory=*)
f96e0b
-       ;;
f96e0b
-    --rom-directory)
f96e0b
-	shift ;;
f96e0b
-
f96e0b
-    *)
f96e0b
-	source="${source} ${option} $@"; break ;;
f96e0b
-    esac
f96e0b
-done
f96e0b
-
f96e0b
-if test "x$output_image" = x; then
f96e0b
-  usage
f96e0b
-  exit 1
f96e0b
-fi
f96e0b
-
f96e0b
-if [ "x${modules}" = "x" ] ; then
f96e0b
-  modules=`cd ${input_dir}/ && ls *.mod`
f96e0b
-fi
f96e0b
-
f96e0b
-map_file=`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` || exit 1
f96e0b
-cat >${map_file} <
f96e0b
-# EXTN          XLate   CREATOR   TYPE     Comment
f96e0b
-grub.img        Raw     'UNIX'    'tbxi'   "bootstrap"
f96e0b
-EOF
f96e0b
-
f96e0b
-iso_dir=`mktemp -d "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` || exit 1
f96e0b
-boot_dir=${iso_dir}/boot/grub
f96e0b
-mkdir ${iso_dir}/boot
f96e0b
-mkdir ${boot_dir}
f96e0b
-core_img=${boot_dir}/grub.img
f96e0b
-${grub_mkimage} -O powerpc-ieee1275 -n -d ${input_dir}/ -o ${core_img} ${modules}
f96e0b
-genisoimage -graft-points -hfs -part -no-desktop -r -J -o ${output_image} \
f96e0b
- -map ${map_file} -hfs-bless ${boot_dir} -chrp-boot -sysid PPC \
f96e0b
- ${iso_dir} ${source}
f96e0b
-
f96e0b
-rm -rf ${iso_dir}
f96e0b
-rm -f ${map_file}
f96e0b
-
f96e0b
-exit 0
f96e0b
-- 
f96e0b
1.8.2.1
f96e0b