Skip to content

spl: Lightweight UBI and UBI fastmap support

Ladislav Michl u-boot 6 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest26 patches 0 repliesNew
  2. v45 of 7 patches 0 repliesSuperseded
  3. v34 patches 0 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v2 posting 2/20 of 3 patches0 repliesSuperseded
v2 posting 1/23 patches0 repliesSuperseded
v11 patch0 repliesSuperseded

Changes in v5 from the cover letter

- dual license GPL/BSD

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/26mtd: Sort subsystem directories aplhabeticaly in Makefiledrivers/Makefile+2 -21 reply
2/26nand_spl_simple: Add a simple NAND read functiondrivers/mtd/nand/nand_spl_simple.c include/nand.h+63 -01 reply
3/26onenand_spl_simple: Add a simple OneNAND read functiondrivers/mtd/onenand/onenand_spl.c include/onenand_uboot.h+49 -01 reply
4/26spl: Lightweight UBI and UBI fastmap supportREADME doc/README.ubispl drivers/Makefile +5 more+1405 -01 reply
5/26spl: support loading from UBI volumescommon/spl/Makefile common/spl/spl.c common/spl/spl_ubi.c +1 more+91 -01 reply
6/26spl: zImage support in Falcon modearch/arm/lib/Makefile arch/arm/lib/bootm.c arch/arm/lib/zimage.c +1 more+65 -321 reply
7/26armv7: add reset timeout to identify_nand_chiparch/arm/cpu/armv7/omap3/spl_id_nand.c arch/arm/include/asm/arch-omap3/sys_proto.h+15 -191 reply
8/26armv7: make gpmc_cfg constarch/arm/cpu/armv7/omap-common/mem-common.c arch/arm/include/asm/arch-omap3/sys_proto.h drivers/mtd/nand/omap_gpmc.c +1 more+8 -91 reply
9/26armv7: armv7: introduce set_gpmc_cs0arch/arm/cpu/armv7/omap-common/mem-common.c arch/arm/include/asm/arch-omap3/sys_proto.h include/linux/mtd/omap_gpmc.h+92 -581 reply
10/26armv7: simplify identify_nand_chiparch/arm/cpu/armv7/omap3/spl_id_nand.c+11 -241 reply
11/26mtd: OneNAND: add timeout to wait ready loopsdrivers/mtd/onenand/onenand_base.c+19 -111 reply
12/26mtd: OneNAND: allow board init function failboard/micronas/vct/ebi_onenand.c board/samsung/goni/onenand.c board/samsung/smdkc100/onenand.c +3 more+28 -201 reply
13/26mtd: OneNAND: initialize mtd->writebufsize to let UBI workdrivers/mtd/onenand/onenand_base.c+1 -01 reply
14/26cmd: mtdparts: fix mtdparts variable presence confusion in mtdparts_initcmd/mtdparts.c+6 -41 reply
15/26cmd: mtdparts: fix null pointer dereference in parse_mtdpartscmd/mtdparts.c+13 -101 reply
16/26cmd: mtdparts: consolidate mtdparts reading from envcmd/mtdparts.c+20 -221 reply
17/26cmd: mtdparts: use defaults by defaultcmd/mtdparts.c+16 -61 reply
18/26cmd: mtdparts: support runtime generated mtdpartscmd/mtdparts.c+12 -91 reply
19/26igep00x0: move sysinfo into C fileboard/isee/igep00x0/igep00x0.c board/isee/igep00x0/igep00x0.h+18 -181 reply
20/26igep00x0: reorder lan9221 code to remove ifdefsboard/isee/igep00x0/igep00x0.c+17 -241 reply
21/26igep00x0: remove useless setup_net_chip declarationboard/isee/igep00x0/igep00x0.h+0 -21 reply
22/26igep00x0: remove unused empty function omap_rev_string()board/isee/igep00x0/igep00x0.c+0 -81 reply
23/26igep00x0: runtime flash detectionboard/isee/igep00x0/igep00x0.c+53 -181 reply
24/26igep00x0: UBIizeconfigs/igep0020_defconfig configs/igep0020_nand_defconfig include/configs/omap3_igep00x0.h+41 -752 replies
25/26igep00x0: generate default mtdparts according NAND chip usedboard/isee/igep00x0/igep00x0.c include/configs/omap3_igep00x0.h+19 -01 reply
26/26igep00x0: Falcon modeboard/isee/igep00x0/igep00x0.c+12 -01 reply

Reviews trailers per patch

7 of 26 patches have a Reviewed-by or Acked-by.

PatchTom RiniHeiko SchocherScott WoodEnric Balletbo i Serra
1/26R-b R-b
2/26R-b R-b A-b
3/26
4/26R-b A-b
5/26R-b
6/26R-b
7/26
8/26
9/26
10/26
11/26
12/26
13/26
14/26
15/26
16/26
17/26
18/26
19/26
20/26
21/26
22/26
23/26
24/26R-b
25/26
26/26R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v5 thread

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

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
Signature · 1 line
2.1.4