Making partitions questions.
Hi,
I have some questions about making partitions on Intel CFI chips.
1. I read mtd-jffs-HOWTO, and found that can't launch fdisk and create partitions on my flash dynamically. It have to be created and compiled in a lowlevel driver. What is the reason? Is anybody working at it?
2. I wish to have several partitions on my flash. Can i have partitions with different filesystems on it? I mean one partition with FTL & ext2 and other with JFFS2 for example.
Thanks in advance.
Hi Alexandr!
Quoted 3 lines
1. I read mtd-jffs-HOWTO, and found that can't launch fdisk and create partitions on my flash dynamically. It have to be created and compiled in a lowlevel driver. What is the reason? Is anybody working at it?
The reason why this have to be done is that the mtd partition driver needs to know the partition information before it can register those partitions as devices (it basically just goes and setup MTD structures for each partition and register them the normal way).
In order to actually make a userland utility you'd have to implement a system call to actually send the info to the partition driver which will have to reregister the devices. Not all that difficult, but I don't think anybody is working on it right now.
Quoted 4 lines
2. I wish to have several partitions on my flash. Can i have partitions with
different filesystems on it? I mean one partition with FTL & ext2 and other with JFFS2 for example.
Yes. As long as you compile your kernel with MTD block device support it, you can put anything on those block devices. I wouldn't use ext2 on flash tho since it's not optimised for flash - jffs2 is definitely your best bet.
Signature · 15 lines
Regards Abraham Today is National Existential Ennui Awareness Day. __________________________________________________________ Abraham vd Merwe - 2d3D, Inc. Device Driver Development, Outsourcing, Embedded Systems Cell: +27 82 565 4451 Snailmail: Tel: +27 21 761 7549 Block C, Antree Park Fax: +27 21 761 7648 Doncaster Road Email: [email protected] Kenilworth, 7700 Http: http://www.2d3d.com South Africa
Quoted 4 lines · [email protected] said:
In order to actually make a userland utility you'd have to implement
a system call to actually send the info to the partition driver which will have to reregister the devices. Not all that difficult, but I don't think anybody is working on it right now.
You don't necessarily need to be able to change them at runtime. We already support a few methods of storing partitioning information on the medium rather than hard-coding it in the mapping driver. We can grok RedBoot FIS tables, Compaq bootldr partitions, and also the ARM Firmware Suite layout.
Quoted 4 lines · [email protected] said:
Yes. As long as you compile your kernel with MTD block device support
it, you can put anything on those block devices. I wouldn't use ext2 on flash tho since it's not optimised for flash - jffs2 is definitely your best bet.
He said ext2 on FTL. That's sane, but possibly not legal, depending on whether software patents are enforceable in your part of the world.
--
dwmw2
Quoted 4 lines · David Woodhouse
You don't necessarily need to be able to change them at runtime. We already support a few methods of storing partitioning information on the medium rather than hard-coding it in the mapping driver. We can grok RedBoot FIS tables, Compaq bootldr partitions, and also the ARM Firmware Suite layout.
I need to be able to change it while development. I need to create and modify partitions dynamically, because the size of partitions can be variable during development stage. I want to have one partition for the kernel with no filesystem on it at all, the second partition for ext2 filesystem with read only accesses, and the third for the JFFS2 full functional filesystem.
Is there any common userland utils for creating RedBoot, Compaq or ARM partitions?
Quoted 4 lines · Abraham vd Merwe
The reason why this have to be done is that the mtd partition driver needs to know the partition information before it can register those partitions as devices (it basically just goes and setup MTD structures for each partition and register them the normal way).
Fine. But, why we can't just use MBR and common IDE partition table instead of RedBoot, Compaq, ARM and other specific partitions?
Quoted 4 lines
In order to actually make a userland utility you'd have to implement a system call to actually send the info to the partition driver which will have to reregister the devices. Not all that difficult, but I don't think anybody is working on it right now.
I guess, we can do the similar to IDE things. And it allows us to use habitual fdisk utility with flash. But it also means, that whole flash device have to be registered ( /dev/mtdblocka for example ). Is it worth while? Is this work usable?