Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
21 years ago

Specifying RAMFS location

How does one locate the RAMDISK? We have several possible locations in different RAMs: SDRAM, Staic RAM, internal ram. Where does the physical address of the /dev/RAM0..RAM16 get specified so we can locate it where we want?

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    If you're talking about a standard Linux RAM disk, it's created on the fly out of unused memory pages, like the disk cache is. Therefore, its storage is wherever main memory is.

    If there is some specific place you want to put a RAM disk, you could possibly set the kernel to not use that region of RAM, then use a device driver (the name escapes me) to treat the RAM as a file, connect to it with a loopback device (/dev/loop), then format it with some filesystem and put things there. Then you can take that file and copy it to somewhere else to save the RAM disk contents, and do the opposite operation (possibly from compressed flash?) to restore. I'm going from memory here, sorry I'm so vague.