Michal Sojka [Mon, 23 Mar 2015 08:17:55 +0000 (09:17 +0100)]
doc: Add encoding directive
POD manual says: if your encoding isn't US-ASCII or Latin-1, then put a
"=encoding encodingname" command early in the document so that pod
formatters will know how to decode the document.
Hopefully, this makes GitHub displaying en-dashes correctly.
Michal Sojka [Tue, 27 Jan 2015 12:38:44 +0000 (13:38 +0100)]
uboot: Make loading files and booting independent
When I want to boot the system from flash, I don't need to load
anything, but I need to run a boot command (UBOOT_CMD). This was not
possible without this change.
Michal Sojka [Mon, 15 Dec 2014 15:24:48 +0000 (16:24 +0100)]
Do not use nproc to determine the number of processors
On some systems (e.g. with busybox) nproc is not available. Instead use
sysconf(). The only problem is that the _SC_NPROCESSORS_CONF constant is
not defined in the Perl POSIX module. We define it here only for Linux.
Michal Sojka [Mon, 15 Dec 2014 14:07:50 +0000 (15:07 +0100)]
qemu is no longer hardcoded as default target
This was here only for compatibility with origin novaboot from the NUL
project. As this project seems to be no longer developed, we can
hopefully get rid of it.
Michal Sojka [Mon, 15 Dec 2014 12:41:13 +0000 (13:41 +0100)]
Always finish novaboot output with new line character
Previously, printed the character only when --exiton was in effect. It
is necessary to print it even in other cases, for example when novaboot
is started with --no-interaction.
The previous print command was erroneously changed to STDERR, so we
change it back to STDOUT.
Michal Sojka [Mon, 15 Dec 2014 12:35:44 +0000 (13:35 +0100)]
Execute --uboot-cmd even if there are no files to boot
This is useful in certain situations, for example when we want to
execute custom U-Boot command end exit novaboot without waiting for next
U-Boot prompt.
We also wrap kernel loading in an if block to suppress Perl warnings
about undefined $kbin.
Michal Sojka [Tue, 9 Dec 2014 09:17:53 +0000 (10:17 +0100)]
Flush serial line output after reset
This caused some problems when novaboot was used in other scripts and
those scripts looked for certain strings in novaboot output. It happened
that the string was found in the output before reset and therefore, the
whole thing didn't work correctly.
Michal Sojka [Tue, 2 Dec 2014 14:50:24 +0000 (15:50 +0100)]
Always use bi-direction target communication
I don't remember what was the reason for setting up bi-directional
interaction only when on terminal. It seems, it is useful to have also
when not on terminal - for example when running under socat.
With this change, I'm able to use novaboot with socat to load u-boot
to the target using X-modem protocol:
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.