[U-Boot] [PATCH v5 00/26] spl: Lightweight UBI and UBI fastmap support

Ladislav Michl ladis at linux-mips.org
Tue Jul 12 20:28:08 CEST 2016


Core of this patch serie is based on Thomas's patchset:
https://patchwork.ozlabs.org/patch/367305/
https://patchwork.ozlabs.org/patch/367306/

This serie contains also changes needed to let single binary running
on IGEPv2 board equipped either with NAND or OneNAND flash memory:
igep0020_nand_defconfig is dropped and igep0020_defconfig modified
to support both flash memories. As many flash manipulatioin routines
do not expect flash reading failure (as chip is not present), fix
them too.

Now, first four flash sectors contains SPL as this is what Boot ROM
code expects and loads. The rest of flash is UBI managed: U-Boot,
its environment, kernel and rootfs are stored in UBI volumes.
As enviroment is stored in UBI volume, we need to know how is flash
partitioned very early. Also various board modifications come with
different geometry flash memories. To let this work two changes are
introduced: mtdpart code uses default partitions unless it is
explicitely told to do otherwise and support for runtime generated
default partitions has been added.

Changes in v5:
- dual license GPL/BSD

Changes in v4:
- drop unused name field from ubispl_load structure
- ipl_load returns lenght read

Changes in v3:
- move vol_id check to ubi_scan_vid_hdr to verify it has meaningfull value
  before testing ubi->toload
- fixed checkpatch errors except those present also in linux code

Changes in v2:
- rename nand_spl_read_flash to nand_spl_read_block and optimize it.
- fixes ubi_calc_fm_size to include also sizeof(struct ubi_fm_sb)
- dropped private copy of ubi-media.h
- ubi-wrapper.h now contains only needed definitions from ubi.h
  and ubi-user.h
- used return values from errno.h

Ladislav Michl (24):
  mtd: Sort subsystem directories aplhabeticaly in Makefile
  onenand_spl_simple: Add a simple OneNAND read function
  spl: support loading from UBI volumes
  spl: zImage support in Falcon mode
  armv7: add reset timeout to identify_nand_chip
  armv7: make gpmc_cfg const
  armv7: armv7: introduce set_gpmc_cs0
  armv7: simplify identify_nand_chip
  mtd: OneNAND: add timeout to wait ready loops
  mtd: OneNAND: allow board init function fail
  mtd: OneNAND: initialize mtd->writebufsize to let UBI work
  cmd: mtdparts: fix mtdparts variable presence confusion in
    mtdparts_init
  cmd: mtdparts: fix null pointer dereference in parse_mtdparts
  cmd: mtdparts: consolidate mtdparts reading from env
  cmd: mtdparts: use defaults by default
  cmd: mtdparts: support runtime generated mtdparts
  igep00x0: move sysinfo into C file
  igep00x0: reorder lan9221 code to remove ifdefs
  igep00x0: remove useless setup_net_chip declaration
  igep00x0: remove unused empty function omap_rev_string()
  igep00x0: runtime flash detection
  igep00x0: UBIize
  igep00x0: generate default mtdparts according NAND chip used
  igep00x0: Falcon mode

Thomas Gleixner (2):
  nand_spl_simple: Add a simple NAND read function
  spl: Lightweight UBI and UBI fastmap support

 README                                      |   4 +
 arch/arm/cpu/armv7/omap-common/mem-common.c | 156 +++--
 arch/arm/cpu/armv7/omap3/spl_id_nand.c      |  57 +-
 arch/arm/include/asm/arch-omap3/sys_proto.h |   7 +-
 arch/arm/lib/Makefile                       |   2 +
 arch/arm/lib/bootm.c                        |  32 -
 arch/arm/lib/zimage.c                       |  40 ++
 board/isee/igep00x0/igep00x0.c              | 164 +++--
 board/isee/igep00x0/igep00x0.h              |  20 -
 board/micronas/vct/ebi_onenand.c            |   4 +-
 board/samsung/goni/onenand.c                |   4 +-
 board/samsung/smdkc100/onenand.c            |   4 +-
 board/samsung/universal_c210/onenand.c      |   4 +-
 cmd/mtdparts.c                              |  92 +--
 common/spl/Makefile                         |   3 +
 common/spl/spl.c                            |  29 +
 common/spl/spl_ubi.c                        |  78 +++
 configs/igep0020_defconfig                  |   4 +-
 configs/igep0020_nand_defconfig             |  27 -
 doc/README.ubispl                           | 141 +++++
 drivers/Makefile                            |   5 +-
 drivers/mtd/nand/nand_spl_simple.c          |  62 ++
 drivers/mtd/nand/omap_gpmc.c                |   3 +-
 drivers/mtd/onenand/onenand_base.c          |  31 +-
 drivers/mtd/onenand/onenand_spl.c           |  48 ++
 drivers/mtd/onenand/onenand_uboot.c         |  30 +-
 drivers/mtd/ubispl/Makefile                 |   1 +
 drivers/mtd/ubispl/ubi-wrapper.h            | 106 ++++
 drivers/mtd/ubispl/ubispl.c                 | 926 ++++++++++++++++++++++++++++
 drivers/mtd/ubispl/ubispl.h                 | 136 ++++
 include/configs/omap3_igep00x0.h            |  86 ++-
 include/linux/mtd/omap_gpmc.h               |   3 +-
 include/nand.h                              |   1 +
 include/onenand_uboot.h                     |   3 +-
 include/spl.h                               |   4 +
 include/ubispl.h                            |  90 +++
 36 files changed, 2056 insertions(+), 351 deletions(-)
 create mode 100644 arch/arm/lib/zimage.c
 create mode 100644 common/spl/spl_ubi.c
 delete mode 100644 configs/igep0020_nand_defconfig
 create mode 100644 doc/README.ubispl
 create mode 100644 drivers/mtd/ubispl/Makefile
 create mode 100644 drivers/mtd/ubispl/ubi-wrapper.h
 create mode 100644 drivers/mtd/ubispl/ubispl.c
 create mode 100644 drivers/mtd/ubispl/ubispl.h
 create mode 100644 include/ubispl.h

-- 
2.1.4



More information about the U-Boot mailing list