Skip to contentSkip to conversation

What is recommended way to partition mtdram device

DISCUSSION MikeW 1 participant 2 messages Mar 27, 2007 – Apr 23, 2007 Memory technology devices (MTD)

lore
Share & tools
lore

MikeW

author
#0 lore raw

I require a partitioned mtdram device for system emulation purposes.

The documentation says that the ways to partition an MTD device are:
1) boot cmd line
2) table of data in device
3) create a map driver

If mtdram is to be loaded with modprobe (desktop Linux), that rules out 1).

So can I create partitions by dd-ing a partition table at the start of the device ?
Can I create a map driver for the device to describe the partitions ?

Thanks,
MikeW

author
#1 lore raw

Re: What is recommended way to partition mtdram device - workaround

Quoted 8 lines · MikeW <mw_phil <at> yahoo.co.uk> writes:

I require a partitioned mtdram device for system emulation purposes.

The documentation says that the ways to partition an MTD device are:
1) boot cmd line
2) table of data in device
3) create a map driver

Quoted 8 lines

If mtdram is to be loaded with modprobe (desktop Linux), that rules out 1).

So can I create partitions by dd-ing a partition table at the start of the device ?
Can I create a map driver for the device to describe the partitions ?

Thanks,
MikeW

Finally used '--bind' mount option to remount different parts of the current filesystem ('/opt/mtdblock0...n').

Allowed initial testing of the filesystem mounting and partition allocation.

Just a simple compile-time #define to switch between /opt/mtdblockN -> /dev/mtdblockN flags=MS_BIND -> 0
fstype="" -> "JFFS2"

Good luck.

MikeW