public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* mtd block readonly low level nand driver cramfs
@ 2008-01-24  9:42 Max Stirling
  2008-01-27  8:54 ` Max Stirling
  0 siblings, 1 reply; 4+ messages in thread
From: Max Stirling @ 2008-01-24  9:42 UTC (permalink / raw)
  To: linux-mtd

Hi,

This might sound quite basic question. This is the first time I am 
looking into the MTD code so have some really basic questions.

I am trying to mount a read only fs (cramfs) on the flash. Please let me 
know if the following steps are right:

1. Enabled the following in the Kconfig files
    CONFIG_MTD_PARITIONS
    CONFIG_MTD
    CONFIG_MTD_BLOCK_RO
    CONFIG_MTD_NAND
    CONFIG_MTD_NAND_IDS


After booting the compiled kernel I am able to see the mtdblock under 
/proc/devices using 31 Major number.

Now for me to mount the cramfs image that is on the flash I need to 
provide the low level nand driver code. This I need to write but before 
starting that can any one point me to a reference nand driver code that 
is used for read only mount? Which functionality would the MTD require 
to be implemented for mounting a cramfs image which is on the flash.

Would appreciate any pointers to how to get started off with this.

thanks in advance for the reply.

M.S

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: mtd block readonly low level nand driver cramfs
  2008-01-24  9:42 mtd block readonly low level nand driver cramfs Max Stirling
@ 2008-01-27  8:54 ` Max Stirling
  2008-01-28  7:40   ` Max Stirling
  0 siblings, 1 reply; 4+ messages in thread
From: Max Stirling @ 2008-01-27  8:54 UTC (permalink / raw)
  To: linux-mtd

I was looking at the chips folder under MTD and the MTD_ROM flag settings.

I got this idea of having this low level driver code under chips with
the MTD_ROM flag set and mounting this for cramfs.

Please comment, especially folks using the RO FS mounted on flash.

MS

On Jan 24, 2008 3:12 PM, Max Stirling <vicky.irobot@gmail.com> wrote:
> Hi,
>
> This might sound quite basic question. This is the first time I am
> looking into the MTD code so have some really basic questions.
>
> I am trying to mount a read only fs (cramfs) on the flash. Please let me
> know if the following steps are right:
>
> 1. Enabled the following in the Kconfig files
>     CONFIG_MTD_PARITIONS
>     CONFIG_MTD
>     CONFIG_MTD_BLOCK_RO
>     CONFIG_MTD_NAND
>     CONFIG_MTD_NAND_IDS
>
>
> After booting the compiled kernel I am able to see the mtdblock under
> /proc/devices using 31 Major number.
>
> Now for me to mount the cramfs image that is on the flash I need to
> provide the low level nand driver code. This I need to write but before
> starting that can any one point me to a reference nand driver code that
> is used for read only mount? Which functionality would the MTD require
> to be implemented for mounting a cramfs image which is on the flash.
>
> Would appreciate any pointers to how to get started off with this.
>
> thanks in advance for the reply.
>
> M.S
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: mtd block readonly low level nand driver cramfs
  2008-01-27  8:54 ` Max Stirling
@ 2008-01-28  7:40   ` Max Stirling
  2008-01-30  6:37     ` Max Stirling
  0 siblings, 1 reply; 4+ messages in thread
From: Max Stirling @ 2008-01-28  7:40 UTC (permalink / raw)
  To: linux-mtd

Max Stirling wrote:
> I was looking at the chips folder under MTD and the MTD_ROM flag settings.
>
> I got this idea of having this low level driver code under chips with
> the MTD_ROM flag set and mounting this for cramfs.
>
> Please comment, especially folks using the RO FS mounted on flash.
>
> MS
>
> On Jan 24, 2008 3:12 PM, Max Stirling <vicky.irobot@gmail.com> wrote:
>   
>> Hi,
>>
>> This might sound quite basic question. This is the first time I am
>> looking into the MTD code so have some really basic questions.
>>
>> I am trying to mount a read only fs (cramfs) on the flash. Please let me
>> know if the following steps are right:
>>
>> 1. Enabled the following in the Kconfig files
>>     CONFIG_MTD_PARITIONS
>>     CONFIG_MTD
>>     CONFIG_MTD_BLOCK_RO
>>     CONFIG_MTD_NAND
>>     CONFIG_MTD_NAND_IDS
>>
>>
>> After booting the compiled kernel I am able to see the mtdblock under
>> /proc/devices using 31 Major number.
>>
>> Now for me to mount the cramfs image that is on the flash I need to
>> provide the low level nand driver code. This I need to write but before
>> starting that can any one point me to a reference nand driver code that
>> is used for read only mount? Which functionality would the MTD require
>> to be implemented for mounting a cramfs image which is on the flash.
>>
>> Would appreciate any pointers to how to get started off with this.
>>
>> thanks in advance for the reply.
>>
>> M.S
>>
>>
>>     
When using the cramfs as the fs for the flash and mtdblock_ro enabled. 
Which one should I be calling the user module, the cramfs or the 
mtdblock_ro?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: mtd block readonly low level nand driver cramfs
  2008-01-28  7:40   ` Max Stirling
@ 2008-01-30  6:37     ` Max Stirling
  0 siblings, 0 replies; 4+ messages in thread
From: Max Stirling @ 2008-01-30  6:37 UTC (permalink / raw)
  To: linux-mtd

[-- Attachment #1: Type: text/plain, Size: 2299 bytes --]

Max Stirling wrote:
> Max Stirling wrote:
>> I was looking at the chips folder under MTD and the MTD_ROM flag 
>> settings.
>>
>> I got this idea of having this low level driver code under chips with
>> the MTD_ROM flag set and mounting this for cramfs.
>>
>> Please comment, especially folks using the RO FS mounted on flash.
>>
>> MS
>>
>> On Jan 24, 2008 3:12 PM, Max Stirling <vicky.irobot@gmail.com> wrote:
>>  
>>> Hi,
>>>
>>> This might sound quite basic question. This is the first time I am
>>> looking into the MTD code so have some really basic questions.
>>>
>>> I am trying to mount a read only fs (cramfs) on the flash. Please 
>>> let me
>>> know if the following steps are right:
>>>
>>> 1. Enabled the following in the Kconfig files
>>>     CONFIG_MTD_PARITIONS
>>>     CONFIG_MTD
>>>     CONFIG_MTD_BLOCK_RO
>>>     CONFIG_MTD_NAND
>>>     CONFIG_MTD_NAND_IDS
>>>
>>>
>>> After booting the compiled kernel I am able to see the mtdblock under
>>> /proc/devices using 31 Major number.
>>>
>>> Now for me to mount the cramfs image that is on the flash I need to
>>> provide the low level nand driver code. This I need to write but before
>>> starting that can any one point me to a reference nand driver code that
>>> is used for read only mount? Which functionality would the MTD require
>>> to be implemented for mounting a cramfs image which is on the flash.
>>>
>>> Would appreciate any pointers to how to get started off with this.
>>>
>>> thanks in advance for the reply.
>>>
>>> M.S
>>>
>>>
>>>     
> When using the cramfs as the fs for the flash and mtdblock_ro enabled. 
> Which one should I be calling the user module, the cramfs or the 
> mtdblock_ro?
>
>
I have enabled the mtdblock_ro module and written a low lever chip 
driver code. Since I am mounting this as read-only I have set the type 
in mtd_info to MTD_ROM.


When I do a mount using command

# mount -t cramfs /dev/mtdblock mnt_cramfs
.
mtdblock_ro.c mtdblock_readsect
mtdblock_ro.c mtdblock_readsect
mtdblock_ro.c mtdblock_readsect
mtdblock_ro.c mtdblock_readsect
.
mount: Mounting /dev/mtdblock on cramfs failed: Invalid argument.

I created a cramfs image using cramfs utility and written that to flash. 
I tested the cramfs image by mounting on my local machine.

Is there anything that is missing here?


[-- Attachment #2: vicky_irobot.vcf --]
[-- Type: text/x-vcard, Size: 48 bytes --]

begin:vcard
fn:M S
n:S;M
version:2.1
end:vcard


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-01-30  6:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-24  9:42 mtd block readonly low level nand driver cramfs Max Stirling
2008-01-27  8:54 ` Max Stirling
2008-01-28  7:40   ` Max Stirling
2008-01-30  6:37     ` Max Stirling

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox