Skip to content
Snippets Groups Projects
  1. Mar 10, 2022
    • 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
      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
  2. Jan 19, 2022
  3. Jan 14, 2022
  4. Dec 27, 2021
    • Tom Rini's avatar
      Convert CONFIG_ENV_SPI_BUS et al to Kconfig · 7e6a6fd8
      Tom Rini authored
      
      This converts the following to Kconfig:
         CONFIG_ENV_SPI_BUS
         CONFIG_ENV_SPI_CS
         CONFIG_ENV_SPI_MAX_HZ
         CONFIG_ENV_SPI_MODE
      
      As part of this, we use Kconfig to provide the defaults now that were
      done in include/spi_flash.h.  We also in some cases change from using
      CONFIG_ENV_SPI_FOO to CONFIG_SF_DEFAULT_FOO as those were the values in
      use anyhow as ENV was not enabled.
      
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      7e6a6fd8
  5. Nov 16, 2021
    • Simon Glass's avatar
      bootm: Tidy up use of autostart env var · 78398652
      Simon Glass authored
      
      This has different semantics in different places. Go with the bootm method
      and put it in a common function so that the behaviour is consistent in
      U-Boot. Update the docs.
      
      To be clear, this changes the way that 'bootelf' and standalone boot
      work. Before, if autostart was set to "fred" or "YES", for example, they
      would consider that a "yes". This may change behaviour for some boards,
      but the only in-tree boards which mention autostart use "no" to disable
      it, which will still work.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      Suggested-by: default avatarWolfgang Denk <wd@denx.de>
      78398652
    • Simon Glass's avatar
      env: Allow U-Boot scripts to be placed in a .env file · 86b9c3e4
      Simon Glass authored
      
      At present U-Boot environment variables, and thus scripts, are defined
      by CONFIG_EXTRA_ENV_SETTINGS. It is painful to add large amounts of text
      to this file and dealing with quoting and newlines is harder than it
      should be. It would be better if we could just type the script into a
      text file and have it included by U-Boot.
      
      Add a feature that brings in a .env file associated with the board
      config, if present. To use it, create a file in a board/<vendor>
      directory, typically called <board>.env and controlled by the
      CONFIG_ENV_SOURCE_FILE option.
      
      The environment variables should be of the form "var=value". Values can
      extend to multiple lines. See the README under 'Environment Variables:'
      for more information and an example.
      
      In many cases environment variables need access to the U-Boot CONFIG
      variables to select different options. Enable this so that the environment
      scripts can be as useful as the ones currently in the board config files.
      This uses the C preprocessor, means that comments can be included in the
      environment using /* ... */
      
      Also support += to allow variables to be appended to. This is needed when
      using the preprocessor.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarMarek Behún <marek.behun@nic.cz>
      Tested-by: default avatarMarek Behún <marek.behun@nic.cz>
      86b9c3e4
  6. Nov 13, 2021
  7. Oct 31, 2021
  8. Oct 26, 2021
  9. Oct 25, 2021
    • Marek Vasut's avatar
      env: mmc: Add support for redundant env in both eMMC boot partitions · d11d1bec
      Marek Vasut authored
      
      Currently the MMC environment driver supports storing redundant environment
      only in one eMMC partition at different offsets. This is sub-optimal, since
      if this one boot partition is erased, both copies of environment are lost.
      Since the eMMC has two boot partitions, add support for storing one copy of
      environment in each of the two boot partitions.
      
      To enable this functionality, select CONFIG_SYS_REDUNDAND_ENVIRONMENT to
      indicate redundant environment should be used. Set CONFIG_SYS_MMC_ENV_PART
      to 1 to indicate environment should be stored in eMMC boot partition. Set
      CONFIG_ENV_OFFSET equal to CONFIG_ENV_OFFSET_REDUND, and both to the offset
      from start of eMMC boot partition where the environment should be located.
      
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Fabio Estevam <festevam@gmail.com>
      Cc: Jaehoon Chung <jh80.chung@samsung.com>
      Cc: Peng Fan <peng.fan@nxp.com>
      Cc: Stefano Babic <sbabic@denx.de>
      d11d1bec
    • Marek Vasut's avatar
      env: mmc: Add missing eMMC bootpart restoration to env erase · f47f87f2
      Marek Vasut authored
      
      If the environment is stored in eMMC hardware boot partition, the environment
      driver first stores the currently selected eMMC boot partition, then does the
      requested operation, and then restores the original boot partition settings.
      In case the environment operation fails, the boot partition settings are also
      restored.
      
      The 'env erase' implementation in the MMC environment driver lacks the path
      which restores the boot partition. This could lead to various failure modes,
      like the system boots the wrong copy of bootloader etc. Fix this by filling
      in the missing restoration path.
      
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Fabio Estevam <festevam@gmail.com>
      Cc: Jaehoon Chung <jh80.chung@samsung.com>
      Cc: Peng Fan <peng.fan@nxp.com>
      Cc: Stefano Babic <sbabic@denx.de>
      f47f87f2
  10. Oct 23, 2021
    • Marek Behún's avatar
      mtd: Remove mtd_erase_callback() entirely · 0d1ecc99
      Marek Behún authored
      
      The original purpose of mtd_erase_callback() in Linux at the time it was
      imported to U-Boot, was to inform the caller that erasing is done (since
      it was an asynchronous operation).
      
      All supplied callback methods in U-Boot do nothing, but the
      mtd_erase_callback() function was (until previous patch) grossly abused
      in U-Boot's mtdpart implementation for completely different purpose.
      
      Since we got rid of the abusement, remove the mtd_erase_callback()
      function and the .callback member from struct erase_info entirely, in
      order to avoid such problems in the future.
      
      Signed-off-by: default avatarMarek Behún <marek.behun@nic.cz>
      0d1ecc99
  11. Oct 21, 2021
  12. Sep 25, 2021
  13. Sep 24, 2021
  14. Sep 23, 2021
    • Pierre-Clément Tosi's avatar
      env: Make _init() expect _INVALID when _IS_NOWHERE · f6bc5d17
      Pierre-Clément Tosi authored
      
      Avoid applying the "fix" introduced by commit 5557eec0 ("env: Fix
      invalid env handling in env_init()") to the environment "nowhere".
      
      This is necessary as that commit, by setting the return value of
      env_init() to -ENOENT if gd->env_valid is ENV_INVALID, forces that
      function to reset gd->env_valid to ENV_VALID. By doing so, it breaks the
      assumption (required by ENV_IS_NOWHERE) that gd->env_valid must be
      ENV_INVALID.
      
      This, in turn, results in env_relocate() calling env_load() (it should
      not), which itself, calls U_BOOT_ENV_LOCATION(nowhere).load() i.e.
      env_nowhere_load(). That function, being implemented under the
      assumption mentioned above, calls env_set_default(), which in turn,
      seeing that gd->env_valid is ENV_VALID (it should not), tries to
      dereference whatever lies in gd->env_addr (most likely garbage), leading
      to a faulty memory access.
      
      Note that other env_locations might be concerned by this bug but that
      this commit only intends to fix it for when ENV_IS_NOWHERE.
      
      Fixes: 5557eec0 ("env: Fix invalid env handling in env_init()")
      Signed-off-by: default avatarPierre-Clément Tosi <ptosi@google.com>
      f6bc5d17
  15. Aug 31, 2021
  16. Aug 30, 2021
    • Tom Rini's avatar
      Convert CONFIG_SYS_I2C_EEPROM_ADDR et al to Kconfig · 88cd7d0e
      Tom Rini authored
      
      - Rename usages of CONFIG_SYS_DEF_EEPROM_ADDR to CONFIG_SYS_I2C_EEPROM_ADDR
        based on current usage.
      - Convert CONFIG_SYS_I2C_EEPROM_ADDR, CONFIG_SYS_I2C_EEPROM_ADDR_LEN,
        CONFIG_SYS_I2C_EEPROM_BUS, CONFIG_CONFIG_SYS_EEPROM_SIZE
        CONFIG_SYS_EEPROM_PAGE_WRITE_BITS and CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS
        to Kconfig.  We move these symbols around a bit and add appropriate
        dependencies to them.  In some cases, we now add a correct default value
        as well.
      
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      88cd7d0e
    • Tom Rini's avatar
      eeprom: Drop CONFIG_ENV_EEPROM_IS_ON_I2C usage · c18afbe0
      Tom Rini authored
      
      At this point in time, there's no systems with "U-Boot environment
      exists on an EEPROM which is accessed over the I2C bus" that sets this
      option.  Drop it.
      
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      c18afbe0
  17. Aug 18, 2021
  18. Aug 01, 2021
  19. Jul 08, 2021
    • Tom Rini's avatar
      ppc: Remove sbc8641d board · 1c58857a
      Tom Rini authored
      
      This board has not been converted to CONFIG_DM_PCI by the deadline and is
      also missing conversion to CONFIG_DM.  Remove it.  This is also the last
      of the ARCH_MPC8641/MPC8610 platforms, so remove that support as well.
      
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Priyanka Jain <priyanka.jain@nxp.com>
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      1c58857a
    • Tom Rini's avatar
      ppc: Remove xpedite boards · ed7fe2be
      Tom Rini authored
      
      These boards have not been converted to CONFIG_DM_PCI by the deadline and is
      also missing conversion to CONFIG_DM.  Remove them.  As this includes
      the last ARCH_MPC8572 platform, remove that as well.
      
      Cc: Peter Tyser <ptyser@xes-inc.com>
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      Acked-by: default avatarPeter Tyser <ptyser@xes-inc.com>
      ed7fe2be
    • Tom Rini's avatar
      m68k: Remove M5475x boards · 9b7993bb
      Tom Rini authored
      
      These board has not been converted to CONFIG_DM_PCI by the deadline.
      Remove them.  As this is the last of the mcf547x_8x family of boards,
      remove that support as well.
      
      Cc: TsiChung Liew <Tsi-Chung.Liew@nxp.com>
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      9b7993bb
Loading