1. 02 9月, 2021 1 次提交
  2. 23 1月, 2021 1 次提交
  3. 05 8月, 2020 2 次提交
  4. 31 7月, 2020 1 次提交
    • I
      fw_setenv: lock the flash only if it was locked before · db820159
      Ivan Mikhaylov 提交于
      With current implementation of fw_setenv, it is always locks u-boot-env
      region if lock interface is implemented for such mtd device. You can
      not control lock of this region with fw_setenv, there is no option for
      it in config or in application itself. Because of this situation may
      happen problems like in this thread on xilinx forum:
      https://forums.xilinx.com/t5/Embedded-Linux/Flash-be-locked-after-use-fw-setenv-from-user-space
      /td-p/1027851
      
      A short summary of that link is: some person has issue with some spi
      chip which has lock interface but doesn't locks properly which leads to
      lock of whole flash memory on lock of u-boot-env region. As resulted
      solution hack was added into spi-nor.c driver for this chip with lock
      disablement.
      
      Instead fix this problem by adding logic to fw_setenv only lock the
      flash if it was already locked when we attempted to use it.
      Signed-off-by: NIvan Mikhaylov <fr0st61te@gmail.com>
      db820159
  5. 03 6月, 2020 1 次提交
    • H
      tools: fw_env: Fix warning when reading too little · 50bb682c
      Harald Seiler 提交于
      When using CONFIG_ENV_IS_IN_FAT and the config-file specifies a size
      larger than what U-Boot wrote into the env-file, a confusing error
      message is shown:
      
          $ fw_printenv
          Read error on /boot/uboot.env: Success
      
      Fix this by showing a different error message when read returns too
      little data.
      Signed-off-by: NHarald Seiler <hws@denx.de>
      50bb682c
  6. 28 4月, 2020 1 次提交
    • R
      tools: fw_env: use erasesize from MEMGETINFO ioctl · e282c422
      Rasmus Villemoes 提交于
      We have a board with several revisions. The older ones use a nor flash
      with 64k erase size, while the newer have a flash with 4k sectors. The
      environment size is 8k.
      
      Currently, we have to put a column containing 0x10000 (64k) in
      fw_env.config in order for it to work on the older boards. But that
      ends up wasting quite a lot of time on the newer boards that could
      just erase the 8k occupied by the environment - strace says the 64k
      erase takes 0.405 seconds. With this patch, as expected, that's about
      an 8-fold better, at 0.043 seconds.
      
      Having different fw_env.config files for the different revisions is
      highly impractical, and the correct information is already available
      right at our fingertips. So use the erasesize returned by the
      MEMGETINFO ioctl when the fourth and fifth columns (sector size and
      #sectors, respectively) are absent or contain 0, a case where the
      logic previously used to use the environment size as erase size (and
      consequently computed ENVSECTORS(dev) as 1).
      
      As I'm only testing this on a NOR flash, I'm only changing the logic
      for that case, though I think it should be possible for the other
      types as well.
      Signed-off-by: NRasmus Villemoes <rasmus.villemoes@prevas.dk>
      e282c422
  7. 21 12月, 2019 1 次提交
  8. 03 12月, 2019 1 次提交
  9. 25 9月, 2019 2 次提交
  10. 12 8月, 2019 2 次提交
  11. 20 6月, 2019 1 次提交
  12. 05 5月, 2019 1 次提交
  13. 27 4月, 2019 1 次提交
  14. 02 7月, 2018 1 次提交
  15. 28 6月, 2018 1 次提交
  16. 13 6月, 2018 2 次提交
  17. 07 5月, 2018 1 次提交
    • T
      SPDX: Convert all of our single license tags to Linux Kernel style · 83d290c5
      Tom Rini 提交于
      When U-Boot started using SPDX tags we were among the early adopters and
      there weren't a lot of other examples to borrow from.  So we picked the
      area of the file that usually had a full license text and replaced it
      with an appropriate SPDX-License-Identifier: entry.  Since then, the
      Linux Kernel has adopted SPDX tags and they place it as the very first
      line in a file (except where shebangs are used, then it's second line)
      and with slightly different comment styles than us.
      
      In part due to community overlap, in part due to better tag visibility
      and in part for other minor reasons, switch over to that style.
      
      This commit changes all instances where we have a single declared
      license in the tag as both the before and after are identical in tag
      contents.  There's also a few places where I found we did not have a tag
      and have introduced one.
      Signed-off-by: NTom Rini <trini@konsulko.com>
      83d290c5
  18. 20 3月, 2018 4 次提交
  19. 05 3月, 2018 1 次提交
  20. 15 2月, 2018 1 次提交
  21. 28 1月, 2018 1 次提交
  22. 30 11月, 2017 1 次提交
  23. 21 11月, 2017 1 次提交
  24. 06 9月, 2017 1 次提交
  25. 04 9月, 2017 1 次提交
  26. 16 8月, 2017 1 次提交
  27. 23 7月, 2017 1 次提交
  28. 18 4月, 2017 1 次提交
  29. 13 4月, 2017 2 次提交
    • S
      env: fix memory leak in fw_env routines · 33f0086c
      Stefano Babic 提交于
      fw_env_open allocates buffers to store the environment, but these
      buffers are never freed. This becomes quite nasty using the fw_ tools as
      library, because each access to the environment (even just reading a
      variable) generates a memory leak equal to the size of the environment.
      
      Fix this renaming fw_env_close() as fw_env_flush(), because the function
      really flushes the environment from RAM to storage, and add a
      fw_env_close function to free the allocated resources.
      Signed-off-by: NStefano Babic <sbabic@denx.de>
      33f0086c
    • S
      env: split fw_env.h in public and private parts · 9d80b49a
      Stefano Babic 提交于
      Move U-Boot private data into a separate file. This
      lets export fw_env.h to be used by external programs
      that want to change the environment using the library
      built in tools/env.
      Signed-off-by: NStefano Babic <sbabic@denx.de>
      9d80b49a
  30. 29 11月, 2016 1 次提交
    • M
      tools/env: fix environment alignment tests for block devices · 333ee16d
      Max Krummenacher 提交于
      commit 183923d3 enforces that the
      environment must start at an erase block boundary.
      
      For block devices the sample fw_env.config does not mandate a erase block size
      for block devices. A missing setting defaults to the full env size.
      
      Depending on the environment location the alignment check now errors out for
      perfectly legal settings.
      
      Fix this by defaulting to the standard blocksize of 0x200 for environments
      stored in a block device.
      That keeps the fw_env.config files for block devices working even with that
      new check.
      Signed-off-by: NMax Krummenacher <max.krummenacher@toradex.com>
      333ee16d
  31. 07 10月, 2016 2 次提交