From 79816d58bcb8da64d6855069772affac3c22278d Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Wed, 10 Sep 2014 13:39:19 +0200 Subject: [PATCH] Add NO_BOOT variable --- README.md | 7 +++++++ novaboot | 9 ++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0eff63b..24421af 100644 --- a/README.md +++ b/README.md @@ -606,6 +606,13 @@ The following variables are interpreted in the novaboot script: parameters. If this variable is defined and non-empty, the variable HYPERVISOR\_PARAMS is not used. +- NO\_BOOT + + If this variable is 1, the system is not booted. This is currently + only implemented for U-Boot bootloader where it is useful for + interacting with the bootloader without booting the system - e.g. for + flashing. + - QEMU Use a specific qemu binary (can be overridden with **-Q**) and flags diff --git a/novaboot b/novaboot index 9b2c3df..d0d097d 100755 --- a/novaboot +++ b/novaboot @@ -1016,7 +1016,7 @@ if (defined $uboot) { } # Boot the system if there are some load lines in the script - if (scalar(@$modules) > 0) { + if (scalar(@$modules) > 0 && !$variables->{NO_BOOT}) { my ($kbin, $kcmd) = split(' ', shift(@$modules), 2); my $dtb; @$modules = map { if (/\.dtb$/) { $dtb=$_; (); } else { $_ } } @$modules; @@ -1761,6 +1761,13 @@ contain the name of the kernel image as well as its command line parameters. If this variable is defined and non-empty, the variable HYPERVISOR_PARAMS is not used. +=item NO_BOOT + +If this variable is 1, the system is not booted. This is currently +only implemented for U-Boot bootloader where it is useful for +interacting with the bootloader without booting the system - e.g. for +flashing. + =item QEMU Use a specific qemu binary (can be overridden with B<-Q>) and flags -- 2.39.2