Skip to content
Snippets Groups Projects
  1. Oct 27, 2021
    • Ilias Apalodimas's avatar
      sandbox: Remove OF_HOSTFILE · e7fb7896
      Ilias Apalodimas authored and Tom Rini's avatar Tom Rini committed
      
      OF_HOSTFILE is used on sandbox configs only.  Although it's pretty
      unique and not causing any confusions,  we are better of having simpler
      config options for the DTB.
      
      So let's replace that with the existing OF_BOARD.  U-Boot would then
      have only three config options for the DTB origin.
      - OF_SEPARATE, build separately from U-Boot
      - OF_BOARD, board specific way of providing the DTB
      - OF_EMBED embedded in the u-boot binary(should not be used in production
      
      Signed-off-by: default avatarIlias Apalodimas <ilias.apalodimas@linaro.org>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      e7fb7896
  2. Oct 26, 2021
  3. Oct 25, 2021
  4. Oct 21, 2021
  5. Oct 18, 2021
  6. Oct 13, 2021
  7. Oct 09, 2021
  8. Oct 08, 2021
    • Simon Glass's avatar
      image: Drop unnecessary #ifdefs from image.h · 13c133b9
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      This file has a lot of conditional code and much of it is unnecessary.
      Clean this up to reduce the number of build combinations.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      13c133b9
    • Simon Glass's avatar
      efi: Correct dependency on FIT_SIGNATURE · 1eccbb16
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      At present EFI_SECURE BOOT selects RSA but does not necessarily enable
      FIT_SIGNATURE. Mostly this is fine, but a few boards do not enable it,
      so U-Boot tries to do RSA verification when loading FIT images, but it
      is not enabled.
      
      This worked because the condition for checking the RSA signature is
      wrong in the fit_image_verify_with_data() function. In order to fix it
      we need to fix this dependency. Make sure that FIT_SIGNATURE is enabled
      so that RSA can be used.
      
      It might be better to avoid using 'select' in this situation.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      1eccbb16
    • Simon Glass's avatar
      image: Use the correct checks for CRC32 · e7d285b2
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Add a host Kconfig for CRC32. With this we can use CONFIG_IS_ENABLED(CRC32)
      directly in the host build, so drop the unnecessary indirection.
      
      Add a few more conditions to SPL_CRC32 to avoid build failures as well as
      TPL_CRC32. Also update hash.c to make crc32 optional and to actually take
      notice of SPL_CRC32.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarAlexandru Gagniuc <mr.nuke.me@gmail.com>
      e7d285b2
    • Simon Glass's avatar
      image: Use Kconfig to enable FIT_RSASSA_PSS on host · 2bbed3ff
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Add a host Kconfig for FIT_RSASSA_PSS. With this we can use
      CONFIG_IS_ENABLED(FIT_RSASSA_PSS) directly in the host build, so drop the
      forcing of this in the image.h header.
      
      Drop the #ifdef around padding_pss_verify() too since it is not needed.
      Use the compiler to check the config where possible, instead of the
      preprocessor.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarAlexandru Gagniuc <mr.nuke.me@gmail.com>
      2bbed3ff
    • Simon Glass's avatar
      image: Drop IMAGE_ENABLE_OF_LIBFDT · 0c303f9a
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Add a host Kconfig for OF_LIBFDT. With this we can use
      CONFIG_IS_ENABLED(OF_LIBFDT) directly in the tools build, so drop the
      unnecessary indirection.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarAlexandru Gagniuc <mr.nuke.me@gmail.com>
      0c303f9a
    • Simon Glass's avatar
      hash: Use Kconfig to enable hashing in host tools and SPL · 2c21256b
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      At present when building host tools, we force CONFIG_SHAxxx to be enabled
      regardless of the board Kconfig setting. This is done in the image.h
      header file.
      
      For SPL we currently just assume the algorithm is desired if U-Boot proper
      enables it.
      
      Clean this up by adding new Kconfig options to enable hashing on the host,
      relying on CONFIG_IS_ENABLED() to deal with the different builds.
      
      Add new SPL Kconfigs for hardware-accelerated hashing, to maintain the
      current settings.
      
      This allows us to drop the image.h code and the I_WANT_MD5 hack.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarAlexandru Gagniuc <mr.nuke.me@gmail.com>
      2c21256b
    • Simon Glass's avatar
      spl: cypto: Bring back SPL_ versions of SHA · 603d15a5
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Unfortunately these were removed by mistake. This means that adding hash
      support to SPL brings in all software algorithms, with a substantial
      increase in code size.
      
      The origin of the problem was renaming them to SPL_FIT_xxx and then these
      were removed altogether in a later commit.
      
      Add them back. This aligns with CONFIG_MD5, for example, which has an SPL
      variant.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Fixes: f5bc9c25 ("image: Rename SPL_SHAxxx_SUPPORT to SPL_FIT_SHAxxx")
      Fixes: eb5171dd ("common: Remove unused CONFIG_FIT_SHAxxx selectors")
      Reviewed-by: default avatarAlexandru Gagniuc <mr.nuke.me@gmail.com>
      603d15a5
    • Simon Glass's avatar
      gzip: Avoid use of u64 · 5a4f10d7
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      The gzip API uses the u64 type in it, which is not available in the host
      build. This makes it impossible to include the header file.
      
      We could make this type available, but it seems unnecessary. Limiting the
      compression size to that of the 'unsigned long' type seems good enough. On
      32-bit machines the limit then becomes 4GB, which likely exceeds available
      RAM anyway, therefore it should be sufficient. On 64-bit machines this is
      effectively u64 anyway.
      
      Update the header file and implementation to use 'ulong' instead of 'u64'.
      
      Add a definition of u32 for the cases that seem to need exactly that
      length. This should be safe enough.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      5a4f10d7
Loading