summaryrefslogtreecommitdiffstats
path: root/lib/MGA/DrakISO/BuildISO.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MGA/DrakISO/BuildISO.pm')
-rw-r--r--lib/MGA/DrakISO/BuildISO.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/MGA/DrakISO/BuildISO.pm b/lib/MGA/DrakISO/BuildISO.pm
index 0042b43..f4278b1 100644
--- a/lib/MGA/DrakISO/BuildISO.pm
+++ b/lib/MGA/DrakISO/BuildISO.pm
@@ -46,13 +46,15 @@ our @EXPORT = qw(build_iso);
sub build_iso {
my ($build) = @_;
+ my $efi_type = $build->{media}{efi_type} // 'none';
+
my $loopbacks = $build->get_build_dir('loopbacks');
my $files = $build->get_build_dir('files');
build_iso_image(
$build,
'/boot=' . $build->get_build_dir('boot'),
- if_($build->{settings}{arch} eq 'x86_64',
+ if_($efi_type ne 'none',
'/EFI=' . $build->get_build_dir('EFI'),
),
if_(-d $loopbacks,
@@ -99,11 +101,12 @@ sub build_iso_image {
my $arch = $build->{settings}{arch};
+ my $efi_type = $build->{media}{efi_type} // 'none';
+
my $mbr_image = $build->get_absolute_path($build->{media}{mbr_boot_img}) // '/usr/lib/grub/i386-pc/boot_hybrid.img';
-e $mbr_image or die "ERROR: cannot find MBR boot image $mbr_image\n";
my $esp_image = $build->get_build_dir('images') . '/esp.img';
- -e $esp_image || $arch ne 'x86_64' or die "ERROR: cannot find ESP image $esp_image\n";
my $build_dir = $build->get_build_dir('dist');
mkdir_p($build_dir);
@@ -136,7 +139,7 @@ sub build_iso_image {
'-boot-load-size', 4,
'-boot-info-table',
'--grub2-boot-info',
- if_(!$build->{media}{legacy_boot_only},
+ if_($efi_type ne 'none',
# for DVD UEFI boot
'--efi-boot', '--interval:appended_partition_2:all::',
# for USB UEFI boot