Skip to contentSkip to conversation

XIP on mtdram

DISCUSSION Rogelio M. Serrano Jr. 2 participants 3 messages Jul 26, 2000 1 message not in the archive Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

How can we do XIP on mtdram? Please enlighten me on this subject. I have not heard of the subject before. And I have no idea how it is done. I need to eliminate the use of ramdisks due to severe hardware requirements and very difficult specs. The mtdram device is the best answer to my problem. This must be put on production next week.

To unsubscribe, send "unsubscribe mtd" to [email protected]

#1 lore raw

Why can you use mtdram but not a normal ramdisk? The main advantage in that would be if you could eliminate the block device code and save a few pages of kernel code/data - but we haven't actually extracted it from the VM code yet, so we can't do that yet.

We don't currently have XIP in place for JFFS. You'd have to make sure the actual data in the nodes were page-aligned in the host memory, and remained that way on GC. It's possible, but we've not looked at it yet.

Also, as flash is more expensive than RAM, it's cheaper to do compression, which means you obviously can't do XIP.

If you really have to have XIP from a filesystem stored in RAM, look at ramfs.

--
dwmw2

To unsubscribe, send "unsubscribe mtd" to [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 5 lines · [email protected] said:

I really have to because i can have no more than 32 M ram and 4 M norflash. Can ramfs be mounted as root partition? I can almost boot linux straight off the bios chip now. I need to read a filesystem image off the flash, mount it as root and mount the flash filesystem array.

At the moment, you _have_ to execute your binaries from RAM. There's no alternative. Using a ramdisk, ramfs, or mtdram will all use up pages of that RAM, so there's no advantage in doing that over just using JFFS on the flash and having the page cache store it for you.

In fact, by using JFFS on the flash, at least the kernel can discard the pages from RAM when they're not in use, so in fact you're better off that way.

With some hacking, it's theoretically possible to get XIP working on JFFS. You're unlikely to get that running in a week, though. My advice is to go with JFFS directly on the flash.

--
dwmw2

To unsubscribe, send "unsubscribe mtd" to [email protected]