1. 01 Feb, 2017 1 commit
    • Mario Six's avatar
      tools: kwbimage: Fix dest addr · 94084eea
      Mario Six authored
      To enable secure boot, we need to jump back into the BootROM to continue
      the SoC's boot process instead of letting the SPL load and run the main
      U-Boot image.
      
      But, since the u-boot-spl.img (including the 64 byte header) is loaded
      by the SoC as the main image, we need to compensate for the header
      length to get a correct entry point.
      
      Thus, we subtract the header size from the destination address, so that
      the execution address points at the actual entry point of the image.
      
      The current boards ignore both parameters anyway, so this change shouldn't
      concern them.
      Signed-off-by: default avatarMario Six <mario.six@gdsys.cc>
      Reviewed-by: default avatarStefan Roese <sr@denx.de>
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      94084eea
  2. 01 Dec, 2016 2 commits
  3. 29 Nov, 2015 3 commits
  4. 17 Nov, 2015 1 commit
    • Stefan Roese's avatar
      tools/kwbimage.c: Fix generation of binary header · ea8b6877
      Stefan Roese authored
      The binary header ends with one lword, defining if another header
      follows this one. This additions 4 bytes need to be taken into
      account in the generation of the header size. And the complete
      4 bytes at the end of this binary header need to get cleared.
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      Cc: Luka Perkov <luka.perkov@sartura.hr>
      Cc: Kevin Smith <kevin.smith@elecsyscorp.com>
      ea8b6877
  5. 21 Oct, 2015 1 commit
  6. 01 Oct, 2015 1 commit
  7. 24 Jul, 2015 2 commits
  8. 14 Jun, 2015 1 commit
  9. 05 Mar, 2015 1 commit
  10. 07 Feb, 2015 1 commit
  11. 06 Feb, 2015 1 commit
  12. 29 Jan, 2015 1 commit
  13. 11 Jan, 2015 1 commit
    • 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
  14. 10 Jan, 2015 1 commit
  15. 04 Nov, 2014 1 commit
  16. 30 Oct, 2014 2 commits
    • 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
  17. 23 Oct, 2014 1 commit
    • Stefan Roese's avatar
      tools: kwbimage: Add image version 1 support for Armada XP / 370 · 4acd2d24
      Stefan Roese authored
      This patch integrates the Barebox version of this kwbimage.c file into
      U-Boot. As this version supports the image version 1 type for the
      Armada XP / 370 SoCs.
      
      It was easier to integrate the existing and known to be working Barebox
      source than to update the current U-Boot version to support this
      v1 image header format. Now all Marvell MVEBU SoCs are supported:
      
      Image type 0: Kirkwood & Dove
      Image type 1: Armada 370 & Armada XP
      
      Please note that the current v1 support has this restuction (same as
      has Barebox version):
      
      Not implemented: support for the register headers and secure headers
      in v1 images
      
      Tested on Marvell DB-78460-BP eval board.
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      Tested-by: default avatarLuka Perkov <luka@openwrt.org>
      4acd2d24
  18. 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
  19. 16 Aug, 2013 1 commit
  20. 24 Jul, 2013 1 commit
  21. 12 May, 2011 1 commit
  22. 18 Jan, 2011 1 commit
  23. 03 Oct, 2009 3 commits
  24. 15 Sep, 2009 1 commit
  25. 11 Sep, 2009 1 commit
  26. 10 Sep, 2009 1 commit