[uClinux-dev] Problem re-programming a CRAMFS filesystem, need help !

Sreecharan Sivadevuni mailsreecharan at yahoo.co.uk
Mon Aug 22 00:53:24 EDT 2005


David,
        please find my responses embedded with your
questions .
--- David McCullough <davidm at snapgear.com> wrote:

> 
> Jivin Sreecharan Sivadevuni lays it down ...
> > Hello all,
> > 
> > I have a 4MB Intel flash on my board the starting
> > address of which is memory mapped at 0x00400000
> linear
> > memory address. now using a flash programmer's
> utility
> > i program  the flash as shown here under
> > 
> > 
> > ;File                  FlashAddr   Comment
> > ;-------------------   ---------   -----------
> > boot-ldrCX821xx.bin    00400000    ;Boot loader
> > linuz                  00410000    ;Compressed
> kernel
> > image
> > image_usr.cramfs       00500000    ;File system I
> > (cramfs)
> > image.cramfs           00700000    ;File system II
> > (cramfs)
> > 
> > 
> > So I have a bootloader, kernel image, filesystem
> > I(/usr) and filesystem II(/) as shown and I am
> able to
> > mount both filesystems, Filesystem II(root fs) at
> boot
> > time and other Filesystem I(/usr)on demand.
> > 
> > Now I am using a flash programming utility
> (something
> > like 'netflash') to re-program the filesystem
> I(/usr),
> > but after re-programming the flash with another
> > 'cramfs' filesystem I am not able to mount the
> > filesystem anymore and I get the following error
> > message:
> > 
> > ------------------------
> > cramfs: wrong magic
> > mount: wrong fs type, bad option, bad superblock
> on
> > /dev/Blkmem1,
> >        or too many mounted file systems
> > -------------------------
> > 
> > It means kernel doesnot detect the 'cramfs'
> filesystem
> > at the location anymore !
> > 
> > So can someone tell me where I am getting wrong;
> am I
> > allowed to reprogram a 'cramfs' flash filesystem
> the
> > way I am doing now. Just for the sake of
> information,
> > I am able to re-program the flash at the location
> > where my kernel image is sitting(linuz) with
> another
> > kernel image, and it works fine !
> > 
> > would appreciate any help.
> 

> Have you looked at the device where you have
> programmed the cramfs
> image to see if it is the same as the image you are
> programming in ?

Yeah, I tried using the same 'cramfs' image as well as
a different one, but the result is always the same.

 
> Have you ever been able to put a cramfs image in
> this partition and
> mount it ?

Yes as soon as I boot up and get a command prompt I
use the command "mount -t cramfs /dev/Blkmem1
/var/usr" and I can see the filesystem is mounted
correctly with all the directories intact. here is a
layout of everything I do

#mount -t cramfs /dev/Blkmem1 /var/usr
#cd /var/usr
#ls
#cd /
#umount /var/usr

/* Now I use either netflash or another utility
program  to re-program the flash, and I have a
image_usr.cramfs in /var/bin by NFS */

#cd /var/bin
#netflash -k -r /dev/Blkmem1 ./image_usr.cramfs

/* Here I get a lot of failures reported by "Blkmem"
in writting to flash, but the execution finishes after
some time */

#mount -t cramfs /dev/Blkmem1 /var/usr

cramfs: wrong magic
mount: wrong fs type, bad option, bad superblock on
/dev/Blkmem1,
       or too many mounted file systems

> I would be checking it is doing what you think it is
> :-)

Now can you tell me what is expected behaviour; is it
possible to create a filesystem like I am trying to do
?

> Cheers,
> Davidm
> 
> -- 
> David McCullough, davidm at cyberguard.com.au, Custom
> Embedded Solutions + Security
> Ph:+61 734352815 Fx:+61 738913630
> http://www.uCdot.org http://www.cyberguard.com
> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev at uclinux.org
>
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev at uclinux.org
> 

Thanks
Sreecharan.S


	
	
		
___________________________________________________________ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com



More information about the uClinux-dev mailing list