Skip to content
Snippets Groups Projects
  1. Feb 16, 2021
  2. Feb 14, 2021
  3. Feb 01, 2021
  4. Jan 30, 2021
  5. Jan 29, 2021
  6. Jan 23, 2021
  7. Jan 22, 2021
    • Martin Hundebøll's avatar
      tools: env: return error if ubi_update_start() fails · 09779488
      Martin Hundebøll authored and Tom Rini's avatar Tom Rini committed
      
      The UBI_IOCVOLUP ioctl can fail if exclusive access to the volume isn't
      obtained. If this happens, the flush operation doesn't return error,
      leaving the caller without knowledge of missing flush.
      
      Fix this by forwarding the error (-1) from ubi_update_start().
      
      Fixes: 34255b92 ("tools: env: Add support for direct read/write UBI volumes")
      Signed-off-by: default avatarMartin Hundebøll <martin@geanix.com>
      09779488
    • Joel Stanley's avatar
      mkimage: Move padding commands outside of FIT_SIGNATURE · 603e26f7
      Joel Stanley authored and Tom Rini's avatar Tom Rini committed
      
      These commands were disabled when CONFIG_FIT_SIGNATURE is disabled, but
      they do not depend on crypto support so they can be unconditionally
      enabled.
      
      Signed-off-by: default avatarJoel Stanley <joel@jms.id.au>
      603e26f7
    • Joel Stanley's avatar
      tools/Makefile: FIT_CIPHER requires libssl · 5d40d5f1
      Joel Stanley authored and Tom Rini's avatar Tom Rini committed
      
      If CONFIG_FIT_CIPHER is enabled without CONFIG_FIT_SIGNATURE then
      mkimage/dumpimage will fail to link:
      
       /usr/bin/ld: tools/common/image-cipher.o: in function `fit_image_decrypt_data':
       image-cipher.c:(.text+0x9a): undefined reference to `image_get_host_blob'
       /usr/bin/ld: tools/common/image-cipher.o:(.data.rel+0x10): undefined reference to `EVP_aes_128_cbc'
       /usr/bin/ld: tools/common/image-cipher.o:(.data.rel+0x40): undefined reference to `EVP_aes_192_cbc'
       /usr/bin/ld: tools/common/image-cipher.o:(.data.rel+0x70): undefined reference to `EVP_aes_256_cbc'
       /usr/bin/ld: tools/lib/aes/aes-encrypt.o: in function `image_aes_encrypt':
       aes-encrypt.c:(.text+0x22): undefined reference to `EVP_CIPHER_CTX_new'
       /usr/bin/ld: aes-encrypt.c:(.text+0x6f): undefined reference to `EVP_EncryptInit_ex'
       /usr/bin/ld: aes-encrypt.c:(.text+0x8d): undefined reference to `EVP_EncryptUpdate'
       /usr/bin/ld: aes-encrypt.c:(.text+0xac): undefined reference to `EVP_CIPHER_CTX_free'
       /usr/bin/ld: aes-encrypt.c:(.text+0xf2): undefined reference to `EVP_EncryptFinal_ex'
       collect2: error: ld returned 1 exit status
      
      Signed-off-by: default avatarJoel Stanley <joel@jms.id.au>
      5d40d5f1
    • Philippe Reynes's avatar
      tools: image-host: add support for several sub-images · edfeba75
      Philippe Reynes authored and Tom Rini's avatar Tom Rini committed
      
      The propoerty sign-images points to images in the configuration
      node. But thoses images may references severals "sub-images" (for
      example for images loadable). This commit adds the support of
      severals sub-images.
      
      Signed-off-by: default avatarPhilippe Reynes <philippe.reynes@softathome.com>
      edfeba75
    • Philippe Reynes's avatar
      tools: image-host: clean function fit_config_get_hash_list · 5a4116f1
      Philippe Reynes authored and Tom Rini's avatar Tom Rini committed
      
      This commit creates a function fit_config_add_hash that will be
      used in the next commit to support several 'sub-images'.
      
      Signed-off-by: default avatarPhilippe Reynes <philippe.reynes@softathome.com>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      5a4116f1
  8. Jan 18, 2021
  9. Jan 15, 2021
    • Ley Foon Tan's avatar
      tools: socfpgaimage: update padding flow · 40551cf9
      Ley Foon Tan authored
      
      The existing socfpgaimage always pads the image to the maximum size of
      OCRAM size. This will break in the encryption flow where it expects the
      image to be un-padded. The encryption tool will do the encryption for
      the whole image and append the signature key at end of the image.
      The signature key will append to beyond the size of OCRAM if the image
      is padded with the maximum size before encryption.
      
      Move the padding step from socfpgaimage to Makefile and pads with objcopy
      command.
      
      socfpgaimage will pad the image with 16 bytes aligned (including CRC word),
      this is a requirement in encryption flow.
      
      Signed-off-by: default avatarLey Foon Tan <ley.foon.tan@intel.com>
      40551cf9
    • Ley Foon Tan's avatar
      tools: socfpgaimage: Print image header information · bcf33fac
      Ley Foon Tan authored
      
      Print image header information if the header is verified.
      
      Example output from mkimage "-l" option:
      
      $ ./tools/mkimage -l spl/u-boot-spl.sfp
      Image Type      : Cyclone V / Arria V SoC Image
      Validation word : 0x31305341
      Version         : 0x00000000
      Flags           : 0x00000000
      Program length  : 0x00003a59
      Header checksum : 0x00000188
      
      $ ./tools/mkimage -l spl/u-boot-spl.sfp
      Image Type      : Arria 10 SoC Image
      Validation word : 0x31305341
      Version         : 0x00000001
      Flags           : 0x00000000
      Header length   : 0x00000014
      Program length  : 0x000138e0
      Program entry   : 0x00000014
      Header checksum : 0x00000237
      
      Signed-off-by: default avatarLey Foon Tan <ley.foon.tan@intel.com>
      bcf33fac
  10. Jan 13, 2021
  11. Jan 11, 2021
  12. Jan 05, 2021
    • Simon Glass's avatar
      dtoc: Tidy up src_scan tests · 970349a9
      Simon Glass authored
      
      Some of these tests don't actually check anything. Add a few more checks
      to complete the tests.
      
      Also add a simple scan test that does the basics.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      970349a9
    • Simon Glass's avatar
      dtoc: Move src_scan tests to a separate file · 10ea9c0b
      Simon Glass authored
      
      Move the tests related to scanning into their own class, updating them
      to avoid using dtb_platdata as a pass-through.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      10ea9c0b
    • Simon Glass's avatar
      dtoc: Split source-code scanning to a separate file · a542a70c
      Simon Glass authored
      
      Before expanding the scanning features any more, move this into a separate
      file. This will make it easier to maintain in the future. In particular,
      it reduces the size of dtb_platdata.py and allows us to add tests
      specifically for scanning, without going through that file.
      
      The pieces moved are the Driver class, the scanning code and the various
      naming functions, since they mostly depend on the scanning results.
      
      So far there is are no separate tests for src_scan. These will be added
      as new functionality appears.
      
      This introduces no functional change.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      a542a70c
    • Simon Glass's avatar
      dtoc: Drop dm_populate_phandle_data() · d960f0db
      Simon Glass authored
      
      This has not been needed since parent information was added and we started
      using indicies for references to other drivers instead of pointers. It was
      kept around in the expectation that it might be needed later.
      
      However with the latest updates, it doesn't seem likely that we'll need
      this in the foreseeable future.
      
      Drop dm_populate_phandle_data() from dtoc and driver model.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      d960f0db
    • Simon Glass's avatar
      dtoc: Output nodes in order · 9eca08dc
      Simon Glass authored
      
      Previously we had to worry about nodes being output before those that they
      depended on, thus causing build errors.  So the current algorithm is
      careful to output nodes in the right order.
      
      We now use a different method for outputting phandles that does not
      involve pointers. Also we plan to add a 'declarations' header file to
      declare all drivers as 'extern'.
      
      Update the code to drop the dependency checking and output in a simple
      loop. This makes the output easier to follow since drivers are in order of
      thier indices (0, 1, ...), which is also the order it appears in in the
      linker list.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      9eca08dc
    • Simon Glass's avatar
      dtoc: Allow specifying the base directory for tests · 1e0f3f46
      Simon Glass authored
      
      The base directory of U-Boot, where the source is, it currently calculated
      from the directory of the dtb_platdata.py script. If this is installed
      elsewhere that will not work. Also it is inconvenient for tests.
      
      Add a parameter to allow specifying this base directory.
      
      To test this, pass a temporary directory with some files in it and check
      that they are passed to scan_driver().
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      1e0f3f46
    • Simon Glass's avatar
      dtoc: Add the method for each command to OutputFile · a7d5f96e
      Simon Glass authored
      
      Rather than the if/else construct, update OutputFile with the method to
      call to process each command. This is easier to maintain as the number of
      commands increases.
      
      Rename generate_tables to generate_plat since it better describes what is
      being generated ('plat' is the U-Boot name for platform data).
      
      With this, each output method needs to have the same signature. Store the
      output structures in a member variable instead of using parameters, to
      accomplish this.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      a7d5f96e
    • Simon Glass's avatar
      dtoc: Rename dt-platdata.c to dt-plat.c · f31fa99a
      Simon Glass authored
      
      Use this new name to be consistent with the rest of U-Boot, which talks
      about 'plat' for the platform data, which is what this file holds.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      f31fa99a
    • Simon Glass's avatar
      dtoc: Add a header comment to each generated file · d1055d68
      Simon Glass authored
      
      It is currently fairly obvious what the two generated files are for, but
      this will change as more are added. It is helpful for readers to describe
      the purpose of each file.
      
      Add a header commment field to OutputFile and use it to generate a comment
      at the top of each file.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      d1055d68
    • Simon Glass's avatar
      dtoc: Run tests using test_util · 5d9a3aa9
      Simon Glass authored
      
      Use the standard function for running tests and reported results. This
      allows the tests to run in parallel, which is a significant speed-up on
      most machines (e.g. 4.5 seconds -> 1.5s on mine).
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      5d9a3aa9
    • Simon Glass's avatar
      concurrencytest: Fix Python3 warning · fe240089
      Simon Glass authored
      
      This gives a warning in some situations:
      
        File "tools/dtoc/../concurrencytest/concurrencytest.py", line 95,
             in do_fork
          stream = os.fdopen(c2pread, 'rb', 1)
        File "/usr/lib/python3.8/os.py", line 1023, in fdopen
          return io.open(fd, *args, **kwargs)
      RuntimeWarning: line buffering (buffering=1) isn't supported in binary
          mode, the default buffer size will be used
      
      Fix this by dropping the line-buffer parameter.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      fe240089
Loading