[Bug 2080386] Re: Enable CONFIG_CMD_ERASEENV by default

Launchpad Bug Tracker 2080386 at bugs.launchpad.net
Fri Sep 13 03:49:17 UTC 2024


This bug was fixed in the package u-boot - 2024.01+dfsg-5ubuntu2

---------------
u-boot (2024.01+dfsg-5ubuntu2) oracular; urgency=medium

  * Enable FIT images (LP: #2054092)
  * Fix card detection on the JH7110 SoC (LP: #2069410)
    - d/p/riscv64/synopsys-designware-cd-gpios.patch
    - d/p/riscv64/starfive-mmc-card-detect.patch
  * d/rules: Unexport ELF_PACKAGE_METADATA to fix FTBFS on oracular
  * Enable 'env erase' sub-command to enable reset of the boot environment on
    RISC-V boards (LP: #2080386)

 -- Dave Jones <dave.jones at canonical.com>  Tue, 06 Aug 2024 09:41:28
+0100

** Changed in: u-boot (Ubuntu)
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to u-boot in Ubuntu.
https://bugs.launchpad.net/bugs/2080386

Title:
  Enable CONFIG_CMD_ERASEENV by default

Status in u-boot package in Ubuntu:
  Fix Released

Bug description:
  How a board boots is defined by U-Boot environment variables.

  If the environment never has been saved, the built in default will be
  used. These defaults have been changing a lot especially in 2024.

  If a user has saved the environment, he may end up in a situation
  where booting does not work correctly anymore. E.g. I was not able to
  install Jammy on an SiFive HiFive Unmatched board due to non-matching
  U-Boot environment. On the StarFive JH7110 based boards the
  environment used by vendor U-Boot are not compatible with upstream
  U-Boot.

  A short term fix is using

  env default -f -a
  env save

  to save the defaults to the environment store.

  A better solution is to simply erase the environment to always the
  default values. This can be done with the 'env erase' sub-command
  enabled by CONFIG_CMD_ERASEENV.

  Let us enable this for all RISC-V boards:

  diff --git a/cmd/Kconfig b/cmd/Kconfig
  index 43f78a5aeb1..45fcf556a18 100644
  --- a/cmd/Kconfig
  +++ b/cmd/Kconfig
  @@ -679,6 +679,7 @@ config CMD_SAVEENV
   config CMD_ERASEENV
          bool "eraseenv"
          depends on CMD_SAVEENV
  +       default y if RISCV
          help
            Erase environment variables from the compiled-in persistent
            storage.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/u-boot/+bug/2080386/+subscriptions




More information about the foundations-bugs mailing list