Michal Sojka [Tue, 25 Nov 2014 11:01:25 +0000 (12:01 +0100)]
Change target connection warning to error
In the previous commit I argued that it is a valid use case to override
target connection option from command line. I realized that this is not
true, because the implementation does not know which option was given
last and the effective option is determined by the implementation and
not by the position on the command line. Therefore, it is almost always
an error to specify target connection option multiple times.
Michal Sojka [Mon, 24 Nov 2014 09:53:51 +0000 (10:53 +0100)]
Warn when multiple target connection options are given
This may be problem when --remote-expect is used, but the expected string
is not produced by all connection methods. Then, --remote-expect will may
cause indefinite blocking. For example, when
Michal Sojka [Sun, 23 Nov 2014 23:18:34 +0000 (00:18 +0100)]
Implement user configuration file
Previously, it was recommended to use ~/.novaboot as user configuration
file, but this didn't work when working other directory, such as in
/tmp. Therefore a new configuration file ~/.config/novaboot is
introduced, which is read always when it exists.
Thanks to Michal Vokac for figuring out this problem.
Michal Sojka [Tue, 4 Nov 2014 14:35:20 +0000 (15:35 +0100)]
Print newline after --exiton triggered exit
Otherwise, cursor might end up in the middle of a line and text printed
after novaboot exits starts there. As this might break various things such
as test protocol parses, we always end with a new line.
Michal Sojka [Fri, 31 Oct 2014 13:32:00 +0000 (14:32 +0100)]
uboot: Do not analyze expanded kernel command line
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.
Michal Sojka [Wed, 29 Oct 2014 12:37:35 +0000 (13:37 +0100)]
uboot: Make boot command configurable
U-Boot offers several ways how an OS can be run. For example one can
choose between go, bootm or bootz commands. The bootm command itself has
a handful of variants [1]. This change adds a possibility for the user
to configure which command or variant shall be used.
Michal Sojka [Tue, 21 Oct 2014 09:22:10 +0000 (11:22 +0200)]
Increase timeout for --remote-expect
If the remote target is connected over slow TCP connection, it may take
long time for the connection to be established. According to tcp(7) the
default value of tcp_syn_retries corresponds to 180 seconds so we should
wait the same time here.
Michal Sojka [Wed, 30 Jul 2014 14:27:15 +0000 (16:27 +0200)]
U-Boot: Extend kernel command line handling
In order to be compatible with a standard U-Boot way of having
variables containin U-Boot commands and using 'run' to expand variable
references in them, we check kernel command line if it starts with
'setenv bootargs'. If yes, we simply run this command, otherwise, we
preprend 'setenv bootargs' ourselves.
Examples:
1) Novaboot script contains:
load linux console=${console} quiet
U-Boot is instructed to run:
setenv bootargs console=${console} quiet
2) Novaboot script contains:
load linux ${netargs} quiet
and the U-Boot variable netargs contsins "setenv bootargs console=${console}"
U-Boot is instructed to run:
setenv bootargs console=${console} quiet
Note that in case 1) novaboot prepends "setenv bootargs" itselv
whereas in 2) inly executes the command line as is.
Michal Sojka [Wed, 23 Jul 2014 10:09:26 +0000 (12:09 +0200)]
Use recursive target definition for ryu boards
The ryu target specifies properties of the U-Boot bootloader on the board
and ryuglab and ryulocal targets extent this with different possibilities
of how the board can be reached.
Michal Sojka [Thu, 17 Jul 2014 11:46:57 +0000 (13:46 +0200)]
Detect errors when starting tftpd
No we start tftpd without forking in novaboot (but in tftpd itself), which
allows us to detect when it does not start correctly. For example when
a system daemon already runs.
Michal Sojka [Tue, 4 Feb 2014 16:05:13 +0000 (17:05 +0100)]
Use sterm instead of cu on ryuglab target
Compared to cu, sterm does not wait 2 seconds after hangup before it exits
(and leaves the port for another user/connection) and can reset the board
via command line switches (no need for --reset-cmd).
Sterm lives at
https://rtime.felk.cvut.cz/gitweb/can-benchmark.git/blob/HEAD:/utils/sterm.c
Additionally, use ssh -tt instead of -t. This causes the sterm to receive
SIGHUP even if ssh does not run on terminal.
Michal Sojka [Sun, 19 Jan 2014 11:47:09 +0000 (12:47 +0100)]
Introduce 'load' keyword to novaboot scripts
THIS IS A BACKWARD INCOMPATIBLE CHANGE!!!
Any file intended to be loaded on the target MUST be prefixed with the
load keyword in the novaboot script. This is done to allow future
extension of novaboot syntax.
Idea by Pavel Píša.
Other changes in this patch:
- sanitized and simplified novaboot script parsing
- --append can be specified multiple times
- documentation fixes