Skip to content
Snippets Groups Projects
  1. Jan 11, 2015
    • Andreas Bießmann's avatar
      tools/kwbimage.c: fix parser error handling · f411b8f2
      Andreas Bießmann authored
      
      The two error checks for image_boot_mode_id and image_nand_ecc_mode_id where
      wrong and would never fail, fix that!
      
      This was detected by Apple's clang compiler:
      ---8<---
        HOSTCC  tools/kwbimage.o
      tools/kwbimage.c:553:20: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                      if (el->bootfrom < 0) {
                          ~~~~~~~~~~~~ ^ ~
      tools/kwbimage.c:571:23: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                      if (el->nandeccmode < 0) {
                          ~~~~~~~~~~~~~~~ ^ ~
      2 warnings generated.
      --->8---
      
      Signed-off-by: default avatarAndreas Bießmann <andreas.devel@googlemail.com>
      Acked-By: default avatarJeroen Hofstee <jeroen@myspectrum.nl>
      f411b8f2
  2. Jan 10, 2015
  3. Dec 29, 2014
  4. Dec 19, 2014
  5. Dec 14, 2014
  6. Dec 11, 2014
  7. Nov 27, 2014
  8. Nov 25, 2014
  9. Nov 21, 2014
  10. Nov 20, 2014
  11. Nov 10, 2014
  12. Nov 07, 2014
    • Dominic Sacré's avatar
      tools/env: Fix environment size and CRC on 64-bit hosts · ea19527c
      Dominic Sacré authored
      
      On architectures where 'long' is 64 bit, the u-boot environment
      as seen by the fw_env tools was missing 4 bytes.
      This patch fixes getenvsize(), and thus also ensures that the
      environment's CRC32 checksum is calculated correctly.
      
      Signed-off-by: default avatarDominic Sacré <dominic.sacre@gmx.de>
      Cc: Wolfgang Denk <wd@denx.de>
      Cc: Tom Rini <trini@ti.com>
      ea19527c
    • Masahiro Yamada's avatar
      kbuild: sync top Makefile with Linux 3.18-rc1 · ffe29ebc
      Masahiro Yamada authored
      
      Since Linux 3.15, relative path feature and related fixes,
      cleanups have been merged to the top Makefile.
      
      The relative path feature looks stable enough, so let's import it
      to U-Boot along with various cleanups.
      
      Commits imported from Linux (some need adjustment) are:
      
      [1] commit 7e1c04779efd by Michal Marek
        kbuild: Use relative path for $(objtree)
      
      [2] commit 890676c65d69 by Michal Marek
        kbuild: Use relative path when building in the source tree
      
      [3] commit 9da0763bdd82 by Michal Marek
        kbuild: Use relative path when building in a subdir of the source tree
      
      [4] commit c2e28dc975ea by Michal Marek
        kbuild: Print the name of the build directory
      
      [5] commit 066b7ed95580 by Michal Marek
        kbuild: Do not print the build directory with make -s
      
      [6] commit 3f1d9a6cec01 by Michal Marek
        kbuild: make -s should be used with kernelrelease/kernelversion/image_name
      
      [7] commit 7ff525712acf by Masahiro Yamada
        kbuild: fake the "Entering directory ..." message more simply
      
      [8] commit 745a254322c8 by Masahiro Yamada
        kbuild: use $(Q) for sub-make target
      
      [9] commit aa55c8e2f7a3 by Masahiro Yamada
        kbuild: handle C=... and M=... after entering into build directory
      
      [10] commit ab7474ea5361 by Borislav Petkov
        Kbuild: Ignore GREP_OPTIONS env variable
      
      To use relative path feature, tools/Makefile and scripts/Makefile.autoconf
      must be tweaked.
      
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      ffe29ebc
  13. Nov 04, 2014
  14. Nov 03, 2014
    • Ye.Li's avatar
      imximage: Fix the bootdata.size calculation · de979804
      Ye.Li authored
      
      In system boot chapter of i.MX6 reference manual, the "Image Vector Table"
      figure shows the bootdata.start points to the beginning of the destination
      memory. It means the bootdata.size should contain the IVT offset part,
      but the calculation in imximage tool does not have.
      
      We found this issue when booting from QuadSPI NOR on i.MX6SX. The u-boot
      runs into abnormal (crash or stop) after booting. After checked the destination
      memory where the image is loaded to, there are hundreds of bytes at
      the image end are not loaded into memory. Since there is a 4096 bytes
      round in the calculation, for the booting devices using smaller IVT offset,
      such as SD and SPI booting, they are not easy to reproduce.
      
      Signed-off-by: default avatarYe.Li <B37916@freescale.com>
      de979804
  15. Oct 30, 2014
    • Stefan Roese's avatar
      tools/kwbimage: Fix compilation warning · 934a529f
      Stefan Roese authored
      
      This patch fixes a compilation warning of kwbimage.c:
      
      tools/kwbimage.c: In function ‘kwbimage_set_header’:
      tools/kwbimage.c:784:8: warning: ‘headersz’ may be used uninitialized in this function [-Wmaybe-uninitialized]
        memcpy(ptr, image, headersz);
              ^
      Instead of using multiple if statements, use a switch statement with
      a default entry. And return with error if an unsupported version
      is configured in the cfg file.
      
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      Acked-By: default avatarWolfgang Denk <wd@denx.de>
      934a529f
    • Andreas Bießmann's avatar
      tools/kwbimage.c: fix build on darwin · e5f1a586
      Andreas Bießmann authored
      
      kwbimage uses get_current_dir_name(3) which is a gnu extension and not
      available on darwin host. Fix this by converting to portable getcwd(3)
      function.
      
      This patch fixes the following error:
      ---8<---
        HOSTCC  tools/kwbimage.o
      tools/kwbimage.c:399:16: warning: implicit declaration of function 'get_current_dir_name' is invalid in C99 [-Wimplicit-function-declaration]
                              char *cwd = get_current_dir_name();
                                          ^
      tools/kwbimage.c:399:10: warning: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int' [-Wint-conversion]
                              char *cwd = get_current_dir_name();
                                    ^     ~~~~~~~~~~~~~~~~~~~~~~
      2 warnings generated.
      ...
      Undefined symbols for architecture x86_64:
        "_get_current_dir_name", referenced from:
            _image_headersz_v1 in kwbimage.o
      ld: symbol(s) not found for architecture x86_64
      --->8---
      
      Signed-off-by: default avatarAndreas Bießmann <andreas.devel@googlemail.com>
      Cc: Stefan Roese <sr@denx.de>
      Acked-by: default avatarStefan Roese <sr@denx.de>
      [agust: fixed getcwd() return warning]
      Signed-off-by: default avatarAnatolij Gustschin <agust@denx.de>
      e5f1a586
  16. Oct 27, 2014
    • Andreas Bießmann's avatar
    • Marek Vasut's avatar
      ppc: Zap Hymod board · 5038d7f1
      Marek Vasut authored
      
      Remove this board as this is the only one last user of eeprom_probe(),
      which is pretty non-standard stuff.
      
      This patch also removes all the PHP, SQL and CSS stuff from U-Boot,
      which probably makes U-Boot a bit less IoT ;-)
      
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
      Cc: Tom Rini <trini@ti.com>
      Cc: Wolfgang Denk <wd@denx.de>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Heiko Schocher <hs@denx.de>
      5038d7f1
    • Andreas Bießmann's avatar
      tools/socfpgaimage.c: fix build on darwin · 686ed2c2
      Andreas Bießmann authored
      
      socfpgaimage utilizes htole32 and friends, unfortunately these functions are
      not available on darwin. Fix it by using the cpu_to_le32 and friends defined
      in compiler.h as other parts in mkimage do.
      
      This patch fixes the following error:
      ---8<---
        HOSTCC  tools/socfpgaimage.o
      tools/socfpgaimage.c:77:22: warning: implicit declaration of function 'htole32' is invalid in C99 [-Wimplicit-function-declaration]
              header.validation = htole32(VALIDATION_WORD);
                                  ^
      tools/socfpgaimage.c:80:22: warning: implicit declaration of function 'htole16' is invalid in C99 [-Wimplicit-function-declaration]
              header.length_u32 = htole16(length_bytes/4);
                                  ^
      tools/socfpgaimage.c:95:6: warning: implicit declaration of function 'le32toh' is invalid in C99 [-Wimplicit-function-declaration]
              if (le32toh(header.validation) != VALIDATION_WORD)
                  ^
      tools/socfpgaimage.c:97:6: warning: implicit declaration of function 'le16toh' is invalid in C99 [-Wimplicit-function-declaration]
              if (le16toh(header.checksum) != hdr_checksum(&header))
                  ^
      4 warnings generated.
      ...
        HOSTLD  tools/dumpimage
      Undefined symbols for architecture x86_64:
        "_htole16", referenced from:
            _socfpgaimage_set_header in socfpgaimage.o
        "_htole32", referenced from:
            _socfpgaimage_set_header in socfpgaimage.o
        "_le16toh", referenced from:
            _verify_buffer in socfpgaimage.o
        "_le32toh", referenced from:
            _verify_buffer in socfpgaimage.o
      ld: symbol(s) not found for architecture x86_64
      --->8---
      
      Signed-off-by: default avatarAndreas Bießmann <andreas.devel@googlemail.com>
      Acked-by: default avatarPavel Machek <pavel@denx.de>
      686ed2c2
  17. Oct 23, 2014
  18. Oct 06, 2014
    • 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
  19. Sep 24, 2014
  20. Sep 21, 2014
  21. Sep 18, 2014
Loading