From 20c361999b379274aa7f5da5f1c590fe6c945141 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 20 Mar 2018 14:05:00 -0700 Subject: [PATCH] Fix post-install bootloader args on aarch64 Seems aarch64 needs 12 'down' key presses like ppc64, not 13 like x86_64. Tweak how this is done a bit; the ternary wasn't elegant any more with the aarch64 change, so just get rid of it. Signed-off-by: Adam Williamson --- lib/utils.pm | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/lib/utils.pm b/lib/utils.pm index f1e03817..9086288f 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -228,15 +228,17 @@ sub do_bootloader { } else { send_key "e"; - # ternary: 13 'downs' to reach the kernel line for installed - # system, 2 for UEFI installer - # since 20170328 PowerPC Rawhide and f26 are failing with 13 - # but work with 12 and added sleep 1 in loop. - my $presses; - if (get_var('OFW')) { - $presses = $args{postinstall} ? 12 : 2; - } else { - $presses = $args{postinstall} ? 13 : 2; + # 2 'downs' to reach the kernel line for UEFI installer, + # 13 'downs' on installed x86_64, 12 'downs' on installed + # aarch64 / ppc64 (there's a 'set_root' line on x86_64 but + # not on aarch64 or ppc64) + my $presses = 2; + if ($args{postinstall}) { + if (get_var('OFW') || get_var('ARCH') eq 'aarch64') { + $presses = 12; + } else { + $presses = 13; + } } foreach my $i (1..$presses) { sleep 1; # seems to have missed one down if too fast.