1. 10 10月, 2014 1 次提交
    • I
      pxe: Ensure we don't overflow bootargs · 64a0c247
      Ian Campbell 提交于
      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: NIan Campbell <ian.campbell@citrix.com>
      [trini: Use %zd not %d in printf for all args]
      Signed-off-by: NTom Rini <trini@ti.com>
      64a0c247
  2. 22 8月, 2014 1 次提交
  3. 09 8月, 2014 2 次提交
    • B
      pxe: detect image format before calling bootm/bootz · 1fb7d0e6
      Bryan Wu 提交于
      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: NBryan Wu <pengw@nvidia.com>
      1fb7d0e6
    • S
      pxe: clear Bootfile before returning · ded2e20e
      Stephen Warren 提交于
      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: NStephen Warren <swarren@nvidia.com>
      Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
      ded2e20e
  4. 19 7月, 2014 1 次提交
  5. 22 2月, 2014 1 次提交
  6. 21 2月, 2014 1 次提交
  7. 05 2月, 2014 3 次提交
    • D
    • S
      pxe: implement fdtdir extlinux.conf tag · c61d94d8
      Stephen Warren 提交于
      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: NStephen Warren <swarren@nvidia.com>
      c61d94d8
    • S
      pxe: support "devicetree" tag · f43c401b
      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: NStephen Warren <swarren@nvidia.com>
      f43c401b
  8. 09 1月, 2014 1 次提交
  9. 05 11月, 2013 1 次提交
  10. 15 10月, 2013 1 次提交
    • S
      Prevent null pointer dereference originating in cmd_pxe.c · 0e3f3f8a
      Steven Falco 提交于
      Pass a valid cmdtp into do_tftpb(), do_ext2load(), and do_get_fat(), to
      avoid possible crashes due to null pointer dereferencing.
      
      Commit d7884e04 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: NSteven A. Falco <stevenfalco@gmail.com>
      0e3f3f8a
  11. 24 9月, 2013 1 次提交
  12. 24 7月, 2013 1 次提交
  13. 25 6月, 2013 10 次提交
  14. 29 3月, 2013 1 次提交
  15. 28 9月, 2012 1 次提交
    • C
      PXE: FDT: Add support for fdt in PXE · a655938a
      Chander Kashyap 提交于
      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: NChander Kashyap <chander.kashyap@linaro.org>
      Acked-by: NJason Hobbs <jason.hobbs@calxeda.com>
      a655938a
  16. 10 8月, 2012 1 次提交
  17. 10 7月, 2012 1 次提交
  18. 22 6月, 2012 6 次提交
  19. 27 3月, 2012 1 次提交
  20. 07 3月, 2012 2 次提交
  21. 21 12月, 2011 1 次提交
  22. 07 12月, 2011 1 次提交