[PATCH] Make the mtdblock read/write skip the bad nand sector

Hans Zhang zhanghonghui at innofidei.com
Mon Nov 25 06:30:33 EST 2013


On 2013/11/25 18:23, Richard Genoud wrote:
>
> Well, yes, write through the char device would be a solution.
>> But, *why* are you writing through mtdblock instead?
>>
>>> I think that maybe it's an optional approach through mtdblock in case we do not have
>>> the mtd-tools in our environments, we do provider a simpler way to write the NAND
>>> through mtdblock.
>>>
>> Uh? simpler? Writing through mtdchat is as simple as it gets:
>>
>>   $ cat some_file.img > /dev/mtd0
>>
>> Sorry, but I'm still confused at what are you trying to accomplish.
> I think that what Hans wants to do is:
>  $ cat some_file.img > /dev/mtd0
> And that doesn't fail on a bad block but jumps over it.
> ... Which is a bad idea.
> But, likeyou, I didn't figured out why mtdblock instead of mtdchar.
>
>

I'm sorry it's my mistake, I thought the NAND need to be erased explicitly in userspace
before written when through the mtdchar device. That's why I use the mtdblock instead of
mtdchar.

Please ignore this patch, and thank you all for so kindly.

“This E-mail and its attachments may contain legally privileged or confidential information from Innofidei Corporation. Any unauthorized copy, use, disclosure or distribution of this information is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by E-mail or telephone and delete this E-mail and all its attachments immediately.
本邮件及其附件内容可能包含创毅公司享有专有法律权利的或者需要保密的信息。严禁任何人未经发件人许可以任何形式复制、使用、披露或者散发此项信息。如果您不是该收件人,请您立即通过邮件或者电话通知发件人并立即删除本邮件及其附件内容.”





More information about the linux-mtd mailing list