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.
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};