Writing data to Flash

Subrahmanyam subrahmanyam at navayuga.co.in
Mon Dec 13 07:23:49 EST 2004


Hi Stephan,

Our target board consists of a IOP80321 processor with 16mb of flash and 
512mb ram which basically consists of RedHat ecos, but the basic build 
environment in the host side is a Monta Vista Linux OS. When we connect to 
the target through "minicom" tool and when red boot is in the process of 
booting, we basically stop the booting process by which red boot prompt 
appears. It is here that fis-meaning flash image system comes into effect, 
wherein one can create partitions. It is in this context that I have thought 
of to load the key into the flash. Is this approach correct or not!

You have said that you create a new flash mapping file in mtd/maps 
directory, can you please suggest a method by which I can proceed. I have 
looked into the mtd/maps directory in which there are number of files, 
please suggest which file is the one I have to start with, for acheiving 
writing data (key) to the flash, dynamically, after the target has been 
identified by the host.


You have said you write a C program that uses normal file access functions 
to read/write the data, do you load this program/file into the flash or does 
it reside in the target. Where exactly does the flash partition inode has to 
be set up in the /dev directory. How to use this mknod tool.

Kindly suggest an approach.

Thanks,
Subrahmanyam.





----- Original Message ----- 
From: "Stephan Linke" <Stephan.Linke at epygi.de>
To: "Subrahmanyam" <subrahmanyam at navayuga.co.in>
Sent: Monday, December 13, 2004 05:25 PM
Subject: RE: Writing data to Flash


> Hi Subrahmanyam,
>
> what kind of operating system do you use? Unfortunately I don't know this 
> "fis"
> tool.
> It sounds like you are not working in a linux kernel environment.
> The way I do it I am writing a "new" flash mapping file for mtd/maps that
> supports the flash layout for my target system. I do run the new linux 
> kernel
> which provides the new partition layout for the flash. And then I write a 
> new C
> program that uses normal file access functions to read/write the data. The 
> flash
> partition inode. has to be set up in the /dev directory using the mknod 
> tool. In
> the Documentation directory of the linux kernel you can find the correct 
> device
> mappings for this.
> How to load the data into RAM depends verry much on you operating system. 
> If you
> run linux you can simply use the ftp tool to place a copy of the file in 
> your
> filesystem. If you are runing some kind of bootloader you actualy have to 
> read
> the bootloader documentation. In that case I can be of verry little help. 
> But
> most likely there is some tftp download support you can use.
>
> Regards, Stephan
>
>> -----Original Message-----
>> From: linux-mtd-bounces at lists.infradead.org
>> [mailto:linux-mtd-bounces at lists.infradead.org]On Behalf Of Subrahmanyam
>> Sent: Montag, 13. Dezember 2004 11:25
>> To: linux-mtd at lists.infradead.org
>> Subject: Writing data to Flash
>>
>>
>> Hi Stephan,
>>
>> In my target there is a Redhat ecos wherein basically I can find out the
>> usnused & used partiitions. To store data (ex: string) in the flash 
>> firstly
>> I need to load the file into the RAM using the "fis load" command,
>> thereafter I need to create a partition in the flash based on the data in
>> the RAM using the command "fis create".
>>
>> To acheive it, the first step is how exaclty should I load data into the
>> (target's) RAM. After the data is available in the target's RAM then only 
>> I
>> can create a partition and store data into the flash.
>>
>> Kindly suggest a suitable approach.
>>
>> Thanks,
>> Subrahmanyam.
>>
>>
>> ______________________________________________________
>> Linux MTD discussion mailing list
>> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>>
> 





More information about the linux-mtd mailing list