From 092a8477659a2d22147e12a41d9b6cea8b47ff65 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Mon, 25 Apr 2022 22:49:03 +0200 Subject: [PATCH] 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. --- novaboot | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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}; -- 2.39.2