Where NAND UBI partitions are created


I would like to know where all the NAND partitions are created in OpenWRT build ?
Is there any file which defines the partition size and volume names for creating partitions ?


Generally in the DTS for the board.

Which board? (They're in different places in the OpenWrt source tree for different platforms)

This board is based on IPQ4019.


The often-referenced qcom-ipq4019.dtsi is downloaded with the Linux tarball and patched by OpenWrt. make target/linux/{clean,prepare} will do that without a full build. Select "any" ipq40xx target in your config prior, so that the ipq40xx config and patches are used. With a build I have lying around from some time ago


uBoot defines the NOR/NAND space as MTD devices...

With Device Tree devices, DTS comes into play on kernel boot to inform the kernel on where things need to land and then UBI takes over and defines the UBIFS partitions.

I'm summarizing, and things in bootloader/early kernel boot are a bit more complicated...