- Enable grub2 installation on PowerPC - Package grub2 for PowerPC OBS-URL: https://build.opensuse.org/request/show/181735 OBS-URL: https://build.opensuse.org/package/show/Base:System/perl-Bootloader?expand=0&rev=93
23 lines
768 B
Diff
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");
|