Hi Ashish,

On 22/03/13 23:28, Ashish Phogat wrote:
Hi folks,
I have some basic problem:

I have my uclinux currently running on Coldfire board from RAM. I have romfs as 
my file system but that is read only file system.I donot enable MTD support, 
blckmem is also disabled.

I enabled a RAM disk(CONFIG_BLK_DEV_RAM) and initrd(CONFIG_BLK_DEV_INITRD) and 
choose rootfs as my filesystem.


Now I want to change my configuration so that I have a writable filesystem in 
RAM.

I am confused with the configurations I need to set to choose a writable file 
system for uclinux running from RAM.

What uclinux configuration I need to select to boot uclinux in RAM with 
writeable filesystem?

I guess I donot need MTD because that is used for FLASH memory, Neither I need 
blckmen that is also for FLASH memory. I need to just create a block on RAM and 
just put a filesystem on that block.

Please correct me if I am wrong.

Please also proivde the reason which and why a particular configuration is 
enabled. What role the config is playing in writeable filesystem?

I have done this in the past, using a RAM disk as the root on a
ColdFire board. But it has been quite a few years since I last
did it.

All you should need in the kernel is:

    CONFIG_BLK_DEV_RAM=y
    CONFIG_BLK_DEV_RAM_SIZE=4192
    CONFIG_BLK_DEV_INITRD=y

Adjust the CONFIG_BLK_DEV_RAM_SIZE to something that makes sense
for you. And you need to enable the filesystem type of course too.
So if you are using an ext2 then enable CONFIG_EXT2_FS.

You do not require MTD or blkmem drivers in the kernel, do not
enable them.

The next thing you need to do create your base root filesystem.
If using EXT2 for example you will use the genext2fs tool.
There is plenty of examples in the uClinux-dist if you grep
for it.

After all this you need to modify your boot args to pass in
the address of the rootfs image in RAM too. From memory you
want something like:

    initrd=0x400000,4M root=/dev/ram0

Regards
Greg


_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to