
Hello Enric,
Miquel and I recently reworked drivers/mtd/mtdpart.c to get MTD partitions exposed as MTD devices (as is done in Linux) instead of having yet another abstraction to handle them (see what's currently done in cmd/{mtdparts,nand,sf,...}.c).
This lead us to duplicate the mtdparts/mtdids parsing logic we found in cmd/mtdparts.c, and while doing that we noticed that one function is only implemented by igep boards: board_mtdparts_default().
We'd like to get rid of this function if possible in order to simplify the mtdparts/mtdids retrieval logic, and there might be an easy solution to do that: use the CONFIG_{MTDPARTS,MTDIDS}_DEFAULT config options
CONFIG_MTDPARTS_DEFAULT="omap2-nand:512k(SPL),-(UBI);omap2-onenand:512k(SPL),-(UBI)" CONFIG_MTDIDS_DEFAULT="nand0=omap2-nand,onenand0=omap2-onenand"
It seems those defaults were built at runtime, and the only thing I'm not sure about is whether 512k for the SPL is always good. Looks like 4 eraseblocks are reserved for the SPL [1], but is the eraseblock size always 128k? If you don't know about the eraseblock size, maybe you know which OneNAND/NAND parts are used on these boards?
Regards,
Boris
[1]https://elixir.bootlin.com/u-boot/latest/source/board/isee/igep00x0/igep00x0...