
Dear Udi,
in message fsrgav0iq16cgicc588ms3p7nvc2gtogbb@4ax.com you wrote:
In an ideal world, I would like the DiskOnChip to be:
Maybe you can find some useful information in section ``7.3. Using Disk On Chip "Drives"'' at http://www.denx.de/doc/CPU86/advanced-topics.html#DISK-ON-CHIP
- Partition into one or more partitions
You can use "nftl_format" to crewate a "binary partition" (which is ideal to hold one or more Linux kernel images) and you can use "fdisk" to partition the remainder of the DoC in the classical way.
- Boot the kernel from a file in one of the partitions (could be FAT)
Put the kernel in the binary partition, and boot it from there.
Or extend U-Boot and add MSDOS filesystem support.
- mount root from separate partition, (if kernel is on FAT), or same
partition as the kernel (if possible).
Put the kernel in the binary partition, and mount one of teh regular partitions as root filesystem.
I'm slightly confused as to the status of JFFS2, DOS partitioning, DOS FAT/VFAT, and the DiskOnChip support. More specifically:
JFFS2 has nothing to do with this. DOS FAT/VFAT support is non- existent.
- As far as I can tell, the only DiskOnChip support are the "doc read" and
"doc write" commands, therefore if I use these commands I must load the kernel directly off the raw sectors - no filesystem support whatsoever. Am I correct?
No, you are not correct.
First, the "doc" command provides more sub-commands, like "doc info" or "doc erase".
"help doc" helps ;-)
- Does the "doc read" and "doc write" use the NFTL layer, or do they access
the raw device sectors?
They do not use NFTL. They use raw binary offset addresses.
- As far as I can tell, the FAT support is hardwired to the floppy controller
device, and the DOS partition support is wired to the IDE support. Am I right?
???
It seems to me it is quite trivial to construct a simple interface (a struct containing the block device geometry, plus a pointer to sector read function), and have both the partitioning and the DOS FAT code access this. This could help support DOS filesystems on D.O.C, floppies and IDE devices.
Are you talking about U-Boot or Linux here?
- What is the best way to achieve my requirements above? (booting a kernel
from a filesystem on the D.O.C). Can JFFS2 help me in any way?
See the document mentioned above. It contains pretty detailed instructions. And no, JFFS2 has nothing to do with it.
- Failing all the above, can I partition the device under Linux into 2
partitions, write down the sector range for the 1st partition, and use it to read/write the kernel using the "doc read" and "doc write interface"? I would then mount the 2nd partition after booting the kernel.
Yes, you can do that. See above.
Best regards,
Wolfgang Denk