perl-Bootloader/grub2-on-powerpc.patch
2013-07-09 07:12:23 +00:00

23 lines
768 B
Diff

Index: perl-Bootloader-0.708/src/Core/GRUB2.pm
===================================================================
--- perl-Bootloader-0.708.orig/src/Core/GRUB2.pm
+++ perl-Bootloader-0.708/src/Core/GRUB2.pm
@@ -333,12 +333,15 @@ sub new
my $self = shift;
my $ref = shift;
my $old = shift;
+ my $arch = `uname --hardware-platform`;
+ my $target;
my $loader = $self->SUPER::new($ref, $old);
bless($loader);
- # Do we support any architecture besides x86?
- my $target = "i386-pc";
+ #Set target based on architecture (ppc or x86)
+ $target = "i386-pc" if $arch =~ /(i386|x86_64)/;
+ $target = "powerpc-ieee1275" if $arch =~ /(ppc|ppc64)/;
$loader->{'target'} = $target;
$loader->milestone("Created GRUB2 instance for target $target");