12 Aug, 2017

1 commit


02 Apr, 2016

1 commit


23 Mar, 2016

1 commit

  • When CONFIG_CMDLINE is disabled we need to remove all the command-line
    code. Most can be removed by dropping the appropriate linker lists from the
    images, but sub-commands must be dealt with specially.

    A simple mechanism is used to avoid 'unused static function' errors.

    Signed-off-by: Simon Glass
    Reviewed-by: Tom Rini

    Simon Glass
     

14 Jan, 2016

1 commit

  • Add a 'poweroff' command to boot commands, this only gets enabled if the
    board Kconfig does a "select CMD_POWEROFF".

    Signed-off-by: Michael van Slingerland
    [hdegoede@redhat.com: Make the cmd conditional on a CMD_POWEROFF Kconfig]
    Signed-off-by: Hans de Goede

    Michael van Slingerland
     

07 Dec, 2015

1 commit


28 Jul, 2015

1 commit

  • The sysboot and pxe commands currently support either U-Boot formats or
    raw zImages. Add support for the AArch64 Linux port's native image format
    too.

    As with zImage support, there is no auto-detection of the native image
    format. Rather, if the image is auto-detected as a U-Boot format, U-Boot
    will try to interpret it as such. Otherwise, U-Boot will fall back to a
    raw/native image format, if one is enabled.

    My belief is that CONFIG_CMD_BOOTZ won't ever be enabled for any AArch64
    port, hence there's never a need to differentiate between CONFIG_CMD_
    _BOOTI and _BOOTZ at run-time; compile-time will do. Even if this isn't
    true, we want to prefer _BOOTI over _BOOTZ when defined, since _BOOTI is
    definitely the native format for AArch64.

    Change-Id: I83c5cc7566032afd72516de46f4e5eb7a780284a
    Signed-off-by: Stephen Warren
    Signed-off-by: Tom Warren

    Stephen Warren
     

27 Oct, 2014

1 commit

  • The run command treats each argument an an environment variable. It gets the
    value of each variable and executes it as a command. If an environment
    variable contains a newline and the hush cli is used, it is supposed to
    execute each line one after the other.

    Normally a newline signals to hush to exit - this is used in normal command
    line entry - after a command is entered we want to return to allow the user
    to enter the next one. But environment variables obviously need to execute
    to completion.

    Add a special case for the execution of environment variables which
    continues when a newline is seen, and add a few tests to check this
    behaviour.

    Note: it's not impossible that this may cause regressions in other areas.
    I can't think of a case but with any change of behaviour with limited test
    coverage there is always a risk. From what I can tell this behaviour has
    been around since at least U-Boot 2011.03, although this pre-dates sandbox
    and I have not tested it on real hardware.

    Reported-by: Wolfgang Denk
    Signed-off-by: Simon Glass

    Simon Glass
     

19 Jun, 2014

1 commit


05 Mar, 2014

1 commit

  • U-Boot now uses errors defined in include/errno.h which are negative
    integers. Commands which fail need to report the error and return 1
    to indicate failure. Add this functionality in cmd_process_error().

    For now this merely reports the error number. It would be possible
    also to produce a helpful error message by storing the error strings
    in U-Boot.

    Signed-off-by: Simon Glass

    Simon Glass
     

24 Jul, 2013

1 commit


25 Jun, 2013

1 commit


13 Mar, 2013

1 commit

  • Refactor linker-generated array code so that symbols
    which were previously linker-generated are now compiler-
    generated. This causes relocation records of type
    R_ARM_ABS32 to become R_ARM_RELATIVE, which makes
    code which uses LGA able to run before relocation as
    well as after.

    Note: this affects more than ARM targets, as linker-
    lists span possibly all target architectures, notably
    PowerPC.

    Conflicts:
    arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds
    arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds
    arch/arm/cpu/armv7/omap-common/u-boot-spl.lds
    board/ait/cam_enc_4xx/u-boot-spl.lds
    board/davinci/da8xxevm/u-boot-spl-da850evm.lds
    board/davinci/da8xxevm/u-boot-spl-hawk.lds
    board/vpac270/u-boot-spl.lds

    Signed-off-by: Albert ARIBAUD

    Albert ARIBAUD
     

04 Feb, 2013

1 commit


12 Dec, 2012

1 commit

  • Provide u-boot console functions to access IO space registers. A no
    thrills implementation, accessing one register at a time.

    For example:
    boot > iod 80
    0080: 00000094
    boot > iod.w 80
    0080: 0094
    boot > iod.b 80
    0080: 94
    boot > iow.b 0x80 12
    boot > iod 0x80
    0080: 00000012

    Signed-off-by: Vadim Bendebury
    Signed-off-by: Simon Glass

    Vadim Bendebury
     

22 Oct, 2012

2 commits

  • The command declaration now uses the new LG-array method to generate
    list of commands. Thus the __u_boot_cmd section is now superseded and
    redundant and therefore can be removed. Also, remove externed symbols
    associated with this section from include/command.h .

    Signed-off-by: Marek Vasut
    Cc: Joe Hershberger
    Cc: Mike Frysinger

    Marek Vasut
     
  • This patch converts the old method of creating a list of command
    onto the new LG-arrays code. The old u_boot_cmd section is converted
    to new u_boot_list_cmd subsection and LG-array macros used as needed.

    Minor adjustments had to be made to the common code to work with the
    LG-array macros, mostly the fixup_cmdtable() calls are now passed the
    ll_entry_start and ll_entry_count instead of linker-generated symbols.

    The command.c had to be adjusted as well so it would use the newly
    introduced LG-array API instead of directly using linker-generated
    symbols.

    Signed-off-by: Marek Vasut
    Cc: Joe Hershberger
    Cc: Mike Frysinger

    Marek Vasut
     

26 Sep, 2012

1 commit


07 Mar, 2012

2 commits


22 Nov, 2011

1 commit

  • Cleanup the cmd_nvedit.c checkpatch warnings, errors and coding style.
    There are 10 wanrings left about the simple_strtoul() function:
    WARNING: simple_strtoul is obsolete, use kstrtoul instead
    #359: FILE: cmd_nvedit.c:359:
    + load_addr = simple_strtoul(argv[2], NULL, 16);

    ...

    total: 0 errors, 10 warnings, 1043 lines checked

    Signed-off-by: Igor Grinberg

    Igor Grinberg
     

18 Oct, 2011

1 commit

  • By default sections are 16-byte aligned on some architectures, but the
    command name structure (struct cmd_tbl_s) does not have padding to
    16 bytes. This reduces the alignment to 4-bytes so that the command
    table can be accessed correctly on any architecture.

    (Note: this needs doing properly)

    Signed-off-by: Simon Glass

    Simon Glass
     

26 Jul, 2011

2 commits


29 Nov, 2010

5 commits


30 Oct, 2010

1 commit

  • By now, the majority of architectures have working relocation
    support, so the few remaining architectures have become exceptions.
    To make this more obvious, we make working relocation now the default
    case, and flag the remaining cases with CONFIG_NEEDS_MANUAL_RELOC.

    Signed-off-by: Wolfgang Denk
    Tested-by: Heiko Schocher
    Tested-by: Reinhard Meyer

    Wolfgang Denk
     

20 Sep, 2010

1 commit

  • fixup_cmdtable() did all work for fixing up the cmdtable,
    if CONFIG_RELOC_FIXUP_WORKS is not defined.

    CONFIG_RELOC_FIXUP_WORKS is missing for i386! I talked
    with Graeme Russ, and he will fix this soon.

    Portions of this work were supported by funding from
    the CE Linux Forum.

    Signed-off-by: Heiko Schocher

    Heiko Schocher
     

05 Jul, 2010

1 commit

  • 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
    Acked-by: Mike Frysinger

    Wolfgang Denk
     

13 Jun, 2009

1 commit

  • In case of incorrect command invocations U-Boot used to print pretty
    useless "usage" messages, for example:

    => nand markbad
    Usage:
    nand - NAND sub-system

    In the result, the user would have to run the "help" command to get
    the (available) information about correct command usage. Change this,
    so that this information gets always printed.

    Note that this changes the user interface of all commands, but
    hopefully to the better.

    Signed-off-by: Wolfgang Denk

    Wolfgang Denk
     

28 Mar, 2009

1 commit


28 Jan, 2009

2 commits


19 Oct, 2008

2 commits


11 Sep, 2008

1 commit


06 Aug, 2008

1 commit


21 May, 2008

1 commit

  • This commit gets rid of a huge amount of silly white-space issues.
    Especially, all sequences of SPACEs followed by TAB characters get
    removed (unless they appear in print statements).

    Also remove all embedded "vim:" and "vi:" statements which hide
    indentation problems.

    Signed-off-by: Wolfgang Denk

    Wolfgang Denk