09 Mar, 2019

1 commit

  • FIT header verification in mkimage was treating a return code as a boolean,
    which meant that failures in validating the fit were seen as successes.

    Additionally, mkimage was checking all formats to find a header which
    passes validation, rather than using the image type specified to
    mkimage.

    checkpatch.pl checks for lines ending with '(' and alignment matching
    open parentheses are ignored to keep with existing coding style.

    Signed-off-by: Jordan Hand

    Jordan Hand
     

11 Jul, 2018

1 commit


07 May, 2018

1 commit

  • When U-Boot started using SPDX tags we were among the early adopters and
    there weren't a lot of other examples to borrow from. So we picked the
    area of the file that usually had a full license text and replaced it
    with an appropriate SPDX-License-Identifier: entry. Since then, the
    Linux Kernel has adopted SPDX tags and they place it as the very first
    line in a file (except where shebangs are used, then it's second line)
    and with slightly different comment styles than us.

    In part due to community overlap, in part due to better tag visibility
    and in part for other minor reasons, switch over to that style.

    This commit changes all instances where we have a single declared
    license in the tag as both the before and after are identical in tag
    contents. There's also a few places where I found we did not have a tag
    and have introduced one.

    Signed-off-by: Tom Rini

    Tom Rini
     

25 Jun, 2016

1 commit

  • Embedding timestamps in FIT images results in unreproducible builds
    for targets that generate a fit image, such as dra7xx_evm.

    This patch uses the SOURCE_DATE_EPOCH environment variable, when set,
    to use specified value for the date.

    Thanks to HW42 for debugging the issue and providing the patch:

    https://lists.alioth.debian.org/pipermail/reproducible-builds/Week-of-Mon-20160606/005722.html

    For more information about reproducible builds and the
    SOURCE_DATE_EPOCH specification:

    https://reproducible-builds.org/specs/source-date-epoch/
    https://reproducible-builds.org/

    Signed-off-by: Vagrant Cascadian
    Reviewed-by: Simon Glass

    Vagrant Cascadian
     

23 May, 2016

1 commit

  • Some build systems want to be quiet unless there is a problem. At present
    mkimage displays quite a bit of information when generating a FIT file. Add
    a '-q' flag to silence this.

    Signed-off-by: Simon Glass
    Acked-by: Joe Hershberger

    Simon Glass
     

23 Mar, 2016

1 commit


15 Mar, 2016

1 commit


17 Feb, 2015

1 commit

  • Commit a93648d197df48fa46dd55f925ff70468bd81c71 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: Andreas Bießmann
    Cc: Guilherme Maciel Ferreira

    Andreas Bießmann
     

30 Jan, 2015

4 commits


06 Oct, 2014

1 commit

  • 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: Charles Manning
    Signed-off-by: Marek Vasut
    Cc: Chin Liang See
    Cc: Dinh Nguyen
    Cc: Albert Aribaud
    Cc: Tom Rini
    Cc: Wolfgang Denk
    Cc: Pavel Machek
    Acked-by: Pavel Machek

    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

    Charles Manning
     

27 May, 2014

1 commit

  • 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.

    ---88---

    A SPL binary modified with the atmelimage mkimage target was succesfully
    booted on a sama5d34ek via MMC and NAND.

    Signed-off-by: Andreas Bießmann
    Cc: Bo Shen
    Cc: Heiko Schocher
    Tested-by: Bo Shen

    Andreas Bießmann
     

18 Apr, 2014

1 commit


13 Dec, 2013

1 commit

  • 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 |--------> | | | |
    Signed-off-by: Simon Glass

    Guilherme Maciel Ferreira