28 May, 2015

1 commit


20 Apr, 2015

1 commit


19 Apr, 2015

3 commits


10 Oct, 2014

1 commit

  • On a couple of platforms I've tripped over long PXE append lines overflowing
    this array, due to having CONFIG_SYS_CBSIZE == 256. When doing preseeded Debian
    installs it's pretty trivial to exceed that.

    Since the symptom can be a silent hang or a crash add a check. Of course the
    affected boards would also need an increased CBSIZE to actually work.

    Note that due to the printing of the final bootargs string CONFIG_SYS_PBSIZE
    also needs to be sufficiently large.

    Signed-off-by: Ian Campbell
    [trini: Use %zd not %d in printf for all args]
    Signed-off-by: Tom Rini

    Ian Campbell
     

22 Aug, 2014

1 commit


09 Aug, 2014

2 commits

  • Trying bootm for zImage will print out several error message which
    is not necessary for this case. So detect image format firstly, only
    try bootm for legacy and FIT format image then try bootz for others.

    This patch needs new function genimg_get_kernel_addr().

    Signed-off-by: Bryan Wu

    Bryan Wu
     
  • When "pxe boot" downloads the initrd/kernel/DTB, netboot_common() saves
    the downloaded filename to global variable BootFile. If the boot
    operation is aborted, this global state is not cleared. If "dhcp" is
    executed later without any arguments, BootFile is not cleared, and when
    the DHCP response is received, BootpCopyNetParams() writes the value into
    environment variable bootfile.

    This causes the following scenario:

    * Boot script executes dhcp; pxe get; pxe boot

    * User CTRL-C's the PXE menu, which causes the first menu item to be
    booted, which causes some file to be downloaded.

    (This boot-on-CTRL-C behaviour is arguably a bug too, but it's a
    separate bug and the bug this patch fixes would still exist if the user
    simply waited to press CTRL-C until "pxe boot" started downloading
    files)

    * User CTRL-C's the file downloads, but the filename is still written to
    the bootfile environment variable.

    * User re-runs the boot command, which in my case executes "dhcp; pxe get;
    pxe boot" again, and "dhcp" picks up the saved bootfile environment
    variable and proceeds to download a file that it shouldn't.

    To solve this, modify the implementation of "pxe get" to clear BootFile
    if the whole boot operation fails, which avoids this whole mess.

    An alternative would be to modify netboot_common() such that the no-
    arguments case explicitly clears the global variable BootFile. However,
    that would prevent the following command sequences from working:

    $ dhcp filename # downloads "filename"
    $ dhcp # downloads $bootfile, i.e. "filename"

    or:
    $ setenv bootfile filename
    $ dhcp # downloads $bootfile, i.e. "filename"

    ... and I assume someone relies on U-Boot working that way.

    Signed-off-by: Stephen Warren
    Acked-by: Joe Hershberger

    Stephen Warren
     

19 Jul, 2014

1 commit


27 Feb, 2014

1 commit


22 Feb, 2014

1 commit

  • The directory name from an fdtdir directive in a PXE config file should
    always be pre-pended to the DTB filename; it shouldn't matter whether
    the DTB filename came from the $fdtfile environment variable, or whether
    it was constructed dynamically from ${soc}-${board}.dtb. Fix the code to
    always prepend the directory name.

    Reported-by: Dennis Gilmore
    Fixes: c61d94d86035 ("pxe: implement fdtdir extlinux.conf tag")
    Signed-off-by: Stephen Warren
    Reviewed-by: Dennis Gilmore
    Tested-by: Dennis Gilmore

    Stephen Warren
     

21 Feb, 2014

1 commit

  • pxe.c provides both the "pxe" command which relies on a network, and the
    "sysboot" command which doesn't. Fix the file to compile when network
    support isn't enabled. This is useful e.g. on the Raspberry Pi which has
    no network support yet, but will soon support the sysboot command.

    Signed-off-by: Stephen Warren

    Stephen Warren
     

05 Feb, 2014

3 commits

  • Signed-off-by: Dennis Gilmore

    Dennis Gilmore
     
  • People who write (or scripts that auto-generate) extlinux.conf don't
    want to know about HW-specific information such as FDT filenames. Create
    a new extlinux.conf tag "fdtdir" that specifies only the directory where
    FDT files are located, and defer all knowledge of the filename to U-Boot.
    The algorithm implemented is:

    ==========
    if $fdt_addr_r is set:
    if "fdt" tag was specified in extlinux.conf:
    load the FDT from the filename in the tag
    else if "fdtdir" tag was specified in extlinux.conf:
    if "fdtfile" is set in the environment:
    load the FDT from filename in "$fdtfile"
    else:
    load the FDT from some automatically generated filename

    if no FDT file was loaded, and $fdtaddr is set:
    # This indicates an FDT packaged with firmware
    use the FDT at $fdtaddr
    ==========

    A small part of an example /boot/extlinux.conf might be:

    ==========
    LABEL primary
    LINUX zImage
    FDTDIR ./

    LABEL failsafe
    LINUX bkp/zImage
    FDTDIR bkp/
    ==========

    ... with /boot/tegra20-seaboard.dtb or /boot/bkp/tegra20-seaboard.dtb
    being loaded by the sysboot/pxe code.

    Signed-off-by: Stephen Warren

    Stephen Warren
     
  • The specification for extlinux.conf[1] states that "fdt" is an alias for
    "devicetree". To date, U-Boot only implements "fdt". Rectify that.

    [1] http://freedesktop.org/wiki/Specifications/BootLoaderSpec/

    Signed-off-by: Stephen Warren

    Stephen Warren
     

09 Jan, 2014

1 commit


05 Nov, 2013

1 commit

  • pxelinux and syslinux differ in their handling of absolute paths in menu
    files. A pxelinux path is aways prepended with the bootfile path while
    syslinux allows for absolute paths. u-boot was always treating a leading
    / as an absolute path breaking some pxelinux setups. Fix this by adding
    a flag to distinguish pxelinux vs. syslinux behavior.

    Reported-by: Ian Campbell
    Signed-off-by: Rob Herring

    Rob Herring
     

15 Oct, 2013

1 commit

  • Pass a valid cmdtp into do_tftpb(), do_ext2load(), and do_get_fat(), to
    avoid possible crashes due to null pointer dereferencing.

    Commit d7884e047d08447dfd1374e9fa2fdf7ab36e56f5 does not go far enough.
    There is still at least one call chain that can result in a crash.

    The do_tftpb(), do_ext2load(), and do_get_fat() functions expect a valid
    cmdtp. Passing in NULL is particularly bad in the do_tftpb() case,
    because eventually boot_get_kernel() will be called with a NULL cmdtp:

    do_tftpb() -> netboot_common() -> bootm_maybe_autostart() -> do_bootm()
    -> do_bootm_states() -> bootm_find_os() -> boot_get_kernel()

    Around line 991 in cmd_bootm.c, boot_get_kernel() will dereference the
    null pointer, and the board will crash.

    Signed-off-by: Steven A. Falco

    Steven Falco
     

24 Sep, 2013

1 commit


24 Jul, 2013

1 commit


25 Jun, 2013

10 commits


29 Mar, 2013

1 commit

  • Selecting menu items is currently done in menu_interactive_choice()
    by reading the user input strings from standard input.

    Extend menu_interactive_choice() to support user defined function
    for selecting menu items. This function and its argument can be
    specified when creating the menu.

    Signed-off-by: Pali Rohár
    Signed-off-by: Anatolij Gustschin

    Pali Rohár
     

28 Sep, 2012

1 commit

  • Now DT support is becoming common for all new SoC's. Hence it is better
    to have option for getting specific FDT from the remote server.

    This patch adds support for new label i.e. 'fdt'. This will allow to
    retrieve 'fdt blob' from the remote server. This patch take care for
    the following scenarios.

    The usage of fdt is optional.
    The 'fdt blob' can be retrieved from tftp or can be available locally
    or can be absent.

    If 'fdt_addr_r' environment variable is set and 'fdt' label is defined
    retrieve 'fdt blob' from tftp. 'fdt_addr_r' is then passed along bootm
    command.

    If 'fdt_addr' is set and 'fdt blob' is not retrieved from the tftp pass
    'fdt_addr' to bootm command. In this case 'fdt blob' will be available
    at 'fdt_addr'.

    If 'fdt_addr' is not set and 'fdt blob' is not retrieve from tftp pass
    NULL to boot command. In this case 'fdt blob' is not required and absent.

    Signed-off-by: Chander Kashyap
    Acked-by: Jason Hobbs

    Chander Kashyap
     

10 Aug, 2012

1 commit


10 Jul, 2012

1 commit


22 Jun, 2012

5 commits