1. 07 Oct, 2015 2 commits
  2. 02 Sep, 2015 1 commit
  3. 26 Jul, 2015 1 commit
  4. 10 Feb, 2015 1 commit
  5. 29 Jan, 2015 1 commit
  6. 03 Nov, 2014 1 commit
    • 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
  7. 09 Sep, 2014 1 commit
    • Ye.Li's avatar
      imximage: Fix imximage IVT bug for EIM-NOR boot · 03ea24b2
      Ye.Li authored
      The load region size of EIM-NOR are defined to 0. For this case,
      the parameter "imximage_init_loadsize" must be calculated.
      The imximage tool implements the calculation in the "imximage_generate"
      function, but the following function "imximage_set_header" resets the value
      and not calculate. This bug cause some fields of IVT head are not
      correct, for example the boot_data and DCD overlay the application area.
      Signed-off-by: default avatarYe.Li <B37916@freescale.com>
      03ea24b2
  8. 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
  9. 14 Oct, 2013 1 commit
  10. 27 Sep, 2013 1 commit
  11. 31 Aug, 2013 5 commits
    • Stefano Babic's avatar
      tools: add support for setting the CSF into imximage · 0187c985
      Stefano Babic authored
      Add support for setting the CSF (Command Sequence File) pointer
      which is used for HAB (High Assurance Boot) in the imximage by
      adding e.g.
      
      CSF 0x2000
      
      in the imximage.cfg file.
      
      This will set the CSF pointer accordingly just after the padded
      data image area. The boot_data.length is adjusted with the
      value from the imximage.cfg config file.
      
      The resulting u-boot.imx can be signed with the FSL HAB tooling.
      The generated CSF block needs to be appended to the u-boot.imx.
      Signed-off-by: default avatarStefano Babic <sbabic@denx.de>
      0187c985
    • Stefano Babic's avatar
      tools: add padding of data image file for imximage · 01390aff
      Stefano Babic authored
      Implement function vrec_header to be able to pad the final
      data image file according the what has been calculated for
      boot_data.length.
      Signed-off-by: default avatarStefano Babic <sbabic@denx.de>
      01390aff
    • Stefano Babic's avatar
      tools: dynamically allocate imx_header in imximage · 377e367a
      Stefano Babic authored
      Change to dynamically allocate the imx_header to correctly
      allocate the IVT, Boot Data and DCD at correct locations
      depending on the boot media.
      
      Also check that the Image Vector Table Offset + IVT +
      Boot Data + DCD <= Initial Load Region Size.
      
      Previously struct imx_header was always 4096 bytes and was
      not dealing correctly with the Image Vector Table Offset.
      
      Now, the memory allocation looks for e.g. SD boot like this
      
       Storage   u-boot.imx                             RAM
       Device
      
       00000000                                         177ff000 <--------------
                                                                               |
       00000400  00000000  d1 00 20 40 IVT.header       177ff400 <-------      |
       00000404  00000004  00 00 80 17 IVT.entry        177ff404 -----------   |
       00000408  00000008  00 00 00 00 IVT.reserved1    177ff408        |  |   |
       0000040C  0000000C  2c f4 7f 17 IVT.dcd          177ff40C ------ |  |   |
       00000410  00000010  20 f4 7f 17 IVT.boot         177ff410 ---- | |  |   |
       00000414  00000014  00 f4 7f 17 IVT.self         177ff414 --------  |   |
       00000418  00000018  00 00 00 00 IVT.csf          177ff418    | |    |   |
       0000041C  0000001C  00 00 00 00 IVT.reserved2    177ff41C    | |    |   |
       00000420  00000020  00 f0 7f 17 BootData.start   177ff420 <--- |    | ---
       00000424  00000024  00 60 03 00 BootData.length  177ff424      |    |
       00000428  00000028  00 00 00 00 BootData.plugin  177ff428      |    |
       0000042C  0000002C  d2 03 30 40 DCD.header       177ff42C <-----    |
       ...                                                                 |
       00001000  00000c00  13 00 00 ea U-Boot Start     17800000 <----------
      
      While at it also remove the unused #define HEADER_OFFSET.
      Signed-off-by: default avatarStefano Babic <sbabic@denx.de>
      377e367a
    • Stefano Babic's avatar
      tools: rename mximage_flash_offset to imximage_ivt_offset · 3150f92c
      Stefano Babic authored
      This better reflects the naming from the Reference Manual
      as well as fits better since "flash" is not really applicabe
      for SATA.
      Signed-off-by: default avatarStefano Babic <sbabic@denx.de>
      3150f92c
    • Stefano Babic's avatar
      tools: imx_header should not include flash_offset · 4655d40f
      Stefano Babic authored
      Doing a  make distclean; make mx6qsabresd_config; make
      and      hexdump -C u-boot.imx | less
      
       ...
       00000360  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
       *
       000003f0  00 00 00 00 00 00 00 00  00 00 00 00 00 04 00 00  |................|
                                                      ^^^^^^^^^^^
       00000400  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
       *
       00001000  13 00 00 ea 14 f0 9f e5  14 f0 9f e5 14 f0 9f e5  |...ê.ð.å.ð.å.ð.å|
       ...
      
      shows the flash_offset value being written into the final
      generated image, wich is not correct.
      
      Instead create flash_offset as static variable such that the
      generated image is "clean".
      
       00000360  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
       *
       00001000  13 00 00 ea 14 f0 9f e5  14 f0 9f e5 14 f0 9f e5  |...ê.ð.å.ð.å.ð.å|
      Signed-off-by: default avatarStefano Babic <sbabic@denx.de>
      4655d40f
  12. 16 Aug, 2013 1 commit
  13. 24 Jul, 2013 1 commit
  14. 05 May, 2013 1 commit
    • Marek Vasut's avatar
      imx: Align the imximage header and payload to multiples of 4k · 895d9966
      Marek Vasut authored
      The MX53 ROM loads the data from NAND in multiples of pages and
      supports maximum page size of 4k. Thus, align the image and header
      to 4k to be safe from ROM bugs.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
      Cc: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
      Cc: Fabio Estevam <fabio.estevam@freescale.com>
      Cc: Scott Wood <scottwood@freescale.com>
      Cc: Stefano Babic <sbabic@denx.de>
      Cc: Tom Rini <trini@ti.com>
      895d9966
  15. 28 Apr, 2013 1 commit
    • Marek Vasut's avatar
      tools: arm: imx: Implement BOOT_OFFSET command for imximage · 6cb83829
      Marek Vasut authored
      Implement BOOT_OFFSET command for imximage. This command is parallel
      to current BOOT_FROM command, but allows more flexibility in configuring
      arbitrary image header offset. Also add an imximage.cfg with default
      offset values into arm/arch/imx-common/ so the board-specific imximage.cfg
      can include this file to avoid magic constants.
      
      The syntax of BOOT_OFFSET command is "BOOT_OFFSET <u32 offset>".
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
      Cc: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
      Cc: Fabio Estevam <fabio.estevam@freescale.com>
      Cc: Scott Wood <scottwood@freescale.com>
      Cc: Stefano Babic <sbabic@denx.de>
      Cc: Tom Rini <trini@ti.com>
      Acked-by: default avatarStefano Babic <sbabic@denx.de>
      Acked-by: default avatarStefan Roese <sr@denx.de>
      6cb83829
  16. 28 Jan, 2013 1 commit
  17. 05 Jan, 2013 1 commit
    • Fabio Estevam's avatar
      tools: imximage: Load a size that is multiple of 512 · 1411fb37
      Fabio Estevam authored
      In order to mx53 ROM to properly load the U-boot image, its header size should
      be multiple of 512 bytes.
      
      This issue was observed with gcc 4.6.2/4.7.3, which caused data aborts:
      
      U-Boot 2013.01-rc2-00172-gf8cfcf1b-dirty (Dec 26 2012 - 13:13:28)
      
      Board: MX53 LOCO
      I2C:   ready
      DRAM:  1 GiB
      MMC:   FSL_SDHC: 0, FSL_SDHC: 1
      In:    serial
      Out:   serial
      Err:   serial
      CPU:   Freescale i.MX53 family rev2.1 at 1000 MHz
      Reset cause: WDOG
      Net:   FEC
      Warning: FEC using MAC address from net device
      
      Hit any key to stop autoboot:  0
      data abort
      
          MAYBE you should read doc/README.arm-unaligned-accesses
      
      pc : [<aff72220>]          lr : [<aff721fc>]
      sp : af565e20  ip : af566918     fp : 00000000
      r10: 00000003  r9 : affabb5b     r8 : af565f58
      r7 : 00000000  r6 : 36747fff     r5 : af5668e8  r4 : 36747fff
      r3 : af5668ec  r2 : af5668eb     r1 : 00000000  r0 : af5668e8
      Flags: NzcV  IRQs off  FIQs off  Mode SVC_32
      Resetting CPU ...
      
      resetting ...
      
      ,and this patch fixes it.
      
      Also, even though the ROUND macro is already defined in common.h,
      the reason for redefining it in image.h is explained by Stefano Babic:
      
      "I will remark a previous comment - even if including common.h seems a
      good idea to avoid duplications, it makes tools like mkimage to depend
      on the selected board, because <board>_config must run. Even if this is
      not a problem for us u-boot developers, it becomes an issue when these
      tools are included in distros (like u-boot-tools in Ubuntu) and cannot
      be packaged."
      Signed-off-by: default avatarTroy Kisky <troy.kisky@boundarydevices.com>
      Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
      1411fb37
  18. 20 Oct, 2012 7 commits
  19. 27 Mar, 2012 1 commit
    • Dirk Behme's avatar
      imximage: Remove overwriting of flash_offset · 49d3e272
      Dirk Behme authored
      The flash header supports different flash offsets for different
      boot devices. E.g. parallel NOR or OneNAND use a different offset
      than FLASH_OFFSET_STANDARD (== 0x400).
      
      The flash offset is correctly read from the configuration in
      parse_cfg_cmd(). But is then overwritten wrongly in set_imx_hdr_v1/2().
      
      Fix this by removing this overwriting. Use the flash offset
      correctly read from the configuration, instead.
      
      If there is no flash_offset read from the configuration file, i.e.
      the BOOT_FROM tag is missing, exit with an error message.
      Signed-off-by: default avatarDirk Behme <dirk.behme@de.bosch.com>
      CC: Jason Liu <liu.h.jason@gmail.com>
      CC: Stefano Babic <sbabic@denx.de>
      Tested-by: default avatarStefano Babic <sbabic@denx.de>
      49d3e272
  20. 12 Feb, 2012 2 commits
  21. 01 Feb, 2011 1 commit
  22. 30 Apr, 2010 1 commit
  23. 24 Apr, 2010 1 commit
  24. 23 Feb, 2010 2 commits
  25. 27 Jan, 2010 1 commit
  26. 25 Jan, 2010 1 commit