24 May, 2019

1 commit

  • Use NXP logo.
    The vendor and board dir not changed, only replace the contents
    of freescale.bmp.

    Signed-off-by: Peng Fan
    (cherry picked from commit 0b381fdf1a45cb06a057724e708ce0bbeee67f4d)
    (cherry picked from commit 836461a95ca8df0f41dacf1d390a966624190524)
    (cherry picked from commit ffbeb365642907957a385fe970fc69adcf87d600)

    Peng Fan
     

05 Apr, 2019

1 commit


03 Apr, 2019

1 commit

  • Parts of the code are using C99 constructs (such as variables declared
    inside loops), but also GNU extensions (such as typeof), so using
    -std=gnu99 is necessary to build with older versions of gcc that don't
    default to building with gnu99.

    It fixes the following build failure:

    ./tools/../lib/crc16.c: In function "crc16_ccitt":
    ./tools/../lib/crc16.c:70:2: error: "for" loop initial declarations are only allowed in C99 mode
    for (int i = 0; i < len; i++)
    ^
    ./tools/../lib/crc16.c:70:2: note: use option -std=c99 or -std=gnu99 to compile your code

    when building the host tools with gcc 4.7.

    Signed-off-by: Thomas Petazzoni
    Reviewed-by: Philipp Tomsich

    Thomas Petazzoni
     

01 Apr, 2019

1 commit

  • Use a single '=' to test string equality for compatibility with non-bash
    shells. Otherwise, if /bin/sh is dash, build fails:

    ./tools/imx8m_image.sh: 15: [: signed_hdmi_imx8m.bin: unexpected operator
    ./tools/imx8m_image.sh: 15: [: signed_hdmi_imx8m.bin: unexpected operator
    ./tools/imx8m_image.sh: 15: [: spl/u-boot-spl-ddr.bin: unexpected operator
    ./tools/imx8m_image.sh: 15: [: spl/u-boot-spl-ddr.bin: unexpected operator
    WARNING './spl/u-boot-spl-ddr.bin' not found, resulting binary is not-functional

    Signed-off-by: Baruch Siach
    Tested-by: Chris Spencer

    Baruch Siach
     

23 Mar, 2019

1 commit


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
     

10 Feb, 2019

3 commits


09 Feb, 2019

2 commits


02 Feb, 2019

5 commits

  • Help message isn't clear over the use of the "-T" option (it's to declare
    the type of image that the tool is operating on), which also is optional
    as it defaults to the default image type. It's also missing a description
    of the "-o" option, so add it.

    Signed-off-by: Martyn Welch

    Martyn Welch
     
  • The utility dumpimage has error paths that display the usage and others
    that exit without displaying usage. Add an explicit help option to
    dumpimage to display the usage and remove it's use in error paths to make
    the error messages more obvious and errors paths more consistent.

    Signed-off-by: Martyn Welch

    Martyn Welch
     
  • There are 3 supported modes of operation:

    1) Show version
    2) List image contents
    3) Extract image component

    Option (1) terminates early, so only options (2) and (3) remain. Remove
    redundant check for these modes.

    Signed-off-by: Martyn Welch

    Martyn Welch
     
  • The dump image utility has very confusing syntax. If called to list image
    contents ("-l") it takes the image name as a positional argument. If the
    utility is called to extract something from the image, the image must be
    provided via the optional argument "-i" as well as the positional argument
    but the value passed in the positional argument will be completely
    ignored.

    Simplify dumpimage by always providing the image as the first positional
    argument. Assume we want to dump something from the image if we do not
    provide the "-l" option for now.

    Signed-off-by: Martyn Welch

    Martyn Welch
     
  • The dumpimage utility errors out in a number of places without providing
    sufficient feedback to allow the user to easily determine what they have
    done wrong. Add addtional error messages to make the cause of the failure
    more obvious.

    Signed-off-by: Martyn Welch

    Martyn Welch
     

30 Jan, 2019

1 commit


28 Jan, 2019

2 commits


26 Jan, 2019

1 commit

  • The dtoc tests need to be adapted to dtoc being changed to output platdata
    structs as const, which has been introduced in commit 7d05d3a8e35f ("dtoc:
    make generated platdata structs const").

    Fixes: 7d05d3a8e35f ("dtoc: make generated platdata structs const")
    Signed-off-by: Simon Goldschmidt
    Reviewed-by: Simon Glass
    Tested-by: Simon Glass

    Simon Goldschmidt
     

24 Jan, 2019

2 commits

  • Bootrom is not capable to work with non aligned bootloader sizes.
    SPL with OF_SEPARATE generates non-align images quite often that's
    why this change is required before OF_SEPARATE enableding.

    Signed-off-by: Michal Simek

    Michal Simek
     
  • The FSBL copies "Total Partition Word Length" * 4 bytes from the boot.bin,
    which implies that the partition size is 4 byte aligned. When writing the
    partition, mkimage calculates "Total Partition Word Length" by dividing
    the size by 4. This implicitly cuts unaligned bytes at the end of the
    added binary.

    Instead of rounding down, the size must be round up to 4 bytes and the
    binary padded accordingly.

    Signed-off-by: Michael Tretter
    Reviewed-by: Alexander Graf
    Signed-off-by: Michal Simek

    Michael Tretter
     

16 Jan, 2019

3 commits


15 Jan, 2019

4 commits


10 Jan, 2019

1 commit

  • To B0[+] chips, dcd_skip needs to be true. For A0 chip, it needs
    to be false, however A0 chip is no longer being supported anymore.
    Considering we are moving code from imx-mkimage to uboot mkimage,
    to make sure we not introduce some surprise, we still keep dcd_skip
    code there.

    Signed-off-by: Peng Fan

    Peng Fan
     

01 Jan, 2019

4 commits


16 Dec, 2018

2 commits

  • Starting from version 8 the GCC, i.e. C compiler, starts complaining about
    possible '\0' terminator loss or, as in this case, garbage copy.

    In function ‘mtk_image_set_gen_header’,
    inlined from ‘mtk_image_set_header’ at tools/mtk_image.c:733:3:
    tools/mtk_image.c:659:2: warning: ‘strncpy’ specified bound 12 equals destination size [-Wstringop-truncation]
    strncpy(hdr->boot.name, bootname, sizeof(hdr->boot.name));
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    In function ‘mtk_brom_parse_imagename’,
    inlined from ‘mtk_image_check_params’ at tools/mtk_image.c:388:9:
    tools/mtk_image.c:325:5: warning: ‘strncpy’ specified bound 32 equals destination size [-Wstringop-truncation]
    strncpy(lk_name, val, sizeof(lk_name));
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Replace it with snprintf() to tell compiler how much room we have in the
    destination buffer for source string.

    Fixes: 3b975a147c3c ("tools: MediaTek: add MTK boot header generation to mkimage")
    Cc: Ryder Lee
    Cc: Weijie Gao
    Signed-off-by: Andy Shevchenko
    Reviewed-by: Weijie Gao

    Andy Shevchenko
     
  • The motivation for this is to allow distributions to distribute all
    possible tools in a generic way, avoiding the need of specific tools
    building for each machine.

    Especially on OpenEmbedded / Yocto Project ecosystem, it is very
    common each BSP to end providing their specific tools when they need
    to generate images for some SoC (e.g MX23 / MX28 in meta-freescale
    case).

    Using this, we can package the tools doing:

    $: make tools-only_defconfig
    $: make tools-only

    Signed-off-by: Otavio Salvador
    [trini: Add MAINTAINERS entry for myself, add to .travis.yml, make
    U-Boot itself buildable to not trip up other frameworks]
    Signed-off-by: Tom Rini

    Otavio Salvador
     

09 Dec, 2018

1 commit

  • The CRC16-CCITT checksum function is useful for space-constrained
    applications (such as obtaining a checksum across a 2KBit or 4KBit
    EEPROM) in boot applications. It has not been accessible from boot
    scripts until now (due to not having a dedicated command and not being
    supported by the hash infrstructure) limiting its applicability
    outside of custom commands.

    This adds the CRC16-CCITT (poly 0x1021, init 0x0) algorithm to the
    list of available hashes and adds a new crc16_ccitt_wd_buf() to make
    this possible.

    Signed-off-by: Philipp Tomsich
    [trini: Fix building crc16.o for SPL/TPL]
    Signed-off-by: Tom Rini

    Philipp Tomsich
     

05 Dec, 2018

2 commits

  • Unfortunately, for some releases the kernel.org toolchain tarball names adhere
    to the following pattern:

    -gcc--nolib--.tar.xz

    e.g.:
    x86_64-gcc-8.1.0-nolibc-aarch64-linux.tar.xz

    while others use the following pattern:

    -gcc--nolib_-.tar.xz

    e.g.:

    x86_64-gcc-7.3.0-nolibc_aarch64-linux.tar.xz

    Notice that the first pattern has dashes throughout, while the second has
    dashes throughout except just before the target architecture which has an
    underscore.

    The "dash throughout" versions from kernel.org are:

    8.1.0, 6.4.0, 5.5.0, 4.9.4, 4.8.5, 4.6.1

    while the "dash and underscore" versions from kernel.org are:

    7.3.0, 4.9.0, 4.8.0, 4.7.3, 4.6.3, 4.6.2, 4.5.1, 4.2.4

    This tweak allows the code to handle both versions. Note that this tweak also
    causes the architecture parsing to get confused and find the following two
    bogus architectures, "2.0" and "64", which are explicitly checked for, and
    removed.

    Signed-off-by: Trevor Woerner
    Reviewed-by: Simon Glass
    Change single quotes to double quotes:
    Signed-off-by: Simon Glass

    Trevor Woerner
     
  • The hexagon toolchain (4.6.1) from kernel.org, for example, was packaged in
    a way that is different from most toolchains. The first entry when unpacking
    most toolchain tarballs is:

    gcc--nolib/-

    e.g.:

    gcc-8.1.0-nolibc/aarch64-linux/

    The first entry of the hexagon toolchain, however, is:

    gcc-4.6.1-nolibc/

    This causes the buildman logic in toolchain.py::ScanPath() to not be able to
    find the "*gcc" executable since it looks in gcc-4.6.1-nolib/{.|bin|usr/bin}
    instead of gcc-4.6.1/hexagon-linux/{.|bin|usr/bin}. Therefore when buildman
    tries to download a set of toolchains that includes hexagon, the script fails.

    This update takes the second line of the tarball unpacking (which works for
    all the toolchains I've tested from kernel.org) and parses it to take the
    first two elements, separated by '/'. It makes this logic a bit more robust.

    Signed-off-by: Trevor Woerner
    Reviewed-by: Simon Glass

    Trevor Woerner
     

03 Dec, 2018

1 commit

  • The rsa signature use a padding algorithm. By default, we use the
    padding pkcs-1.5. In order to add some new padding algorithm, we
    add a padding framework to manage several padding algorithm.
    The choice of the padding is done in the file .its.

    Signed-off-by: Philippe Reynes
    Reviewed-by: Simon Glass

    Philippe Reynes