1. 10 6月, 2017 1 次提交
  2. 22 5月, 2017 2 次提交
    • T
      lib: move hash CONFIG options to Kconfig · 089df18b
      Tom Rini 提交于
      Commit 94e3c8c4 ("crypto/fsl - Add progressive hashing support
      using hardware acceleration.") created entries for CONFIG_SHA1,
      CONFIG_SHA256, CONFIG_SHA_HW_ACCEL, and CONFIG_SHA_PROG_HW_ACCEL.
      However, no defconfig has migrated to it.  Complete the move by first
      adding additional logic to various Kconfig files to select this when
      required and then use the moveconfig tool.  In many cases we can select
      these because they are required to implement other drivers.  We also
      correct how we include the various hashing algorithms in SPL.
      
      This commit was generated as follows (after Kconfig additions):
      
      [1] tools/moveconfig.py -y SHA1 SHA256 SHA_HW_ACCEL
      [2] tools/moveconfig.py -y SHA_PROG_HW_ACCEL
      
      Note:
      We cannot move SHA_HW_ACCEL and SHA_PROG_HW_ACCEL simultaneously
      because there is dependency between them.
      
      Cc: Poonam Aggrwal <poonam.aggrwal@freescale.com>
      Cc: Naveen Burmi <NaveenBurmi@freescale.com>
      Cc: Po Liu <po.liu@freescale.com>
      Cc: Shengzhou Liu <Shengzhou.Liu@freescale.com>
      Cc: Priyanka Jain <Priyanka.Jain@freescale.com>
      Cc: Shaohui Xie <Shaohui.Xie@freescale.com>
      Cc: Chunhe Lan <Chunhe.Lan@freescale.com>
      Cc: Chander Kashyap <k.chander@samsung.com>
      Cc: Steve Rae <steve.rae@raedomain.com>
      Cc: Dirk Eibach <eibach@gdsys.de>
      Cc: Feng Li <feng.li_2@nxp.com>
      Cc: Alison Wang <alison.wang@freescale.com>
      Cc: Sumit Garg <sumit.garg@nxp.com>
      Cc: Mingkai Hu <Mingkai.Hu@freescale.com>
      Cc: York Sun <york.sun@nxp.com>
      Cc: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
      Cc: Jaehoon Chung <jh80.chung@samsung.com>
      Cc: Akshay Saraswat <akshay.s@samsung.com>
      Cc: Heiko Schocher <hs@denx.de>
      Cc: Jagan Teki <jagan@amarulasolutions.com>
      Signed-off-by: NTom Rini <trini@konsulko.com>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      Signed-off-by: NTom Rini <trini@konsulko.com>
      089df18b
    • T
      FIT: Rename FIT_DISABLE_SHA256 to FIT_ENABLE_SHA256_SUPPORT · 0db7f685
      Tom Rini 提交于
      We rename CONFIG_FIT_DISABLE_SHA256 to CONFIG_FIT_ENABLE_SHA256_SUPPORT which
      is enabled by default and now a positive option.  Convert the handful of boards
      that were disabling it before to save space.
      
      Cc: Dirk Eibach <eibach@gdsys.de>
      Cc: Lukasz Dalek <luk0104@gmail.com>
      Signed-off-by: NTom Rini <trini@konsulko.com>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      0db7f685
  3. 09 4月, 2017 1 次提交
  4. 17 3月, 2017 1 次提交
  5. 20 1月, 2017 1 次提交
    • R
      bootm: relocate ramdisk if CONFIG_SYS_BOOT_RAMDISK_HIGH set · c2e7e72b
      Rick Altherr 提交于
      In 35fc84fa, bootm was refactored so plain 'bootm' and
      'bootm <subcommand>' shared a common implementation.
      The 'bootm ramdisk' command implementation is now part of the common
      implementation but not invoke by plain 'bootm' since the original
      implementation never did ramdisk relocation.  Instead, ramdisk
      relocation happened in image_setup_linux() which is typically called
      during the OS portion of 'bootm'.
      
      On ARM, parameters to the Linux kernel can either be passed by FDT or
      ATAGS. When using FDT, image_setup_linux() is called which also triggers
      ramdisk relocation.  When using ATAGS, image_setup_linux() is _not_
      called because it mostly does FDT setup.
      
      Instead of calling image_setup_linux() in both FDT and ATAGS cases,
      include BOOTM_STATE_RAMDISK in the requested states during a plain
      'bootm' if CONFIG_SYS_BOOT_RAMDISK_HIGH is set and remove the ramdisk
      relocation from image_setup_linux().  This causes ramdisk relocation to
      happen on any system where CONFIG_SYS_BOOT_RAMDISK_HIGH regardless of
      the OS being booted. Also remove IMAGE_ENABLE_RAMDISK_HIGH as it was
      only used by the now-removed code from image_setup_linux().
      Signed-off-by: NRick Altherr <raltherr@google.com>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NJoel Stanley <joel@jms.id.au>
      c2e7e72b
  6. 15 1月, 2017 1 次提交
  7. 14 1月, 2017 1 次提交
  8. 03 1月, 2017 1 次提交
  9. 04 12月, 2016 2 次提交
  10. 22 11月, 2016 4 次提交
  11. 06 10月, 2016 1 次提交
  12. 16 8月, 2016 1 次提交
  13. 21 7月, 2016 1 次提交
    • M
      image: fix IH_ARCH_... values for uImage compatibility · ff87b081
      Masahiro Yamada 提交于
      Commit 555f45d8 ("image: Convert the IH_... values to enums")
      accidentally changed some IH_ARCH_... values.
      
      Prior to that commit, there existed a gap between IH_ARCH_M68K and
      IH_ARCH_MICROBLAZE, like follows.
      
        #define IH_ARCH_SPARC64         11      /* Sparc 64 Bit */
        #define IH_ARCH_M68K            12      /* M68K         */
        #define IH_ARCH_MICROBLAZE      14      /* MicroBlaze   */
        #define IH_ARCH_NIOS2           15      /* Nios-II      */
      
      The enum conversion broke the compatibility with existing uImage
      files.  Reverting 555f45d8 will cause build error unfortunately,
      so here is a more easy fix.
      
      I dug the git history and figured out the gap was introduced by
      commit 1117cbf2 ("nios: remove nios-32 arch").  So, I revived
      IH_ARCH_NIOS just for filling the gap.
      
      I added comments to each enum block.  Once we assign a value to
      IH_... it is not allowed to change it.
      Acked-by: NMichal Simek <michal.simek@xilinx.com>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      ff87b081
  14. 15 7月, 2016 4 次提交
  15. 25 6月, 2016 1 次提交
  16. 31 5月, 2016 1 次提交
    • M
      Revert "image.h: Tighten up content using handy CONFIG_IS_ENABLED() macro." · 6f41751f
      Masahiro Yamada 提交于
      This reverts commit 56adbb38.
      
      Since commit 56adbb38 ("image.h: Tighten up content using handy
      CONFIG_IS_ENABLED() macro."), I found my boards fail to boot Linux
      because the commit changed the logic of macros it touched.  Now,
      IMAGE_ENABLE_RAMDISK_HIGH and IMAGE_BOOT_GET_CMDLINE are 0 for all
      the boards.
      
      As you can see in include/linux/kconfig.h, CONFIG_IS_ENABLE() (and
      IS_ENABLED() as well) can only take a macro that is either defined
      as 1 or undefined.  This is met for boolean options defined in
      Kconfig.  On the other hand, CONFIG_SYS_BOOT_RAMDISK_HIGH and
      CONFIG_SYS_BOOT_GET_CMDLINE are defined without any value in
      arch/*/include/asm/config.h .  This kind of clean-up is welcome,
      but the options should be moved to Kconfig beforehand.
      
      Moreover, CONFIG_IS_ENABLED(SPL_CRC32_SUPPORT) looks weird.
      It should be either CONFIG_IS_ENABLED(CRC32_SUPPORT) or
      IS_ENABLED(CONFIG_SPL_CRC32_SUPPORT).  But, I see no define for
      CONFIG_SPL_CRC32_SUPPORT anywhere.  Likewise for the other three.
      
      The logic of IMAGE_OF_BOARD_SETUP and IMAGE_OF_SYSTEM_SETUP were
      also changed for SPL.  This can be a problem for boards defining
      CONFIG_SPL_OF_LIBFDT.  I guess it should have been changed to
      IS_ENABLED(CONFIG_OF_BOARD_SETUP).
      
      In the first place, if we replace the references in C code,
      the macros IMAGE_* will go away.
      
        if (IS_ENABLED(CONFIG_OF_BOARD_SETUP) {
                ...
        }
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      6f41751f
  17. 28 5月, 2016 1 次提交
  18. 24 5月, 2016 3 次提交
  19. 15 3月, 2016 6 次提交
    • S
      spl: Add an option to load a FIT containing U-Boot · f1dcee59
      Simon Glass 提交于
      This provides a way to load a FIT containing U-Boot and a selection of device
      tree files. The board can select the correct device tree by probing the
      hardware. Then U-Boot is started with the selected device tree.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      f1dcee59
    • S
      spl: Add a way for boards to select which device tree to load · 4b307f23
      Simon Glass 提交于
      SPL calls this function with each device tree it can find in the FIT. The
      board should implement this function, using whatever hardware detection it
      can muster to determine the correct device tree.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      4b307f23
    • S
      image: Add functions to obtain short names · cef2e514
      Simon Glass 提交于
      Sometimes it is useful to obtain the short name for an Operating System,
      architecture or compression mechanism. Provide functions for this.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      cef2e514
    • S
      fdt: Allow libfdt to be used in SPL · aa34fbc0
      Simon Glass 提交于
      Add an option to enable libfdt in SPL. This can be useful when decoding
      FIT files in SPL.
      
      We need to make sure this option is not enabled in SPL by this change.
      Also this option needs to be enabled in host builds. Si add a new
      IMAGE_USE_LIBFDT #define which can be used in files that are built on the
      host but must also build for U-Boot and SPL.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      aa34fbc0
    • S
      Kconfig: Move CONFIG_FIT and related options to Kconfig · 73223f0e
      Simon Glass 提交于
      There are already two FIT options in Kconfig but the CONFIG options are
      still in the header files. We need to do a proper move to fix this.
      
      Move these options to Kconfig and tidy up board configuration:
      
         CONFIG_FIT
         CONFIG_OF_BOARD_SETUP
         CONFIG_OF_SYSTEM_SETUP
         CONFIG_FIT_SIGNATURE
         CONFIG_FIT_BEST_MATCH
         CONFIG_FIT_VERBOSE
         CONFIG_OF_STDOUT_VIA_ALIAS
         CONFIG_RSA
      
      Unfortunately the first one is a little complicated. We need to make sure
      this option is not enabled in SPL by this change. Also this option is
      enabled automatically in the host builds by defining CONFIG_FIT in the
      image.h file. To solve this, add a new IMAGE_USE_FIT #define which can
      be used in files that are built on the host but must also build for U-Boot
      and SPL.
      
      Note: Masahiro's moveconfig.py script is amazing.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      [trini: Add microblaze change, various configs/ re-applies]
      Signed-off-by: NTom Rini <trini@konsulko.com>
      73223f0e
    • S
      Move CONFIG_OF_LIBFDT to Kconfig · 69e173eb
      Simon Glass 提交于
      Move this option to Kconfig and tidy up existing boards.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      69e173eb
  20. 26 2月, 2016 1 次提交
    • S
      image: Correct the OS location code to work on sandbox · 7a80de46
      Simon Glass 提交于
      A recent change broke the 'bootm' command on sandbox. The root cause is
      using a pointer as an address. Conversion from pointer to address needs to
      use map_to_sysmem() so that sandbox can do the right thing. The problem was
      pre-existing but uncovered by a recent commit.
      
      Fix this. Also move fit_get_end() to the C file to avoid needing to include
      mapmem.h (and thus asm/io.h) everywhere.
      
      Fixes: 1fec3c5d (common/image.c: Make boot_get_ramdisk() perform a check for Android images)
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      7a80de46
  21. 19 11月, 2015 1 次提交
    • N
      tools: zynqimage: Add Xilinx Zynq boot header generation to mkimage · 66eef1e7
      Nathan Rossi 提交于
      As with other platforms vendors love to create their own boot header
      formats. Xilinx is no different and for the Zynq platform/SoC there
      exists the "boot.bin" which is read by the platforms bootrom. This
      format is described to a useful extent within the Xilinx Zynq TRM.
      
      This implementation adds support for the 'zynqimage' to mkimage. The
      implementation only considers the most common boot header which is
      un-encrypted and packed directly after the boot header itself (no
      XIP, etc.). However this implementation does take into consideration the
      other fields of the header for image dumping use cases (vector table and
      register initialization).
      Signed-off-by: NNathan Rossi <nathan@nathanrossi.com>
      Cc: Michal Simek <michal.simek@xilinx.com>
      Cc: Tom Rini <trini@konsulko.com>
      Reviewed-by: NTom Rini <trini@konsulko.com>
      Signed-off-by: NMichal Simek <michal.simek@xilinx.com>
      66eef1e7
  22. 12 10月, 2015 1 次提交
    • J
      Add support for LZ4 decompression algorithm · 027b728d
      Julius Werner 提交于
      This patch adds support for LZ4-compressed FIT image contents. This
      algorithm has a slightly worse compression ration than LZO while being
      nearly twice as fast to decompress. When loading images from a fast
      storage medium this usually results in a boot time win.
      
      Sandbox-tested only since I don't have a U-Boot development system set
      up right now. The code was imported unchanged from coreboot where it's
      proven to work, though. I'm mostly interested in getting this recognized
      by mkImage for use in a downstream project.
      Signed-off-by: NJulius Werner <jwerner@chromium.org>
      Acked-by: NSimon Glass <sjg@chromium.org>
      027b728d
  23. 03 9月, 2015 3 次提交
    • S
      rockchip: Add support for the SPI image · 10b84fe1
      Simon Glass 提交于
      The Rockchip boot ROM requires a particular file format for booting from SPI.
      It consists of a 512-byte header encoded with RC4, some padding and then up
      to 32KB of executable code in 2KB blocks, separated by 2KB empty blocks.
      
      Add support to mkimage so that an SPL image (u-boot-spl-dtb.bin) can be
      converted to this format. This allows booting from SPI flash on supported
      machines.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      10b84fe1
    • S
      rockchip: Add support for the SD image · f9a3c278
      Simon Glass 提交于
      The Rockchip boot ROM requires a particular file format. It consists of
      64KB of zeroes, a 512-byte header encoded with RC4, and then some executable
      code.
      
      Add support to mkimage so that an SPL image (u-boot-spl-dtb.bin) can be
      converted to this format.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      f9a3c278
    • S
      rockchip: Add the rkimage format to mkimage · a131c1f4
      Simon Glass 提交于
      Rockchip SoCs require certain formats for code that they execute, The
      simplest format is a 4-byte header at the start of a binary file. Add
      support for this so that we can create images that the boot ROM understands.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      a131c1f4