-#!/usr/bin/perl -w
+#!/usr/bin/env perl
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
print STDERR "novaboot: Serial line interaction (press $interrupt to interrupt)...\n";
$exp->log_stdout(1);
if (@exiton) {
- $exp->expect($exiton_timeout, @expect_raw, @exiton) || die("exiton: " . ($! || "timeout"));
+ $exp->expect($exiton_timeout, @exiton, @expect_raw) || die("exiton: " . ($! || "timeout"));
} else {
my @inputs = ($exp);
my $infile = new IO::File;
=back
-=head1 PHASES AND OPTIONS
+=head1 OPTIONS AND PHASES
Novaboot performs its work in several phases. Command line options
described bellow influence the execution of each phase or allow their
(see B<--build-dir>) of the module to load and the remaining words are
passed to it as the command line parameters.
+When booting Linux, the first C<load> line usually refers to the
+kernel image and its command line parameters (unless you use some
+special pre-loader). Other C<load> lines may refer to an initramfs
+image and/or a device tree blob. Their order is not important, as the
+device tree is recognized as the file name ending with C<.dtb>.
+
When the C<load> line ends with "<<WORD" then the subsequent lines
until the line containing solely WORD are copied literally to the file
-named on that line. This is similar to shell's heredoc feature.
+named on that line. This is similar to the heredoc feature of UNIX
+shells.
When the C<load> line ends with "< CMD" then command CMD is executed
with F</bin/sh> and its standard output is stored in the file named on