[U-Boot] What is the corect way to define MTD partitions

Hi All
The example I'm working with probably does everything wrong, so I would like advise as to how we should define mtd partitions. The Boards Flash is divided into 7 partitions. The partitions are defined in the board.h file as extra env settings.
#define CONFIG_EXTRA_ENV_SETTINGS \ "mtdparts=mtdparts=0:16M@0x0(factory-image)," \ "16M@0x1000000(app-image-1),16M@0x2000000(app-image-2)," \ "16M@0x3000000(jffs2),16M@0x4000000(testing)," \ "16M@0x5000000(scratchpad)," \ "256k@0x7F40000(u-boot-env),512k@0x7F80000(u-boot-app)\0" \
Is this a acceptable way to set up MTD partitions ? If it is, is there a way for U-boot to insert MDT partitions into the FDT?
Or can i define the Flash partitions as part of my dts. Then have U-Boot extract the mtdpart info from the DTS blob and set up the mtdparts for U-Boot?
participants (1)
-
Pieter