Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
  1. Mar 14, 2022
  2. Mar 13, 2022
  3. Mar 12, 2022
  4. Mar 11, 2022
  5. Mar 10, 2022
    • Andre Przywara's avatar
      sunxi: boards: Enable SPI flash support in U-Boot proper · 280294c5
      Andre Przywara authored
      
      Some sunxi boards ship with SPI flash, which allows booting through the
      BootROM. We cover this functionality by a separate SPL "mini" driver.
      Separately we have a proper DM_SPI driver for U-Boot proper, which
      provides access to the SPI flash through the "sf" command. That allows
      to update the firmware on the SPI flash, also to store the environment
      there.
      
      However only very few boards actually enable support for U-Boot proper,
      even though that would work and the SPL part is configured.
      
      Use the cleaned up configuration scheme to enable SPI flash on those
      boards which mention a SPI flash in their .dts, or which use the SPL SPI
      support.
      
      Out of the box this would enable storing the environment on the SPI
      flash, and allows people to read or write the flash from U-Boot, for
      instance to update the SPI flash when booted via an SD card.
      
      For this to actually work there must be a "spi0" alias in the DT, which
      most boards are missing. But this should be addressed separately.
      
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      Reviewed-by: default avatarJagan Teki <jagan@amarulasolutions.com>
      280294c5
    • Andre Przywara's avatar
      env: sunxi: enable ENV_IS_IN_SPI_FLASH · 753a85fd
      Andre Przywara authored
      
      Now that sunxi uses CONFIG_SPI more sanely, and can also now properly
      load the environment from SPI flash, let's enable the symbol that
      actually considers the SPI flash when accessing the environment.
      
      As this symbol depends on CONFIG_SPI, which we now only enable if the
      board has a SPI flash, we can make if "default y" for all Allwinner
      boards.
      
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      Reviewed-by: default avatarJagan Teki <jagan@amarulasolutions.com>
      753a85fd
    • Andre Przywara's avatar
      sunxi: use boot source for determining environment location · e42dad41
      Andre Przywara authored
      
      Currently we only support to load the environment from raw MMC or FAT
      locations on Allwinner boards. With the advent of SPI flash we probably
      also want to support using the environment there, so we need to become
      a bit more flexible.
      
      Change the environment priority function to take the boot source into
      account. When booted from eMMC or SD card, we use FAT or MMC, if
      configured, as before.
      If we are booted from SPI flash, we try to use the environment from
      there, if possible. The same is true for NAND flash booting, although
      this is somewhat theoretical right now (as untested).
      
      This way we can use the same image for SD and SPI flash booting, which
      allows us to simply copy a booted image from SD card to the SPI flash,
      for instance.
      
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      Reviewed-by: default avatarJagan Teki <jagan@amarulasolutions.com>
      e42dad41
    • Andre Przywara's avatar
      env: sunxi: Define location in SPI flash · 2bdf213f
      Andre Przywara authored
      
      To allow loading and storing the environment from SPI flash, adjust the
      raw offset variables for Allwinner boards to make sense there.
      
      U-Boot (including SPL and other blobs) is loaded from the beginning of
      SPI flash, so move the environment location as far back as possible, to
      not create unnecessary limits. As those offsets are shared with (now
      mostly unused) raw MMC environment, we should respect the common one
      megabyte limit, which also makes sense on SPI flash.
      
      So limit the environment for those raw locations to 64KB, and place it
      just below 1MB (@960KB).
      
      Those values are currently unused, unless someone forcibly enables the
      raw MMC environment. In this case it would break as of now, as the
      current offset of 544KB is far too low for the current (arm64) U-Boot
      proper.
      
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      Reviewed-by: default avatarJagan Teki <jagan@amarulasolutions.com>
      2bdf213f
    • Andre Przywara's avatar
      sunxi: Kconfig: Fix up SPI configuration · 81a46c15
      Andre Przywara authored
      
      Commit 7945caf2 ("arm: sunxi: Enable SPI/SPI-FLASH support for A64")
      selected CONFIG_SPI by default on all Allwinner A64 boards, even though
      only 4 out of the 14 A64 boards have a SPI flash chip. All other SoCs
      had to manually select DM_SPI and friends, even though they are a
      platform property (the sunxi SPI driver is DM_SPI only).
      
      Clean this up to allow easy selection of SPI flash support in U-Boot
      proper, by selecting DM_SPI and DM_SPI_FLASH *if* CONFIG_SPI is
      selected, for *all* Allwinner SoCs. This simplifies the defconfig for
      two Libretech boards already.
      
      Also remove the forced CONFIG_SPI from the A64 Kconfig, instead let the
      four boards which allow SPI booting select this explicitly.
      
      Any board wishing to support SPI flash in U-Boot proper now just defines
      CONFIG_SPI and CONFIG_SPI_FLASH_<vendor> in its defconfig, Kconfig takes
      care of the rest.
      
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      Reviewed-by: default avatarJagan Teki <jagan@amarulasolutions.com>
      81a46c15
  6. Mar 08, 2022
  7. Mar 05, 2022
  8. Mar 04, 2022
    • Yann Droneaud's avatar
      lib: rsa: use actual OpenSSL 1.1.0 EVP MD API · 9b5ad4f5
      Yann Droneaud authored
      
      Since OpenSSL 1.1.0, EVP_MD_CTX_create() is EVP_MD_CTX_new()
                           EVP_MD_CTX_destroy() is EVP_MD_CTX_free()
                           EVP_MD_CTX_init() is EVP_MD_CTX_reset()
      
      As there's no need to reset a newly created EVP_MD_CTX, moreover
      EVP_DigestSignInit() does the reset, thus call to EVP_MD_CTX_init()
      can be dropped.
      As there's no need to reset an EVP_MD_CTX before it's destroyed,
      as it will be reset by EVP_MD_CTX_free(), call to EVP_MD_CTX_reset()
      is not needed and can be dropped.
      
      Signed-off-by: default avatarYann Droneaud <ydroneaud@opteya.com>
      9b5ad4f5
    • Michal Simek's avatar
      .mailmap: Record all address for main U-Boot contributor · 4fa4227c
      Michal Simek authored
      
      Based on looking at top contributors it was seen that top statistics from
      top contributors don't include all contributions from different email
      addresses. That's why I checked all top contributors are checked it.
      
      git shortlog -n $START..$END -e -s
      
      The patch is adding mapping for Bin Meng, Marek Vasut, Masahiro Yamada,
      Michal Simek, Tom Rini, Wolfgang Denk.
      And also use mapping for Stefan Roese and Wolfgang Denk to be properly
      counted.
      
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
      Acked-by: default avatarBin Meng <bmeng.cn@gmail.com>
      Reviewed-by: default avatarStefan Roese <sr@denx.de>
      4fa4227c
Loading