1. 07 Sep, 2016 1 commit
    • York Sun's avatar
      pxe: Fix pxe boot with FIT image · f63963f0
      York Sun authored
      When FIT image is used, a single image provides kernel, device
      tree and optionally ramdisk. Argc and argv need to be adjusted
      to support this.
      
      Test cases:
      	1. Booting with legacy images
      	2. Booting with legacy images without initrd
      	3. Booting with FIT image
      Test commands:
      	1. pxe get && pxe boot
      	2. sysboot
      Signed-off-by: default avatarYork Sun <york.sun@nxp.com>
      Signed-off-by: default avatarWenbin Song <wenbin.song@nxp.com>
      f63963f0
  2. 06 Feb, 2016 1 commit
  3. 25 Jan, 2016 2 commits
  4. 27 Jul, 2015 1 commit
    • Stephen Warren's avatar
      pxe: add AArch64 image support · 8b5c738b
      Stephen Warren authored
      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: default avatarStephen Warren <swarren@nvidia.com>
      Signed-off-by: default avatarTom Warren <twarren@nvidia.com>
      8b5c738b
  5. 27 May, 2015 1 commit
  6. 19 Apr, 2015 1 commit
  7. 18 Apr, 2015 3 commits
  8. 10 Oct, 2014 1 commit
    • Ian Campbell's avatar
      pxe: Ensure we don't overflow bootargs · 64a0c247
      Ian Campbell authored
      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: default avatarIan Campbell <ian.campbell@citrix.com>
      [trini: Use %zd not %d in printf for all args]
      Signed-off-by: default avatarTom Rini <trini@ti.com>
      64a0c247
  9. 21 Aug, 2014 1 commit
  10. 09 Aug, 2014 2 commits
    • Bryan Wu's avatar
      pxe: detect image format before calling bootm/bootz · 1fb7d0e6
      Bryan Wu authored
      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: default avatarBryan Wu <pengw@nvidia.com>
      1fb7d0e6
    • Stephen Warren's avatar
      pxe: clear Bootfile before returning · ded2e20e
      Stephen Warren authored
      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: default avatarStephen Warren <swarren@nvidia.com>
      Acked-by: default avatarJoe Hershberger <joe.hershberger@ni.com>
      ded2e20e
  11. 18 Jul, 2014 1 commit
  12. 21 Feb, 2014 2 commits
  13. 04 Feb, 2014 3 commits
    • Dennis Gilmore's avatar
    • Stephen Warren's avatar
      pxe: implement fdtdir extlinux.conf tag · c61d94d8
      Stephen Warren authored
      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: default avatarStephen Warren <swarren@nvidia.com>
      c61d94d8
    • Stephen Warren's avatar
      pxe: support "devicetree" tag · f43c401b
      Stephen Warren authored
      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: default avatarStephen Warren <swarren@nvidia.com>
      f43c401b
  14. 09 Jan, 2014 1 commit
  15. 04 Nov, 2013 1 commit
  16. 14 Oct, 2013 1 commit
    • Steven Falco's avatar
      Prevent null pointer dereference originating in cmd_pxe.c · 0e3f3f8a
      Steven Falco authored
      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: default avatarSteven A. Falco <stevenfalco@gmail.com>
      0e3f3f8a
  17. 24 Sep, 2013 1 commit
  18. 24 Jul, 2013 1 commit
  19. 25 Jun, 2013 10 commits
  20. 29 Mar, 2013 1 commit
  21. 27 Sep, 2012 1 commit
    • Chander Kashyap's avatar
      PXE: FDT: Add support for fdt in PXE · a655938a
      Chander Kashyap authored
      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: default avatarChander Kashyap <chander.kashyap@linaro.org>
      Acked-by: default avatarJason Hobbs <jason.hobbs@calxeda.com>
      a655938a
  22. 09 Aug, 2012 1 commit
  23. 10 Jul, 2012 1 commit
  24. 21 Jun, 2012 1 commit