Hi, 
 
With minimal memory alternative options would be to stream the image to your 
flash.
 
If your system is minimal, maybe you do not need to keep a flash fs mounted.  
Can your system remain up if you unmount the existing jffs root?  
 
If so, and if ram/flash is at a premium, it is possible to execute a simple 
program that does all upgrade.
 
The program would need to:
 
- unmount root, e.g. system( "umount /dev/root" )
- use mtd calls to unlock/erase flash
- receive upgrade package. .
- as file comes in, write to flash.
- once written to flash ok, the partition can be remounted from within the 
process, e.g. system( "mount <root dev>") 
- if the program is running from a /tmp tmpfs, it could be restarted on 
failure, until the rootfs is restored. 
 
Rather then write a program from scratch, one of the simple embedded web 
servers out there can be modified to recieve post of file.   I believe uclinux 
has sparse httpd.
 
If you do something like this the possiblity of failing in the middle of 
upgrade is likely.  A fail safe image or bootloader with upgrade option would 
be needed to keep the system recoverable.  
 
The best place for an upgrade is sometimes the bootloader, maybe when an 
upgrade is requested, jump to bootloader and leave up to the bootloader.
 
It may be too that your options for upgrade would improve by minimizing the 
size of the root partition, or the part that needs to be upgraded.
 
Just suggestions, I don't know details of your requirments,
 
Matt
 
________________________________

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of advan
Sent: Wednesday, October 17, 2007 5:35 AM
To: uClinux development list
Subject: Re: RE: Re: [uClinux-dev] how to upgrade the jffs2 of root in linux


Hi,Matt 
the  netflash also needs enough memory space ,when I use './netflash -K -r 
/dev/mtd1 192.168.1.218 jffs2.bin' via tftpserver through ethernet , the 
netflash requestes  virtual memory  always to store the data and that it's very 
slow . like my case , the embedded device's memory is very limited . free 
memory is only 1M ,otherwise the size of jffs2.bin is 3M , it seems it's 
difficult to netflash too , 
what do you think ? 
Thank you very much 
 
Best Regards 
                              cookie 
 
________________________________

advan
2007-10-17
________________________________

发件人: Crane, Matthew
发送时间: 2007-10-16 21:16:37
收件人: uClinux development list
抄送: 
主题: RE: Re: [uClinux-dev] how to upgrade the jffs2 of root in linux
 
Can netflash upgrade a mounted root partition?
 
If you don't have the memory to mount the tmp partition in ram, then keep a 
small second tmp partition in your flash, switch to that, run netflash, and 
then switch back to the new main parttion. 
 
Matt

________________________________

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nikita Tabatsky
Sent: Tuesday, October 16, 2007 5:06 AM
To: uClinux development list
Subject: Re: Re: [uClinux-dev] how to upgrade the jffs2 of root in linux


Hi, Advan
 yes, netflash it's flash tool.
 sorry, i forgot to insert link :)
http://cvs.uclinux.org/cgi-bin/cvsweb.cgi/uClinux-dist/user/netflash/ 
Nik.


On 10/16/07, advan <[EMAIL PROTECTED]> wrote: 

        Hi,Nik
            Thank you , what is netflash ,it's a flash tool ?
         could you offer a link address ?
        
         Best Regards
                                     advan
         
        
________________________________

        advan
        2007-10-16
        
________________________________

        发件人: Nikita Tabatsky
        发送时间: 2007-10-15 17:54:26
        
        收件人: uClinux development list
        抄送: 
        主题: Re: [uClinux-dev] how to upgrade the jffs2 of root in linux
        
         
        Hi, Advan
        You can use netflash for upgrade your jffs2 partition.
        Nik.
        
        
        On 10/15/07, advan < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > 
wrote: 

                
                
                hi, everyone 
                
                  I build jffs2 as root file system in my embedded platform 
with uclinux os , I also build a web http server(boa) , through httpd server , 
I can upload a new jffs2 root file-system into the platform memery ,then I want 
to use new jfffs file to re-write jffs2 partition ,because linux is using this 
partition as its root file system , if I directly write it into the jffs2 
partition ,then linux will cause crash and errors . anybody know how to do ?
                
                thank you in advance 
                
                 
                
                                                   advan
                
                 
                
                
________________________________

                
                advan
                
                2007-10-15
                
                _______________________________________________
                uClinux-dev mailing list
                [email protected]
                http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
                This message was resent by [email protected]
                To unsubscribe see: 
                http://mailman.uclinux.org/mailman/options/uclinux-dev
                

        
        

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


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

Reply via email to