1. 24 Mar, 2021 1 commit
  2. 23 Mar, 2021 2 commits
    • Rasmus Villemoes's avatar
      tools: fw_env: use erasesize from MEMGETINFO ioctl · adf94e66
      Rasmus Villemoes authored
      
      
      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: default avatarRasmus Villemoes <rasmus.villemoes@prevas.dk>
      adf94e66
    • Michael Heimpold's avatar
      tools/fw_env: use fsync to ensure that data is physically stored · 5976d462
      Michael Heimpold authored
      
      
      Closing a file descriptor does not guarantee that the data has been
      successfully saved to disk, as the kernel might defer the write.
      Signed-off-by: default avatarMichael Heimpold <mhei@heimpold.de>
      5976d462
  3. 30 Jul, 2020 1 commit
  4. 08 Jul, 2020 1 commit
  5. 22 Oct, 2019 15 commits
  6. 21 Oct, 2019 1 commit
  7. 11 Apr, 2019 2 commits
  8. 19 Dec, 2018 2 commits
  9. 18 Dec, 2018 4 commits
  10. 26 Jan, 2018 1 commit
  11. 15 Jan, 2018 2 commits
  12. 22 Nov, 2017 1 commit
  13. 21 Nov, 2017 1 commit
  14. 25 Oct, 2017 1 commit
  15. 19 Oct, 2017 1 commit
  16. 10 Oct, 2017 1 commit
  17. 29 Sep, 2017 1 commit
  18. 08 Sep, 2017 1 commit
  19. 30 Aug, 2017 1 commit