How to combine two MTD into a single MTD device?

Nov 09, 2004 1 Replies

The follow is my flash partition: +-------------+ | MTD1 | (size 3M) +-------------+ | Bootloader | (size 128K) +-------------+ | MTD2 | (size 3M) +-------------+ | MTD3 | +-------------+ How to combine MTD1 and MTD2 into a single MTD? So if I have a 5M size kernel image, then I do "dd if=kernel_image of=/dev/mtdblockX" command, the MTD driver will copy 3M size into MTD1 and copy 2M size into MTD2. Thanks in advance.


The MTD subsystem has a "concat layer" which allows you to do just that. Look at mtdconcat.c and maps/{sc520cdp,dilnetpc}.c for some sample map drivers.

Rob

Robert Kaiser email: rkaiser AT sysgo DOT com SYSGO AG http://www.elinos.com Klein-Winternheim / Germany http://www.sysgo.com

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required