Skip to contentSkip to conversation

Possibly a FAQ or stupid question

DISCUSSION Ian S. Nelson 3 participants 3 messages Dec 5, 2000 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

but is there an MTD how-to or anything?

I'm talking about a real idiot's guide, I'm just kind of hacking my way through a project and I am rapidly approaching the time when I will need a flash burner program.

Can I just dd to the flash? Assuming that my AMD flash works with CFI...

I've also skimmed the archives on JFFS, any pros and cons vs. an initrd and burning it in there linearly? Right now my boot loader will boot strap a kernel out of flash and then I hacked the kernel to scan for my initrd in flash and it will decompress it and run, works like a champ but I need a way to put a new initrd in there now. Is JFFS compressed? Can I set aside a few K at the end of flash for my boot loader and then a few hundred at the beginning for my kernel and use JFFS in the middle?

thanks,
Ian

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

#1 lore raw
Quoted 1 line · [email protected] said:

Can I just dd to the flash? Assuming that my AMD flash works with CFI...

No. you have to use the MEMERASE ioctl first. The doc_loadbios program in the utils directory of the CVS tree will do this for you. Ignore the name, which I should probably change - it's not just for the DiskOnChip.

Quoted 4 lines · [email protected] said:

Right now my boot loader will boot strap a kernel out of flash and
then I hacked the kernel to scan for my initrd in flash and it will decompress it and run, works like a champ but I need a way to put a new initrd in there now.

That works. As RAM is cheaper than flash, it makes a lot of sense to do that, in the absence of a compressed writable flash filesystem.

Quoted 1 line

Is JFFS compressed?

Not yet. Soon. Watch this space.

Quoted 2 lines

Can I set aside a few K at the end of flash for my boot loader and then a few hundred at the beginning for my kernel and use JFFS in the middle?

Yep. You can muck about with the partitioning all you like.

--
dwmw2

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

#2 lore raw
Quoted 5 lines · David Woodhouse
Quoted 1 line · [email protected] said:

Can I just dd to the flash? Assuming that my AMD flash works with CFI...

No. you have to use the MEMERASE ioctl first.

Well... not if using /dev/mtdblock.

To update my kernel in flash I simply use

cp zImage /dev/mtdblock1

Nicolas

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