[U-Boot] [PATCH v2 0/6] Add support for using an UBI volume for environment

Joe Hershberger joe.hershberger at ni.com
Tue Mar 26 22:53:25 CET 2013


NAND is not good at handling absolute addresses to sectors for storing
particular data.  The current implementation of the NAND env support
works around this in several ways such as storing a pointer to the
sector in the OOB of the first sector (interferes with some CRC) or
supporting a range of sectors (which unless it is huge is not
guaranteed to be safe).  None of these options address wear-leveling
concerns or bad block handling.

Accessing the u-boot env from UBI eliminates these concerns.  However,
it does require some of the basic settings for finding the UBI env to
be in the default u-boot env.

Changes in v2:
- Fixed error handling bug that prevents fail-over to default env on error
- Added curly braces on "multi-line" statements
- Added extern consistently in header
- Cleaned up the msg print silencing
- Added curly braces on "multi-line" statements

Joe Hershberger (6):
  ubi: Fix broken cleanup code in attach_by_scanning
  ubi: Expose a few simple functions from the cmd_ubi
  ubi: ubifs: Turn off verbose prints
  mtd: Make mtdparts work with pre-reloc env
  env: Add support for UBI environment
  env: Add redundant env support to UBI env

 README                  |  21 +++++
 common/Makefile         |   1 +
 common/cmd_mtdparts.c   |  23 ++++-
 common/cmd_nvedit.c     |   7 +-
 common/cmd_ubi.c        | 153 ++++++++++++++++++---------------
 common/env_ubi.c        | 220 ++++++++++++++++++++++++++++++++++++++++++++++++
 drivers/mtd/mtdpart.c   |  14 +--
 drivers/mtd/ubi/build.c |   8 +-
 drivers/mtd/ubi/ubi.h   |   4 +
 drivers/mtd/ubi/wl.c    |   1 +
 fs/ubifs/ubifs.h        |   4 +
 include/environment.h   |  18 ++++
 include/ubi_uboot.h     |   3 +
 tools/env/fw_env.c      |   6 +-
 14 files changed, 402 insertions(+), 81 deletions(-)
 create mode 100644 common/env_ubi.c

-- 
1.7.11.5



More information about the U-Boot mailing list