[uClinux-dev] embedded device ,mount problem

advan advan at rexian.com
Mon Oct 29 04:31:51 EST 2007


Hi ,everyone 

  In my mips R4x CPU embedded device with linux kernel-2.4.25 , I want to  mount Jffs2 and cramfs filesystem , I have compiled LOOP block device and jffs2 and cramfs supported in kernel.

base information :
#cat /proc/devices
Character devices:
  1 mem
  2 pty/m%d
  3 pty/s%d
  4 tts/%d
  5 cua/%d
 10 misc
 90 mtd
128 ptm
136 pts/%d
162 raw

Block devices:
  7 loop
 31 mtdblock

# cat /proc/filesystems
nodev   rootfs
nodev   bdev
nodev   proc
nodev   sockfs
nodev   tmpfs
nodev   shm
nodev   pipefs
        cramfs
nodev   ramfs
nodev   devfs
        jffs2

 #mount
/dev/mtdblock1 on / type jffs2 (rw)
/proc on /proc type proc (rw)
tmpfs on /tmp type tmpfs (rw)
/dev/mtdblock2 on /mnt/user type jffs2 (rw)

#ls -l /dev/loop*
brw-r--r--    1 0        0          7,   3 /dev/loop3
brw-r--r--    1 0        0          7,   2 /dev/loop2
brw-r--r--    1 0        0          7,   1 /dev/loop1
brw-r--r--    1 0        0          7,   0 /dev/loop0

my steps and process : (jffs2.bin is a jffs2 filesystem file that is able to be mounted in X86-host with Redhat-9.3 )

Method 1: 
  #losetup /dev/loop1 /tmp/jffs2.bin   
  #mount -t jffs2 -o loop /dev/loop1 /mnt/loop/
<7>jffs2: attempt to mount non-MTD device 07:01
mount: Mounting /dev/loop1 on /mnt/loop failed: Invalid argument

Method 2:
  #mount -t jffs2 -o loop /tmp/jffs2.bin /mnt/loop/
mount: Mounting /tmp/jffs2.ap61.user on /mnt/loop failed: Block device required


I also read source codes in fs/jffs2/super.c ,it seems super block's major number isn't the same as MTD_BLOCK_MAJOR( 31) ,but I don't know how to solve Method 1 problem , otherwise,I would like to know why not to find block device (loop device) in method 2. Please give me some clue ,thank you very much 

Regards 
                                                             advan 







advan
2007-10-29
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.uclinux.org/pipermail/uclinux-dev/attachments/20071029/5668f3ae/attachment.html


More information about the uClinux-dev mailing list