Skip to content
Snippets Groups Projects
  1. Jan 22, 2018
    • Heinrich Schuchardt's avatar
      tools: provide a tool to convert a binary file to an include · ac020196
      Heinrich Schuchardt authored
      
      For testing EFI disk management we need an in-memory image of
      a disk.
      
      The tool file2include converts a file to a C include. The file
      is separated into strings of 8 bytes. Only the non-zero strings
      are written to the include. The output format has been designed
      to maintain readability.
      
       #define EFI_ST_DISK_IMG { 0x00010000, { \
        {0x000001b8, "\x94\x37\x69\xfc\x00\x00\x00\x00"}, /* .7i..... */ \
        {0x000001c0, "\x02\x00\x83\x02\x02\x00\x01\x00"}, /* ........ */ \
        {0x000001c8, "\x00\x00\x7f\x00\x00\x00\x00\x00"}, /* ........ */ \
        {0x000001f8, "\x00\x00\x00\x00\x00\x00\x55\xaa"}, /* ......U. */ \
       ...
        {0x00006000, "\x48\x65\x6c\x6c\x6f\x20\x77\x6f"}, /* Hello wo */ \
        {0x00006008, "\x72\x6c\x64\x21\x0a\x00\x00\x00"}, /* rld!.... */ \
        {0, NULL} } }
      
      As the disk image needed for testing contains mostly zeroes a high
      compression ratio can be attained.
      
      Signed-off-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
      Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
      ac020196
  2. Jan 21, 2018
  3. Jan 19, 2018
  4. Jan 16, 2018
  5. Jan 12, 2018
  6. Jan 09, 2018
    • Konstantin Porotchkin's avatar
      tools: Add Marvell recovery image download script · eee4835d
      Konstantin Porotchkin authored
      
      Introduce the recovery image download script for usage with
      Marvell Armada SoC families (excepting 37xx family).
      Since Marvell BootROM uses a sliding window in UART buffer
      for detecting escape sequence during the boot, it's easier
      to interrupt the normal boot flow by sending a long stream
      of chained escape sequences to the serial port instead of
      periodically sending a single escape sequence as it is done
      by kwboot utility.
      Additional benefit of using this script is the ability to
      adjust the escape sequence stream length withoiut need for
      compilation.
      
      Signed-off-by: default avatarKonstantin Porotchkin <kostap@marvell.com>
      Cc: Stefan Roese <sr@denx.de>
      Cc: Igal Liberman <igall@marvell.com>
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      eee4835d
  7. Dec 18, 2017
  8. Dec 13, 2017
    • Simon Glass's avatar
      binman: Add documentation for the symbol feature · 39c1502c
      Simon Glass authored
      
      Add this feature to the README.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarLukasz Majewski <lukma@denx.de>
      39c1502c
    • Simon Glass's avatar
      binman: Support accessing binman tables at run time · 19790632
      Simon Glass authored
      
      Binman construct images consisting of multiple binary files. These files
      sometimes need to know (at run timme) where their peers are located. For
      example, SPL may want to know where U-Boot is located in the image, so
      that it can jump to U-Boot correctly on boot.
      
      In general the positions where the binaries end up after binman has
      finished packing them cannot be known at compile time. One reason for
      this is that binman does not know the size of the binaries until
      everything is compiled, linked and converted to binaries with objcopy.
      
      To make this work, we add a feature to binman which checks each binary
      for symbol names starting with '_binman'. These are then decoded to figure
      out which entry and property they refer to. Then binman writes the value
      of this symbol into the appropriate binary. With this, the symbol will
      have the correct value at run time.
      
      Macros are used to make this easier to use. As an example, this declares
      a symbol that will access the 'u-boot-spl' entry to find the 'pos' value
      (i.e. the position of SPL in the image):
      
         binman_sym_declare(unsigned long, u_boot_spl, pos);
      
      This converts to a symbol called '_binman_u_boot_spl_prop_pos' in any
      binary that includes it. Binman then updates the value in that binary,
      ensuring that it can be accessed at runtime with:
      
         ulong u_boot_pos = binman_sym(ulong, u_boot_spl, pos);
      
      This assigns the variable u_boot_pos to the position of SPL in the image.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      19790632
    • Simon Glass's avatar
      binman: Support enabling debug in tests · 7fe9173b
      Simon Glass authored
      
      The elf module can provide some debugging information to assist with
      figuring out what is going wrong. This is also useful in tests. Update the
      -D option so that it is passed through to tests as well.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      7fe9173b
    • Simon Glass's avatar
      binman: Adjust size of test SPL binary · f689890d
      Simon Glass authored
      
      This is only 3 bytes long which is not enough to hold two symbol values,
      needed to test the binman symbols feature. Increase it to 15 bytes.
      
      Using very small regions is useful since we can easily compare them in
      tests and errors are fairly easy to diagnose.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      f689890d
    • Simon Glass's avatar
      binman: Add tests binaries with binman symbols · 5cfcf7e0
      Simon Glass authored
      
      For testing we need to build some ELF files containing binman symbols. Add
      these to the Makefile and check in the binaries:
      
         u_boot_binman_syms - normal, valid ELF file
         u_boot_binman_syms_bad - missing the __image_copy_start symbol
         u_boot_binman_syms_size - has a binman symbol with an invalid size
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      5cfcf7e0
    • Simon Glass's avatar
      binman: Drop a stale comment about the 'board' feature · 00ae40b3
      Simon Glass authored
      
      This feature is now supported. Drop the incorrect comment.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      00ae40b3
    • Simon Glass's avatar
      binman: Add support for including spl/u-boot-spl-nodtb.bin · 4e6fdbef
      Simon Glass authored
      
      This file contains SPL image without a device tree. Add support for
      including this in images.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      4e6fdbef
    • Simon Glass's avatar
      binman: Add support for including spl/u-boot-spl.dtb · 47419eae
      Simon Glass authored
      
      This file contains the SPL device tree. Add support for including this by
      itself in images.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      47419eae
    • Simon Glass's avatar
      binman: Add a function to read ELF symbols · b50e5611
      Simon Glass authored
      
      In some cases we need to read symbols from U-Boot. At present we have a
      a few cases which does this via 'nm' and 'grep'.
      
      It is better to use objdump since that tells us the size of the symbols
      and also whether it is weak or not.
      
      Add a new module which reads ELF information from files. Update existing
      uses of 'nm' to use this module.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      b50e5611
  9. Dec 06, 2017
    • Philipp Tomsich's avatar
      tools: omapimage: fix corner-case in byteswap path · c8e1ca3e
      Philipp Tomsich authored
      
      Since commit 2614a208 ("common: command: tempory buffer should
      have size of command line buf"), there have been consistent Travis CI
      failures on my builds (interestingly not for Tom, even though building
      the same commit id) due to a SEGV in building the byteswapped
      omapimage:
           	    arm: pcm051_rev3
           make[2]: *** [MLO.byteswap] Error 139
           	      	  		       ^^^ error code for a SEGV
      
      Turns out that the word-based byte-swapping loop in omapimage.c is to
      blame. With the loop condition
             while (swapped <= (sbuf->st_size / sizeof(uint32_t)))
      there had been one-too-many iterations for all file sizes divisible by
      the sizeof(uint32_t).  I.e. we had 1 iteration for 0 bytes (and also 1
      through 3 bytes) and 2 iterations at 4 bytes... clearly overshooting
      on 0 and 4 bytes.
      
      This commit fixes the calculation of an up-rounded word-count and
      makes sure to keep the zero-based loop-counter below the number of
      words to be processed.
      
      References: 2614a208 ("common: command: tempory buffer should have size of command line buf")
      Fixes: 79b9ebb7 ("omapimage: Add support for byteswapped SPI images")
      Signed-off-by: default avatarPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
      Reviewed-by: default avatarMartin Elshuber <martin.elshuber@theobroma-systems.com>
      c8e1ca3e
  10. Dec 04, 2017
  11. Nov 30, 2017
  12. Nov 29, 2017
  13. Nov 28, 2017
    • Michal Simek's avatar
      tools: mkimage: Extend mkimage to also include pmufw · c85a6b79
      Michal Simek authored
      
      The patch is adding external pmufw "Platform Management Unit firmware"
      to boot.bin image. Boot.bin is a Xilinx format which bootrom is capable
      to read and boot the system. pmufw is copied to the header data section
      follows by u-boot-spl.bin. pmufw is consumed by PMU unit (Microblaze)
      and SPL runs on a53-0.
      
      This is generated command line when PMUFW_INIT_FILE is setup.
      
      ./tools/mkimage -T zynqmpimage -R ./"" -n
      ./"board/xilinx/zynqmp/pmufw.bin" -d spl/u-boot-spl.bin spl/boot.bin
      
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      c85a6b79
  14. Nov 23, 2017
Loading