
Dear Afzal Nadirshah,
In message 174230991E95D743B0C91DF471EF44E8434F1C5787@MTW02MSG02.mindtree.com you wrote:
I would like to partition the NAND flash on a canyonlands board. As per my understanding, the partitioning is done using the "add_mtd_partitions" function in the file "drivers/mtd/mtdpart.c".
Look at the "mtdparts" command.
I also understand that the information about a partition is stored in the structure : "struct mtd_partition" . I could not find out where this structure is getting populated in the u-boot code.
How about trying something like "grep -lr mtd_partition *" ?
My aim is to add more such partitions on the NAND flash on my board. Any information regarding partitioning the flash is highly appreciated.
Reading the documentation is usually pretty helpful.
I really recommend it.
See for example http://www.denx.de/wiki/DULG/UBootCmdGroupFlash#UBootCmdFlMtdparts and http://www.denx.de/wiki/view/DULG/BootTimeConfigurationOfMTDPartitions
Also, you should definitely look into UBI support if you're using this on NAND flash.
Best regards,
Wolfgang Denk