| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Most of the files have U_BOOT_CMD on a separate line,
but a few didn't and had the first line on the same line
as U_BOOT_CMD.
This changes these files by adding a line break and a tab
Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The hush shell dynamically allocates (and re-allocates) memory for the
argument strings in the "char *argv[]" argument vector passed to
commands. Any code that modifies these pointers will cause serious
corruption of the malloc data structures and crash U-Boot, so make
sure the compiler can check that no such modifications are being done
by changing the code into "char * const argv[]".
This modification is the result of debugging a strange crash caused
after adding a new command, which used the following argument
processing code which has been working perfectly fine in all Unix
systems since version 6 - but not so in U-Boot:
int main (int argc, char **argv)
{
while (--argc > 0 && **++argv == '-') {
/* ====> */ while (*++*argv) {
switch (**argv) {
case 'd':
debug++;
break;
...
default:
usage ();
}
}
}
...
}
The line marked "====>" will corrupt the malloc data structures and
usually cause U-Boot to crash when the next command gets executed by
the shell. With the modification, the compiler will prevent this with
an
error: increment of read-only location '*argv'
N.B.: The code above can be trivially rewritten like this:
while (--argc > 0 && **++argv == '-') {
char *arg = *argv;
while (*++arg) {
switch (*arg) {
...
Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
| |
Coding style cleanup, update CHANGELOG.
Signed-off-by: Wolfgang Denk <wd@denx.de>
|
|
|
|
|
|
|
|
|
|
|
| |
Fix compile error:
cmd_ximg.c: In function 'do_imgextract':
cmd_ximg.c:234: error: 'i' undeclared (first use in this function)
cmd_ximg.c:234: error: (Each undeclared identifier is reported only once
cmd_ximg.c:234: error: for each function it appears in.)
Signed-off-by: Wolfgang Denk <wd@denx.de>
|
|
|
|
|
|
|
|
| |
imxtract currently can not handle compressed images. This patch adds
handling for bzip2 and zip compression. In both cases, a destination
address has to be specified for extraction.
Signed-off-by: Wolfgang Wegner <w.wegner@astro-kom.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Many of the help messages were not really helpful; for example, many
commands that take no arguments would not print a correct synopsis
line, but "No additional help available." which is not exactly wrong,
but not helpful either.
Commit ``Make "usage" messages more helpful.'' changed this
partially. But it also became clear that lots of "Usage" and "Help"
messages (fields "usage" and "help" in struct cmd_tbl_s respective)
were actually redundant.
This patch cleans this up - for example:
Before:
=> help dtt
dtt - Digital Thermometer and Thermostat
Usage:
dtt - Read temperature from digital thermometer and thermostat.
After:
=> help dtt
dtt - Read temperature from Digital Thermometer and Thermostat
Usage:
dtt
Signed-off-by: Wolfgang Denk <wd@denx.de>
|
|
|
|
|
|
|
|
| |
Remove command name from all command "usage" fields and update
common/command.c to display "name - usage" instead of
just "usage". Also remove newlines from command usage fields.
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
|
|
|
|
|
|
|
|
|
|
| |
As suggested by Wolfgang Denk:
- image printing functions:
- remove wrappers
- remove indentation prefix from functions' signatures
- merge getenv_verify and getenv_autostart into one parametrized function
Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
|
|
|
|
|
|
|
|
| |
Fix imxtract command not being compiled-in despite CONFIG_CMD_XIMG being in
include/config_cmd_default.h. Fix few warnings and handling of new format
images.
Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
|
|
|
|
| |
Signed-off-by: Marian Balakowicz <m8@semihalf.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch introduces the following prefix convention for the
image format handling and bootm related code:
genimg_ - dual format shared code
image_ - legacy uImage format specific code
fit_ - new uImage format specific code
boot_ - booting process related code
Related routines are renamed and a few pieces of code are moved around and
re-grouped.
Signed-off-by: Marian Balakowicz <m8@semihalf.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds framework for dual format images. Format detection is added
and the bootm controll flow is updated to include cases for new FIT format
uImages.
When the legacy (image_header based) format is detected appropriate
legacy specific handling is invoked. For the new (FIT based) format uImages
dual boot framework has a minial support, that will only print out a
corresponding debug messages. Implementation of the FIT specific handling will
be added in following patches.
Signed-off-by: Marian Balakowicz <m8@semihalf.com>
|
|
|
|
| |
Signed-off-by: Marian Balakowicz <m8@semihalf.com>
|
|
|
|
|
|
|
|
|
| |
- Add inline helper macros for basic header processing
- Move common non inline code common/image.c
- Replace direct header access with the API routines
- Rename IH_CPU_* to IH_ARCH_*
Signed-off-by: Marian Balakowicz <m8@semihalf.com>
|
|
|
|
| |
Signed-off-by: Jon Loeliger <jdl@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a compatibility step that allows both the older form
and the new form to co-exist for a while until the older can
be removed entirely.
All transformations are of the form:
Before:
#if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT)
After:
#if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT)
Signed-off-by: Jon Loeliger <jdl@freescale.com>
|
|
Add 'imgextract' command: extract one part of a multi file image.
|