combine 2 mtds into a single mtd device?
The follow is my MTD partition:
+-------------+
| MTD1 | (size 3M)
+-------------+
| Bootloader | (size 128K)
+-------------+
| MTD2 | (size 3M)
+-------------+
| MTD3 |
+-------------+
How to combine MTD1 and MTD2 into a single mtd device?
So if I have a image(5M), wehn I do "dd" command, mtd driver
will copy 3M into MTD1 and copy 2M into MTD2.
Thanks.
===================================================================
�s�����A�l�G�K�O 10MB �H�c+��ï+�ӤH����
http://mp.sina.com.tw/help/help.html
===================================================================
Hi!
Look at drivers/mtdconcat.c. This implements a device concatenation layer. Every function is included to handle multiple MTD devices as a virtual one. The virtual device must be created with the exported mtd_concat_create function, and must be destroyed with the mtd_concat_destroy after use. This function does not register devices, you should write a module which calls mtd_concat_create with proper parameters and registers the newly created device.
For example, drivers/mtd/maps/dilnetpc.c is a good starting point.
--
pajko
Quoted 3 lines · On Tue, 09 Nov 2004 16:32:02 +0800, <[email protected]> wrote:
The follow is my MTD partition:
How to combine MTD1 and MTD2 into a single mtd device?