For x86 the global_data is managed entirely by the start.S code so we do
not need to touch it. However, we do have some more initcalls to add.
Signed-off-by: Simon Glass <sjg@chromium.org>
For x86, things have adjusted somewhat since this series was originally
written. It has its own way of running through initcalls which is actually
nicer than others archs.
Unfortunately this does introduce exceptions. We will soon require use of
generic board on x86, but until then we need to fit in with what is there,
and treat x86 as a special case.
Signed-off-by: Simon Glass <sjg@chromium.org>
This adds ppc features to the generic pre-relocation board init.
This is a separate commit so that these features are clearly shown.
Signed-off-by: Simon Glass <sjg@chromium.org>
Link symbols as created by the link script can either be absolute or
relative to the text start. This option switches between the two options
so that we can support both.
As we convert architectures over to generic board, we can see if this
option is actually needed, or whether it is possible to unify this feature
also.
Signed-off-by: Simon Glass <sjg@chromium.org>
This file handles common pre-relocation init for boards which use
the generic framework.
It starts up the console, DRAM, performs relocation and then jumps
to post-relocation init.
Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Wolfgang Denk <wd@denx.de>
Acked-by: Wolfgang Denk <wd@denx.de>
Because the code that handles bootdelay is compiled in conditionally
based on the default value, you are restricted in the default,
regardless of what you want the runtime options to be.
Change the source to always check if any default is given so that other
values can be selected and used at runtime.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
The "env ask" traditionally uses a somewhat awkward syntax:
env ask name [message ...] [size]
So far, when a mesage was given, you always also had to enter a size.
If you forgot to do that, the command would terminate without any
indication of the problem.
To avoid incompatible changes of the interface, we now check the last
argument if it can be converted into a decimal number. If this is the
case, we assume it is a size; otherwise we treat it as part of the
message.
Also, add a space after the message fore easier reading,
and clean up help mesage.
Signed-off-by: Wolfgang Denk <wd@denx.de>
When using the partial read feature of fatwrite the buffer we read into
can become unaligned not just due to initial location but the size of
our partial reads as well. Make this clear in the help text.
Signed-off-by: Tom Rini <trini@ti.com>
The core implementation of "help" already prints the command name before
the help text of a specific command. Remove it from part's own help text
to avoid it being printed twice:
Tegra114 (Dalmore) # help part
part - disk partition related commands
Usage:
part part uuid <interface> <dev>:<part>
- print partition UUID
...
Signed-off-by: Stephen Warren <swarren@nvidia.com>
The "mtest" command is of little practical use (if any), and
experience has shown that a large number of board configurations
define useless or even dangerous start and end addresses. If not even
the board maintainers are able to figure out which memory range can be
reliably tested, how can we expect such from the end users? As this
problem comes up repeatedly, we rather do not enable this command by
default, so only people who know what they are doing will be
confronted with it.
As this changes the user interface, we allow for a grace period
before this change takes effect. For now, we make "mtest"
configurable through the CONFIG_CMD_MEMTEST variable, which is defined
in include/config_cmd_default.h; we also add an entry to
doc/feature-removal-schedule.txt which announces the removal of this
default setting in two releases from now, i. e. with v2013.07.
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Tom Rini <trini@ti.com>
All code related to the bootm ramdisk subcommand is conditionally
enabled by CONFIG_SYS_BOOT_RAMDISK_HIGH except for the help message.
Replace the CONFIG_ARCH defines by CONFIG_SYS_BOOT_RAMDISK_HIGH
to fix this.
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
The new 'sb' command is intended to deal with sandbox-specific features
that have no parallel in other archs. This commit adds two sub-commands
to list a directory and read a file from the host filesystem.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
Set up clocks, DDR controller, Nor flash controller, reboot,
serial port. Add new SPI boot modes.
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Sonic Zhang <sonic.adi@gmail.com>
Rather than use strcasecmp() in the hash algorithm search, require the
caller to do this first. Most of U-Boot can use lower case anyway, and
the hash command can convert to lower case before calling hash_command().
This saves needing strcasecmp() for boards that use hashing but not
the hash command.
Signed-off-by: Simon Glass <sjg@chromium.org>
This config effectively has a default value of 0, so add this setting
at the top of the code to remove an #ifdef in the C function.
Signed-off-by: Simon Glass <sjg@chromium.org>
Add the CRC32 algorithm to the list of available hashes, and make
the crc32 command use hash_command(). Add a new crc32_wd_buf() to
make this possible, which puts its result in a buffer rather than
returning it as a 32-bit value.
Note: For some boards the hash command is not enabled, neither
are sha1, sha256 or the verify option. In this case the full
hash implementation adds about 500 bytes of overhead. So as a
special case, we use #ifdef to select very simple bahaviour in
that case. The justification for this is that it is currently
a very common case (virtually all boards enable crc32 but only
some enable more advanced features).
Signed-off-by: Simon Glass <sjg@chromium.org>
Some hashing commands permit saving the hash in an environment variable,
and verifying a hash from there. But the crc32 command does not support
this. In order to permit crc32 to use the generic hashing infrastructure,
add a flag to select which behaviour to use.
Signed-off-by: Simon Glass <sjg@chromium.org>
Use a ulong for the command arguments, and only cast to an address when
needed. This fixes warnings in sandbox where pointers are typically 64 bits
long.
Signed-off-by: Simon Glass <sjg@chromium.org>
If we get a Ctrl-C abort, we always print a newline. Move this repeated
code out of the functions and into a single place in the caller.
Signed-off-by: Simon Glass <sjg@chromium.org>
The iteration code is the same for each version of the memory test, so
pull it out into the common function.
Signed-off-by: Simon Glass <sjg@chromium.org>
Half of the code is currently hidden behind an #ifdef. Move the two
memory tests into their own functions and use the compiler to eliminate
the unused code.
Signed-off-by: Simon Glass <sjg@chromium.org>
Sandbox wants to support commands which use memory. The map_sysmen()
call provides this feature, so use this in the memory commands.
Signed-off-by: Simon Glass <sjg@chromium.org>
There are two problems:
1. The argument count needs to be checked before argv is used
2. When verify is not enabled, we need to define a constant zero value
Signed-off-by: Simon Glass <sjg@chromium.org>
Calculating the checksum of incompletely read data is useless.
Signed-off-by: Phil Sutter <phil.sutter@viprinet.com>
[scottwood@freescale.com: minor formatting fix]
Signed-off-by: Scott Wood <scottwood@freescale.com>
The single message is misleading, since there is no equivalent success
note when reading the other copy succeeds. Instead, warn if one of the
redundant copies could not be loaded and emphasise on the error when
reading both fails.
Signed-off-by: Phil Sutter <phil.sutter@viprinet.com>
"nand read.part addr off size" would be treated as "nand read.raw addr off 1"
It now fails as intended stating "Unknown nand command suffix '.part'"
Signed-off-by: Harvey Chapman <hchapman@3gfp.com>
Currently, in gpt command, partion size is converted from string
to unsigned long type using 'ustrtol' function. That type limits
the partition size to 4GB.
This patch changes the conversion function to 'ustrtoll' to return
unsigned long long type.
Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
u-boot is not consistent if state should be 0|1 or of the enum, the
GPIO driver expects this to be one of the enum values. Update the
caller.
Signed-off-by: Holger Hans Peter Freyther <holger@freyther.de>