Skip to contentSkip to conversation

I have one question about MTD.

U-Boot-Users Jacob Chan 2 participants 2 messages Jul 3, 2003

lore
Share & tools
lore

Jacob Chan

author
#0 lore raw

Dear all,
How could I turn on the MTD support in u-boot?
I don?t know how to do that?
I want to use the setenv command to set (assume I used 32MB Flash) mtd0 0x00000000,0x00040000 ? u-boot
mtd1 0x00040000,0x000E0000 ? kernel
mtd2 0x000E0000,0x01F00000 ? filesystem
mtd3 0x01F00000,0x01FF0000 ? reserved
the left space 0x01FF0000,0x02000000 ? for env
Then the kernel will get those parameters to set MTD. Can I do that and not need to modify u-boot ?
Your reply and support will be highly appreciated.

Thank you for your time and attention

Jacob Chan
Jacob_chan at so-net.net.tw

#1 lore raw
Quoted 3 lines · In message <000201c34149$a33d7dc0$a865a8c0@ThinkPadX31> you wrote:
Quoted 1 line

How could I turn on the MTD support in u-boot?
I don??t know how to do that?

There is no MTD support in U-Boot. MTD is a software layer whcih is used in Linux. U-Boot does not use anything like that.

Quoted 8 lines

I want to use the setenv command to set (assume I used 32MB Flash) mtd0 0x00000000,0x00040000 ?? u-boot
mtd1 0x00040000,0x000E0000 ?? kernel
mtd2 0x000E0000,0x01F00000 ?? filesystem
mtd3 0x01F00000,0x01FF0000 ?? reserved
the left space 0x01FF0000,0x02000000 ?? for env
Then the kernel will get those parameters to set MTD. Can I do that and not need to modify u-boot ?

There are several ways to do that, and none of them require to modify U-Boot.

Option 1 is to use a static "partition" map; to do so you will have to provide a MTD map file for your board in the Linux kernel tree (directory drivers/mtd/maps/).

Option 2 is to use command line partition table parsing (option CONFIG_MTD_CMDLINE_PARTS) and provide the required boot arguments on the Linux command line.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
"Beware of bugs in the above code; I have only proved it correct, not
tried it."                                             - Donald Knuth