1. 24 Jun, 2016 1 commit
  2. 23 May, 2016 1 commit
  3. 22 Mar, 2016 1 commit
  4. 14 Mar, 2016 1 commit
  5. 16 Feb, 2015 1 commit
    • Andreas Bießmann's avatar
      tools/imagetool: remove linker script · 1fddd7b6
      Andreas Bießmann authored
      Commit a93648d1 introduced linker generated
      lists for imagetool which is the base for some host tools (mkimage, dumpimage,
      et al.).  Unfortunately some host tool chains do not support the used type of
      linker scripts. Therefore this commit broke these host-tools for them, namely
      FreeBSD and Darwin (OS/X).
      
      This commit tries to fix this. In order to have a clean distinction between host
      and embedded code space we need to introduce our own linker generated list
      instead of re-using the available linker_lists.h provided functionality.  So we
      copy the implementation used in linux kernel script/mod/file2alias.c which has
      the very same problem (cause it is a host tool). This code also comes with an
      abstraction for Mach-O binary format used in Darwin systems.
      Signed-off-by: default avatarAndreas Bießmann <andreas.devel@googlemail.com>
      Cc: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
      1fddd7b6
  6. 29 Jan, 2015 4 commits
  7. 06 Oct, 2014 1 commit
    • Charles Manning's avatar
      tools: socfpga: Add socfpga preloader signing to mkimage · 832472a9
      Charles Manning authored
      Like many platforms, the Altera socfpga platform requires that the
      preloader be "signed" in a certain way or the built-in boot ROM will
      not boot the code.
      
      This change automatically creates an appropriately signed preloader
      from an SPL image.
      
      The signed image includes a CRC which must, of course, be generated
      with a CRC generator that the SoCFPGA boot ROM agrees with otherwise
      the boot ROM will reject the image.
      
      Unfortunately the CRC used in this boot ROM is not the same as the
      Adler CRC in lib/crc32.c. Indeed the Adler code is not technically a
      CRC but is more correctly described as a checksum.
      
      Thus, the appropriate CRC generator is added to lib/ as crc32_alt.c.
      Signed-off-by: default avatarCharles Manning <cdhmanning@gmail.com>
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Chin Liang See <clsee@altera.com>
      Cc: Dinh Nguyen <dinguyen@altera.com>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Cc: Tom Rini <trini@ti.com>
      Cc: Wolfgang Denk <wd@denx.de>
      Cc: Pavel Machek <pavel@denx.de>
      Acked-by: default avatarPavel Machek <pavel@denx.de>
      
      V2: - Zap unused constant
          - Explicitly print an error message in case of error
          - Rework the hdr_checksum() function to take the *header directly
            instead of a plan buffer pointer
      832472a9
  8. 26 May, 2014 1 commit
    • Andreas Bießmann's avatar
      mkimage: add atmelimage · 7b1a4117
      Andreas Bießmann authored
      The new atmelimage converts a machine code BLOB to bootable ROM image. Atmel
      ROM has no sophisticated image format, it only checks the first 7 ARM vectors.
      The vectors can contain valid B or LDR opcodes, the 6'th vector contains the
      image size to load.
      
      Additionally the PMECC header can be written by the atmelimage target. The
      parameters must be given via the -n switch as a coma separated list. For
      example:
      
      mkimage -T atmelimage \
       -n usePmecc=1,sectorPerPage=4,sectorSize=512,spareSize=64,eccBits=4,eccOffset=36 \
       -d spl/u-boot-spl.bin boot.bin
      
      A provided image can be checked for correct header setup. It prints out the
      PMECC header parameters if it has one and the 6'th interrupt vector content.
      
      ---8<---
      Image Type:	ATMEL ROM-Boot Image with PMECC Header
      		PMECC header
      		====================
      		eccOffset:        36
      		sectorSize:      512
      		eccBitReq:         4
      		spareSize:        64
      		nbSectorPerPage:   4
      		usePmecc:          1
      		====================
      		6'th vector has 17044 set
      --->8---
      
      A SPL binary modified with the atmelimage mkimage target was succesfully
      booted on a sama5d34ek via MMC and NAND.
      Signed-off-by: default avatarAndreas Bießmann <andreas.devel@googlemail.com>
      Cc: Bo Shen <voice.shen@atmel.com>
      Cc: Heiko Schocher <hs@denx.de>
      Tested-by: default avatarBo Shen <voice.shen@atmel.com>
      7b1a4117
  9. 17 Apr, 2014 1 commit
  10. 13 Dec, 2013 1 commit
    • Guilherme Maciel Ferreira's avatar
      tools: moved code common to all image tools to a separated module. · f86ed6a8
      Guilherme Maciel Ferreira authored
      In order to avoid duplicating code and keep only one point of modification,
      the functions, structs and defines useful for "dumpimage" were moved from
      "mkimage" to a common module called "imagetool".
      
      This modification also weakens the coupling between image types (FIT, IMX, MXS,
      and so on) and image tools (mkimage and dumpimage). Any tool may initialize the
      "imagetool" through register_image_tool() function, while the image types
      register themselves within an image tool using the register_image_type()
      function:
      
                                                            +---------------+
                                                     +------|   fit_image   |
       +--------------+          +-----------+       |      +---------------+
       |    mkimage   |--------> |           | <-----+
       +--------------+          |           |              +---------------+
                                 | imagetool | <------------|    imximage   |
       +--------------+          |           |              +---------------+
       |  dumpimage   |--------> |           | <-----+
       +--------------+          +-----------+       |      +---------------+
                                                     +------| default_image |
                                                            +---------------+
      
                register_image_tool()           register_image_type()
      
      Also, the struct "mkimage_params" was renamed to "image_tool_params" to make
      clear its general purpose.
      Signed-off-by: default avatarGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      f86ed6a8