From: Michal Sojka Date: Mon, 25 Apr 2022 20:49:03 +0000 (+0200) Subject: Fix u-boot prompt handling X-Git-Tag: 20220425a~1 X-Git-Url: https://rtime.felk.cvut.cz/gitweb/novaboot.git/commitdiff_plain/092a8477659a2d22147e12a41d9b6cea8b47ff65 Fix u-boot prompt handling Commit 9c9a064 ("Reset u-boot download timeout with every '#'", 2022-04-03) broke behavior on systems with '#' in u-boot prompt. Due to that commit, the prompt after file transfer is not detected and novaboot timeouts. We fix that by switching the order of expect patterns so that the prompt has priority over progress bar '#' characters. --- diff --git a/novaboot b/novaboot index 756cbe3..cd59748 100755 --- a/novaboot +++ b/novaboot @@ -1295,8 +1295,9 @@ if (defined $uboot) { die "No '--uboot-addr kernel' given" unless $uboot_addr{kernel}; $exp->send("tftpboot $uboot_addr{kernel} $prefix$kbin\n"); $exp->expect(15, - [qr/#/, sub { exp_continue; }], - $uboot_prompt) || die "Kernel load: " . ($! || "timeout"); + $uboot_prompt, + [qr/#/, sub { exp_continue; }] + ) || die "Kernel load: " . ($! || "timeout"); } if (defined $dtb) { die "No '--uboot-addr fdt' given" unless $uboot_addr{fdt};