1. 25 May, 2016 1 commit
  2. 01 Apr, 2016 1 commit
  3. 24 Feb, 2016 1 commit
  4. 25 Jan, 2016 2 commits
  5. 28 May, 2015 1 commit
  6. 18 Apr, 2015 1 commit
  7. 06 Mar, 2015 1 commit
    • Heiko Schocher's avatar
      spl: fix calling "spl export .." more than once · ff6c032e
      Heiko Schocher authored
      running "spl export ..." more than once fails with:
      
      Trying to execute a command out of order
      Trying to execute a command out of order
      Trying to execute a command out of order
      Trying to execute a command out of order
      Trying to execute a command out of order
      Trying to execute a command out of order
      ERROR prep subcommand failed!
      Subcommand failed
      
      reason is commmit:
      35fc84fa: Refactor the bootm command to reduce code duplication
      
      It used "state != BOOTM_STATE_START" but state is a bitfield, so
      check if the bit BOOTM_STATE_START is not set. With this fix,
      "spl export ..." can called more than once ...
      Signed-off-by: default avatarHeiko Schocher <hs@denx.de>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      ff6c032e
  8. 29 Jan, 2015 1 commit
  9. 22 Oct, 2014 1 commit
  10. 30 Aug, 2014 1 commit
    • Tom Rini's avatar
      cmd_bootm.c: Add 'booti' for ARM64 Linux kernel Images · d2b2ffe3
      Tom Rini authored
      The default format for arm64 Linux kernels is the "Image" format,
      described in Documentation/arm64/booting.txt.  This, along with an
      optional gzip compression on top is all that is generated by default.
      The Image format has a magic number within the header for verification,
      a text_offset where the Image must be run from, an image_size that
      includes the BSS and reserved fields.
      
      This does not support automatic detection of a gzip compressed image.
      Signed-off-by: default avatarTom Rini <trini@ti.com>
      d2b2ffe3
  11. 19 Jun, 2014 1 commit
    • Simon Glass's avatar
      bootm: Split out code from cmd_bootm.c · b6396403
      Simon Glass authored
      This file has code in three different categories:
      - Command processing
      - OS-specific boot code
      - Locating images and setting up to boot
      
      Only the first category really belongs in a file called cmd_bootm.c.
      
      Leave the command processing code where it is. Split out the OS-specific
      boot code into bootm_os.c. Split out the other code into bootm.c
      
      Header files and extern declarations are tidied but otherwise no code
      changes are made, to make it easier to review.
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      b6396403
  12. 11 Jun, 2014 1 commit
  13. 05 Jun, 2014 1 commit
    • Heiko Schocher's avatar
      bootm: make use of legacy image format configurable · 21d29f7f
      Heiko Schocher authored
      make the use of legacy image format configurable through
      the config define CONFIG_IMAGE_FORMAT_LEGACY.
      
      When relying on signed FIT images with required signature check
      the legacy image format should be disabled. Therefore introduce
      this new define and enable legacy image format if CONFIG_FIT_SIGNATURE
      is not set. If CONFIG_FIT_SIGNATURE is set disable per default
      the legacy image format.
      Signed-off-by: default avatarHeiko Schocher <hs@denx.de>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Lars Steubesand <lars.steubesand@philips.com>
      Cc: Mike Pearce <mike@kaew.be>
      Cc: Wolfgang Denk <wd@denx.de>
      Cc: Tom Rini <trini@ti.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      21d29f7f
  14. 29 May, 2014 1 commit
  15. 12 May, 2014 1 commit
  16. 08 May, 2014 1 commit
    • Sebastian Siewior's avatar
      image: add support for Android's boot image format · 9ace3fc8
      Sebastian Siewior authored
      This patch adds support for the Android boot-image format. The header
      file is from the Android project and got slightly alterted so the struct +
      its defines are not generic but have something like a namespace. The
      header file is from bootloader/legacy/include/boot/bootimg.h. The header
      parsing has been written from scratch and I looked at
      bootloader/legacy/usbloader/usbloader.c for some details.
      The image contains the physical address (load address) of the kernel and
      ramdisk. This address is considered only for the kernel image.
      The "second image" defined in the image header is currently not
      supported. I haven't found anything that is creating this.
      
      v3 (Rob Herring):
      This is based on http://patchwork.ozlabs.org/patch/126797/ with the
      following changes:
      - Rebased to current mainline
      - Moved android image handling to separate functions in
        common/image-android.c
      - s/u8/char/ in header to fix string function warnings
      - Use SPDX identifiers for licenses
      - Cleaned-up file source information:
        android_image.h is from file include/boot/bootimg.h in repository:
        https://android.googlesource.com/platform/bootable/bootloader/legacy
        The git commit hash is 4205b865141ff2e255fe1d3bd16de18e217ef06a
        usbloader.c would be from the same commit, but it does not appear
        to have been used for any actual code.
      v4:
      - s/andriod/android/
      - Use a separate flag ep_found to track if the entry point has been set
      rather than using a magic value.
      
      Cc: Wolfgang Denk <wd@denx.de>
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Reviewed-by: default avatarTom Rini <trini@ti.com>
      Reviewed-by: default avatarLukasz Majewski <l.majewski@samsung.com>
      9ace3fc8
  17. 18 Apr, 2014 1 commit
  18. 21 Feb, 2014 1 commit
    • Christian Eggers's avatar
      common: Remove invalid endianess conversion · 9c89614d
      Christian Eggers authored
      do_bootm_standanlone() calls ntohl(images->ep) which is wrong because
      endianess conversion has already been done:
      
      do_bootm()
      \-do_bootm_states()
        +-bootm_find_os()
        | \-images.ep = image_get_ep();
        |   \-uimage_to_cpu(hdr->ih_ep);
        \-boot_selected_os()
          \-do_bootm_standanlone()
      
      Without this conversion the code works correctly at least on AT91SAM9G45.
      On big endian systems there should be no difference after applying this
      patch because uimage_to_cpu(x) and ntohl(x) both expand to 'x'.
      Signed-off-by: default avatarChristian Eggers <ceggers@gmx.de>
      9c89614d
  19. 14 Jan, 2014 1 commit
    • Simon Glass's avatar
      bootm: Reinstate special case for standalone images · c5cbe1e2
      Simon Glass authored
      For standalone images, bootm had a special case where the OS boot function
      was NULL but did actually exist. It was just called manually.
      
      This was removed by commit 35fc84fa which checks for the non-existence of
      this function before the special case is examined.
      
      There is no obvious reason why standalone is handled with a special case.
      Adjust the code so that standalone has a normal OS boot function. We still
      need a special case for when the function returns, but at least we can
      avoid the main problem.
      
      This is intended to fix the reported:
      
          ERROR: booting os 'U-Boot' (17) is not supported
      
      but needs testing.
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      c5cbe1e2
  20. 16 Dec, 2013 1 commit
    • Miao Yan's avatar
      common/cmd_bootm: extend do_bootm_vxworks to support the new VxWorks boot interface. · 871a57bb
      Miao Yan authored
      The next version VxWorks adopts device tree (for PowerPC and ARM) as its hardware
      description mechanism. For PowerPC, the boot interface conforms to
      the ePAPR standard, which is:
      
         void (*kernel_entry)(ulong fdt_addr,
                ulong r4 /* 0 */,
                ulong r5 /* 0 */,
                ulong r6 /* EPAPR_MAGIC */, ulong r7 /* IMA size */,
                ulong r8 /* 0 */, ulong r9 /* 0 */)
      
      For ARM, the boot interface is:
      
         void (*kernel_entry)(void *fdt_addr)
      Signed-off-by: default avatarMiao Yan <miao.yan@windriver.com>
      [trini: Fix build error when !CONFIG_OF_FDT is set, typo on PowerPC,
      missing extern ft_fixup_num_cores]
      Signed-off-by: default avatarTom Rini <trini@ti.com>
      871a57bb
  21. 13 Dec, 2013 2 commits
  22. 08 Nov, 2013 1 commit
    • Miao Yan's avatar
      common/cmd_bootm.c: fix subcommand processing in OS specific do_bootm_xxx() functions · 5b629319
      Miao Yan authored
      In commit "5c427e49: use BOOTM_STATE_OS_CMDLINE flag for plain bootm"
      and "3d187b39: Only pass BOOTM_STATE_OS_CMDLINE on PowerPC/MIPS",
      BOOTM_STATE_OS_CMDLINE was added to do_bootm for PowerPC and MIPS. This
      breaks other OSes (vxworks, netbsd, plan9,...) that don't support
      subcommand processing, e.g. they all contain the following code in their
      do_bootm_xxx():
      
          if (flag & BOOTM_STATE_OS_PREP)
                  return 0;
          if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
                  return 1;
      
      which will result a "subcommand not supported" error.
      This patch changes the above logic to:
      
          /* if not go command, pretend everything to be OK */
          if (flag != BOOTM_STATE_OS_GO)
               return 0;
      Signed-off-by: default avatarMiao Yan <miao.yan@windriver.com>
      5b629319
  23. 23 Sep, 2013 1 commit
  24. 20 Sep, 2013 2 commits
    • Frederic Leroy's avatar
      Fix loading freeze when netconsole is active · 8094972d
      Frederic Leroy authored
      Netconsole calls eth_halt() before giving control to another operating
      system.
      But the state machine of netconsole don't take it into account.
      Thus, netconsole calls network functions of an halted network device,
      making the whole system freeze.
      Rather than modifying the state machine of netconsole, we just unregister
      the current network device before booting. It does work because
      nc_send_packet() verifies that the current network device is not null.
      Signed-off-by: default avatarFrédéric Leroy <fredo@starox.org>
      8094972d
    • Paul Burton's avatar
      bootm: use BOOTM_STATE_OS_CMDLINE flag for plain bootm · 5c427e49
      Paul Burton authored
      A plain bootm used to call the architecture specific boot function with
      no flags, but was modified by commit 35fc84fa "Refactor the bootm
      command to reduce code duplication" to call the architecture specific
      boot function multiple times with various flags in sequence. The
      BOOTM_STATE_OS_CMDLINE flag was not used, indeed it seems that at least
      ARM prepares the command line on BOOTM_STATE_OS_PREP. However on MIPS
      since commit 59e8cbdb "MIPS: bootm: refactor initialisation of kernel
      cmdline" the command line is not prepared in response to a
      BOOTM_STATE_OS_PREP flag, only on BOOTM_STATE_OS_CMDLINE or a call with
      no flags. The end result is that a combination of those 2 commits leads
      to MIPS boards booting kernels with no command line arguments.
      
      An extra invocation of the architecture specific boot function with
      BOOTM_STATE_OS_CMDLINE fixes this.
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      5c427e49
  25. 03 Sep, 2013 2 commits
    • Kees Cook's avatar
      bootm: allow correct bounds-check of destination · 315c0ace
      Kees Cook authored
      While nothing presently examines the destination size, it should at
      least be correct so that future users of sys_mapmem() will not be
      surprised. Without this, it might be possible to overflow memory.
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      315c0ace
    • Simon Glass's avatar
      sandbox: Correct compiler warnings in cmd_bootm/cmd_ximg · 628af179
      Simon Glass authored
      Correct the following warnings found with sandbox when compression
      is enabled.
      
      cmd_bootm.c: In function 'bootm_load_os':
      cmd_bootm.c:443:11: warning: passing argument 4 of 'lzop_decompress' from incompatible pointer type [enabled by default]
      /usr/local/google/c/cosarm/src/third_party/u-boot/files/include/linux/lzo.h:31:5: note: expected 'size_t *' but argument is of type 'uint *'
      cmd_ximg.c: In function 'do_imgextract':
      cmd_ximg.c:225:6: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      cmd_ximg.c:225:14: warning: 'hdr' may be used uninitialized in this function [-Wuninitialized]
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      Acked-by: default avatarKees Cook <keescook@chromium.org>
      628af179
  26. 16 Aug, 2013 2 commits
  27. 24 Jul, 2013 1 commit
  28. 17 Jul, 2013 1 commit
    • Simon Glass's avatar
      bootm: Move fixup_silent_linux() earlier in the bootm stages · 576aacdb
      Simon Glass authored
      Before the bootm refactor, fixup_silent_linux() was done only in the
      monolithic bootm case, not in the subcommand case. With the refactor, it
      is done always, which is good. Unfortunately it is done too late, since it
      is the PREP or CMDLINE stages that set up the command line for Linux.
      
      Move fixup_silent_linux() into the LOADOS stage, which is where we find
      out the OS being used, and can thus decide whether to perform this step.
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      576aacdb
  29. 12 Jul, 2013 5 commits
    • Simon Glass's avatar
      bootm: Handle errors consistently · b7a1d134
      Simon Glass authored
      A recent bootm fix left the error path incomplete. If CONFIG_TRACE is
      set it may still not be a supported command, so cover that with the
      unsupported subcommand print.  Once we handle BOOTM_STATE_OS_GO, we can
      just move into the error handler itself, no need for a goto there.
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      [trini: Update slightly based on Simon's changes to also cover
      CONFIG_TRACE/BOOTM_STATE_FAKE_OS_GO]
      Signed-off-by: default avatarTom Rini <trini@ti.com>
      b7a1d134
    • Simon Glass's avatar
      bootm: Use selected configuration for ramdisk and fdt · f320a4d8
      Simon Glass authored
      If a specific configuraion is selected by the bootm command, e.g. with
      'bootm 84000000#recoveryconf' we must honour this for not just the kernel,
      but also the ramdisk and FDT.
      
      In the conversion to using a common fit_image_load() function for loading
      images from FITs (commits a51ec63b and 53f375fa) this feature was lost.
      Reinstate it by passing the selected configuration back from
      fit_image_load() to boot_get_kernel(), then use this configuration
      (which is stored in images->fit_uname_cfg) in both boot_get_ramdisk()
      and boot_get_fdt().
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      f320a4d8
    • Simon Glass's avatar
      blackfin: x86: bootm: Handle PREP stage of bootm · 7af26b16
      Simon Glass authored
      The OS function is now always called with the PREP stage. Adjust the
      remaining bootm OS functions to deal with this correctly.
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      7af26b16
    • Simon Glass's avatar
      bootm: Remove extra OK message · ec390291
      Simon Glass authored
      This is not needed as we already print 'OK' later in all cases.
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      ec390291
    • Tom Rini's avatar
      cmd_bootm.c: Re-order bootm_load_os return check for ELDK4.2 · 970150a1
      Tom Rini authored
      With ELDK4.2 we were getting a warning that load_end may be used
      uninitialized in calling lmb_reserve.  This could not be the case,
      however.  If we re-order the checks (and make them slightly clearer as
      well) the warning goes away.  bootm_load_os may only return 0 on
      success, BOOTM_ERR_OVERLAP in a non-fatal overlap (already covered in
      comments) or a fatal BOOTM_ERR that is covered in the error handler.
      Signed-off-by: default avatarTom Rini <trini@ti.com>
      970150a1
  30. 10 Jul, 2013 2 commits