$exp->expect($timeout, $uboot_prompt) || die "U-Boot prompt timeout";
}
- # Boot the system if there are some load lines in the script
- if ((scalar(@$modules) > 0 && !$variables->{NO_BOOT}) ||
- defined $uboot_cmd) {
+ # Load files if there are some load lines in the script
+ if (scalar(@$modules) > 0 && !$variables->{NO_BOOT}) {
my ($kbin, $kcmd) = split(' ', shift(@$modules), 2);
my $dtb;
@$modules = map { if (/\.dtb$/) { $dtb=$_; (); } else { $_ } } @$modules;
$exp->send("setenv bootargs $kcmd\n");
$exp->expect(5, $uboot_prompt) || die "U-Boot prompt timeout";
+ }
+ if (!$variables->{NO_BOOT}) {
$uboot_cmd //= $variables->{UBOOT_CMD} // 'bootm $kernel_addr $ramdisk_addr $fdt_addr';
$uboot_cmd =~ s/\$kernel_addr/$uboot_addr{kernel}/g;
$uboot_cmd =~ s/\$ramdisk_addr/$uboot_addr{ramdisk}/g;