Previously, novaboot asked U-Boot to expand the kernel command line
before using it. If the expanded command line started with 'setenv
bootargs', it executed this command, otherwise, it prepended 'setenv
bootargs' and executed it.
This was present to allow using U-Boot environment variables that were
meant to be used with the "run" command in the kernel command line. As
those variables can contain other commands than just "setenv bootargs",
this didn't always work correctly. Therefore, we remove this
functionality. If users are need this functionality, they can use the
uboot lines in the novaboot script to explicitly invoke the run command.
For example, the following novaboot script
load linux/arch/arm/boot/uImage ${netargs} myparam=1
should be rewritten as follows:
uboot run netargs
load linux/arch/arm/boot/uImage ${bootargs} myparam=1
The "run netargs" command sets the bootargs variable and this variable
is mentioned explicitly in the command line.
} else {
$uboot_addr{ramdisk} = '-';
}
- $exp->send("echo $kcmd\n");
- $exp->expect(1, '-re', qr{echo .*\n(.*)\n$uboot_prompt}) || die "Command line test timeout";
- my $args = ($exp->matchlist)[0];
- if ($args =~ /^setenv\s+bootargs/) {
- $exp->send("$args\n");
- } else {
- $exp->send("setenv bootargs $kcmd\n");
- }
+
+ $kcmd //= '';
+ $exp->send("setenv bootargs $kcmd\n");
$exp->expect(5, $uboot_prompt) || die "U-Boot prompt timeout";
$uboot_cmd //= $variables->{UBOOT_CMD} // 'bootm $kernel_addr $ramdisk_addr $fdt_addr';