2010-02-24 03:06:15 cramfs : mount failure
Santhosh Kumar (INDIA)
Message: 86419
Hi,
Am trying to use cramfs file system for my flash in BF527 board.
Enabled cramfs support in File Systems->Miscellaneous filesystems->Compressed ROM file system support (cramfs)
Also enable mkcramfs utility in File System Applications.
Am facing following problems, Not able to identify its a configuration issue or cramfs utility issue. Please let us know if there are any problems in my configuartion
1) Mount failure
mount -t cramfs /dev/mtdblock2 /mnt/test
mount: mounting /dev/mtdblock2 on /mnt/test failed: Invalid argument
2) cramfs image creation results in crash
mkcramfs mycramfs mycramfs.cramfs
Log attached below,
## Booting kernel from Legacy Image at 02000000 ...
Image Name: Linux-2.6.28.10-ADI-2009R1
Created: 2010-02-23 10:29:08 UTC
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 6360001 Bytes = 6.1 MB
Load Address: 00180000
Entry Point: 0040cd74
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = 0040cd74
Linux version 2.6.28.10-ADI-2009R1 (santhosh@host_120) (gcc version 4.1.2 (ADI svn)) #742 Tue Feb 23 15:58:54 IST 2010
Board Memory: 128MB
Kernel Managed Memory: 128MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00180000-0x002a4570
rodata = 0x002a4570-0x0038b074
bss = 0x0038c000-0x003e95b4
data = 0x003e95b4-0x00400000
stack = 0x003fe000-0x00400000
init = 0x00400000-0x00dfc000
available = 0x00dfc000-0x07fff000
Hardware Trace Active and Enabled
Boot Mode: 1
Blackfin support (C) 2004-2009 Analog Devices, Inc.
Compiled for ADSP-BF527 Rev 0.2
Blackfin Linux support by blackfin.uclinux.org/
Processor Speed: 600 MHz core clock and 120 MHz System Clock
NOMPU: setting up cplb tables
Instruction Cache Enabled for CPU0
Data Cache Enabled for CPU0 (write-back)
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 32511
Kernel command line: console=ttyBF1,57600
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 512 (order: 9, 2048 bytes)
Console: colour dummy device 80x25
console [ttyBF1] enabled
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory available: 115616k/131072k RAM, (10224k init code, 1169k kernel code, 1391k data, 0k dma, 2668k reserved)
Calibrating delay loop... 1187.84 BogoMIPS (lpj=593920)
Mount-cache hash table entries: 512
Blackfin Scratchpad data SRAM: 4 KB
Blackfin L1 Data A SRAM: 16 KB (6 KB free)
Blackfin L1 Data B SRAM: 16 KB (16 KB free)
Blackfin L1 Instruction SRAM: 48 KB (38 KB free)
net_namespace: 288 bytes
NET: Registered protocol family 16
Blackfin DMA Controller
ezkit_init(): registering device resources
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
NET: Registered protocol family 1
JFFS2 version 2.2. (NAND) 2001-2006 Red Hat, Inc.
msgmni has been set to 225
io scheduler noop registered (default)
CHIMEI LCD Driver Initialised
adau1361 register major 246
/* Flash Driver */
--------------------
Numonyx Flash device
Top Boot M58LT128HS Flash device
Flash Size : 16MB
Single Core Loader Module enabled
mci900_pwm /dev entries driver
mci900_pwm driver initialized successfully
mci900_ad7999 /dev entries driver
mci900_ad7999 driver initialized successfully
bfin-otp: initialized
Serial: Blackfin serial driver
bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 29) is a BFIN-UART
bfin-uart.1: ttyBF1 at MMIO 0xffc02000 (irq = 31) is a BFIN-UART
brd: module loaded
bfin_mii_bus: probed
bfin_mac: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:01, irq=-1, mdc_clk=2500000Hz(mdc_div=23)@sclk=120MHz)
bfin_mac bfin_mac.0: Blackfin on-chip Ethernet MAC driver, Version 1.1
Driver 'sd' needs updating - please use bus_type methods
gpio-latch-addr-flash: probing 16-bit flash bus
gpio-latch-addr-flash: Found 1 x16 devices at 0x0 in 16-bit bank
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Using buffer write method
cfi_cmdset_0001: Erase suspend on write enabled
cmdlinepart partition parsing not available
RedBoot partition parsing not available
gpio-latch-addr-flash: Using board partition definition
Creating 5 MTD partitions on "gpio-latch-addr-flash":
0x00000000-0x00040000 : "UBoot Bootloader"
0x00040000-0x000a0000 : "VDSP Fallback Binary"
0x000a0000-0x00800000 : "NP Kernel+App Binary"
0x00800000-0x00f80000 : "Persistent Storage through MTD"
0x00f80000-0x01000000 : "Persistent Storage custom driver"
r8a66597_hcd: driver r8a66597_hcd, 10 Apr 2008
r8a66597_hcd r8a66597_hcd: USB Host Controller
r8a66597_hcd r8a66597_hcd: new USB bus registered, assigned bus number 1
r8a66597_hcd r8a66597_hcd: irq 99, io base 0x20100000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: USB Host Controller
usb usb1: Manufacturer: Linux 2.6.28.10-ADI-2009R1 r8a66597_hcd
usb usb1: SerialNumber: r8a66597_hcd
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver libusual
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
i2c /dev entries driver
i2c-bfin-twi i2c-bfin-twi.0: Blackfin BF5xx on-chip I2C TWI Contoller, regs_base@ffc01400
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
TCP cubic registered
NET: Registered protocol family 17
rtc-bfin rtc-bfin: setting system clock to 2008-04-01 07:29:05 UTC (1207034945)
Freeing unused kernel memory: 10224k freed
usb 1-1: new high speed USB device using r8a66597_hcd and address 2
usb 1-1: configuration #1 chosen from 1 choice
usb 1-1: New USB device found, idVendor=148f, idProduct=2770
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: 802.11 n WLAN
usb 1-1: Manufacturer: Ralink
usb 1-1: SerialNumber: 1.0
_____________________________________
a8888b. / Welcome to the uClinux distribution \
d888888b. / _ _ \
8P"YP"Y88 / | | |_| __ __ (TM) |
8|o||o|88 _____/ | | _ ____ _ _ \ \/ / |
8' .88 \ | | | | _ \| | | | \ / |
8`._.' Y8. \ | |__ | | | | | |_| | / \ |
d/ `8b. \ \____||_|_| |_|\____|/_/\_\ |
dP . Y8b. \ For embedded processors including |
d8:' " `::88b \ the Analog Devices Blackfin /
d8" 'Y88b \___________________________________/
:8P ' :888
8a. : _a88P For further information, check out:
._/"Yaa_: .| 88P| - blackfin.uclinux.org/
\ YP" `| 8P `. - docs.blackfin.uclinux.org/
/ \.___.d| .' - www.uclinux.org/
`--..__)8888P`._.' jgs/a:f - www.analog.com/blackfin
Have a lot of fun...
insmod: cannot insert 'rt2870sta.ko': unknown symbol in module, or unknown parameter
cp: cannot stat '/smb.conf': No such file or directory
chmod: /etc/config/inetd.conf: No such file or directory
chmod: Philips_NP: No such file or directory
./Philips_NP: not found
BusyBox v1.13.4 (2010-02-23 15:52:39 IST) built-in shell (msh)
Enter 'help' for a list of built-in commands.
root:/> Netbios nameserver version 3.0.25a started.
Copyright Andrew Tridgell and the Samba Team 1992-2007
standard input is not a socket, assuming -D option
create_subnets: No local interfaces !
create_subnets: Waiting for an interface to appear ...
root:/>
root:/> ifconfig eth0 10.142.14.146
root:/> PHY: 0:01 - Link is Up - 100/Half
root:/> tftp -g -r rootfs.cramfs 10.142.14.126
root:/>
root:/>
root:/> mkdir /mnt/cramfs_test
root:/> flash_unlock /dev/mtd2
root:/> flash_eraseall -j /dev/mtd2
Erasing 128 Kibyte @ 760000 -- 100 % complete.Cleanmarker written at 740000.
root:/> dd if=rootfs.cramfs of=/dev/mtd2
10920+0 records in
10920+0 records out
root:/> mount -t cramfs /dev/mtdblock2 /mnt
mount: mounting /dev/mtdblock2 on /mnt failed: Invalid argument
root:/> mount -t cramfs /dev/mtdblock2/ /mnt
mount: mounting /dev/mtdblock2/ on /mnt failed: Not a directory
root:/> mkdir /mnt/test
root:/> mount -t cramfs /dev/mtdblock2 /mnt/test
mount: mounting /dev/mtdblock2 on /mnt/test failed: Invalid argument
root:/> mount
rootfs on / type rootfs (rw)
proc on /proc type proc (rw,nosuid,nodev,noexec)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec)
mdev on /dev type tmpfs (rw,nosuid)
devpts on /dev/pts type devpts (rw,nosuid,noexec,mode=600)
var on /var type ramfs (rw)
tmp on /tmp type tmpfs (rw,nosuid,nodev)
usbfs on /proc/bus/usb type usbfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
root:/> mount -help
mount: invalid option -- h
BusyBox v1.13.4 (2010-02-23 15:52:39 IST) multi-call binary
Usage: mount [flags] DEVICE NODE [-o options,more-options]
Mount a filesystem. Filesystem autodetection requires /proc be mounted.
Options:
-a Mount all filesystems in fstab
-r Read-only mount
-t fs-type Filesystem type
-w Read-write mount (default)
-o option:
loop Ignored (loop devices are autodetected)
[a]sync Writes are asynchronous / synchronous
[no]atime Disable / enable updates to inode access times
[no]diratime Disable / enable atime updates to directories
[no]relatime Disable / enable atime updates relative to modification time
[no]dev Allow use of special device files / disallow them
[no]exec Allow use of executable files / disallow them
[no]suid Allow set-user-id-root programs / disallow them
[r]shared Convert [recursively] to a shared subtree
[r]slave Convert [recursively] to a slave subtree
[r]private Convert [recursively] to a private subtree
[un]bindable Make mount point [un]able to be bind mounted
bind Bind a directory to an additional location
move Relocate an existing mount point
remount Remount a mounted filesystem, changing its flags
ro/rw Mount for read-only / read-write
There are EVEN MORE flags that are specific to each filesystem
You'll have to see the written documentation for those filesystems
root:/>
root:/>
root:/>
root:/> mkdir mycramfs
root:/> cd mycramfs/
root:/mycramfs> vi 1.txt
Testing cramfs
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
root:/mycramfs> cd ..
root:/> mkcramfs mycramfs mycramfs.cramfs
mkInstruction fetch misaligned address violation
- Attempted misaligned instruction cache fetch.
Deferred Exception context
CURRENT PROCESS:
COMM=mkcramfs PID=345
CPU = 0
TEXT = 0x00460040-0x0046cca0 DATA = 0x0046ccc0-0x00471a1c
BSS = 0x00471a1c-0x00471d20 USER-STACK = 0x00472f60
return address: [0x00468638]; contents of:
0x00468610: 3007 0062 e140 0047 e14a 0046 e10a 8e00
0x00468620: e100 19d0 0062 e14a 0047 e10a 1cb4 9152
0x00468630: 0c42 1804 0000 3006 [0062] e14a 0046 e10a
0x00468640: 8e10 3007 6009 0062 e300 03aa e14a 0046
ADSP-BF527-0.2 600(MHz CCLK) 120(MHz SCLK) (mpu off)
Linux version 2.6.28.10-ADI-2009R1
Built with gcc version 4.1.2 (ADI svn)
SEQUENCER STATUS: Not tainted
SEQSTAT: 0006002a IPEND: 0030 SYSCFG: 0006
EXCAUSE : 0x2a
interrupts disabled
physical IVG5 asserted : <0xffa00b78> { _evt_ivhw + 0x0 }
RETE: <0x00000000> /* Maybe null pointer? */
RETN: <0x00444000> /* kernel dynamic memory */
RETX: <0x00000480> /* Maybe fixed code section */
RETS: <0x00468626> [ mkcramfs + 0x85e6 ]
PC : <0x00468638> [ mkcramfs + 0x85f8 ]
DCPLB_FAULT_ADDR: <0x00471cb4> [ mkcramfs + 0x11cb4 ]
ICPLB_FAULT_ADDR: <0x00468638> [ mkcramfs + 0x85f8 ]
PROCESSOR STATE:
R0 : 00000008 R1 : 00468e00 R2 : 004719d0 R3 : 00472c3c
R4 : 00000003 R5 : 00000034 R6 : 00000008 R7 : 00472d08
P0 : 00000004 P1 : 00000000 P2 : 00000569 P3 : 00472eb0
P4 : 00000002 P5 : 004719e8 FP : 00472d18 SP : 00443f24
LB0: 004677d9 LT0: 004677d8 LC0: 00000000
LB1: 00466abd LT1: 00466abc LC1: 00000000
B0 : 00000000 L0 : 00000000 M0 : 00000000 I0 : 0044a054
B1 : 00000000 L1 : 00000000 M1 : 00000000 I1 : 00000000
B2 : 00000000 L2 : 00000000 M2 : 00000000 I2 : 00000000
B3 : 00000000 L3 : 00000000 M3 : 00000000 I3 : 00000000
A0.w: 00000000 A0.x: 00000000 A1.w: 00000000 A1.x: 00000000
USP : 00472cfc ASTAT: 02003004
Hardware Trace:
0 Target : <0x00183914> { _trap_c + 0x0 }
Source : <0xffa005d2> { _exception_to_level5 + 0x9e } CALL pcrel
1 Target : <0xffa00534> { _exception_to_level5 + 0x0 }
Source : <0xffa00414> { _bfin_return_from_exception + 0x18 } RTX
2 Target : <0xffa003fc> { _bfin_return_from_exception + 0x0 }
Source : <0xffa0048a> { _ex_trap_c + 0x46 } JUMP.S
3 Target : <0xffa00444> { _ex_trap_c + 0x0 }
Source : <0xffa0069c> { _trap + 0x58 } JUMP (P4)
4 Target : <0xffa00644> { _trap + 0x0 }
Source : <0x00468636> [ mkcramfs + 0x85f6 ] 0x3006
5 Target : <0x00468626> [ mkcramfs + 0x85e6 ]
Source : <0x00468e0c> [ mkcramfs + 0x8dcc ] RTS
6 Target : <0x00468e00> [ mkcramfs + 0x8dc0 ]
Source : <0x00468624> [ mkcramfs + 0x85e4 ] CALL (P2)
7 Target : <0x00468614> [ mkcramfs + 0x85d4 ]
Source : <0x00468e1c> [ mkcramfs + 0x8ddc ] RTS
8 Target : <0x00468e10> [ mkcramfs + 0x8dd0 ]
Source : <0x00468612> [ mkcramfs + 0x85d2 ] CALL (P2)
9 Target : <0x004685ec> [ mkcramfs + 0x85ac ]
Source : <0x004603fc> [ mkcramfs + 0x3bc ] CALL pcrel
10 Target : <0x004603fa> [ mkcramfs + 0x3ba ]
Source : <0x00460408> [ mkcramfs + 0x3c8 ] JUMP.S
11 Target : <0x00460408> [ mkcramfs + 0x3c8 ]
Source : <0x004675b6> [ mkcramfs + 0x7576 ] RTS
12 Target : <0x004675ae> [ mkcramfs + 0x756e ]
Source : <0x00467604> [ mkcramfs + 0x75c4 ] JUMP.S
13 Target : <0x004675fe> [ mkcramfs + 0x75be ]
Source : <0x004695a6> [ mkcramfs + 0x9566 ] RTS
14 Target : <0x0046959e> [ mkcramfs + 0x955e ]
Source : <0x0046953c> [ mkcramfs + 0x94fc ] IF !CC JUMP
15 Target : <0x00469538> [ mkcramfs + 0x94f8 ]
Source : <0x00469558> [ mkcramfs + 0x9518 ] IF CC JUMP
Userspace Stack
Stack info:
SP: [0x00472cfc] <0x00472cfc> [ mkcramfs + 0x12cfc ]
FP: (0x00472cec)
Memory from 0x00472cf0 to 00473000
00472cf0:<004675fe> 00472d18 <00468626>[0000000a] 00000001 00000034 <00467f2c> 00472d38
00472d10:<004603d6> 0a4719e8 00472d38 <00460400> 00000000 00000001 00001000 00000008
00472d30: 00472d4c 00472d44 00472d4c <004608f6> 38cda040 00000000 00000003 00472ddc
00472d50:<00460c64> 00000005 0043f1bf 0043f004 <0046b0bc> 00472dd8 00000000 004602cc
00472d70: 00000000 0043f00d 00000001 00000000 00000000 0000056a 000081a4 00000001
00472d90: 00000000 00000000 00000000 00000000 00000000 00000010 00000000 00001000
00472db0: 00000008 00000000 47f1e76b 00000000 47f1e76b 00000000 47f1e76b 00000000
00472dd0: 0000056a 00000000 0043f148 00472ef0 <00460fd8> 004719e8 00472eb0 00000000
00472df0:<00472f92> 00472f9b 00472f64 00000003 004718d4 00000000 00471900 00472eb0
00472e10: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00472e30: 00000000 004718d4 00000000 00000003 00000000 00000001 00000000 00000000
00472e50: 00000569 000041ed 00000002 00000000 00000000 00000000 00000000 00000000
00472e70: 00000000 00000000 00001000 00000000 00000000 47f1e756 00000000 47f1e76b
00472e90: 00000000 47f1e76b 00000000 00000569 00000000 00000000 00000500 00000005
00472eb0: 0000004c 00000000 081c0300 01000415 1a131100 170f1200 00000016 00000000
00472ed0: 00000000 00000000 00000000 00000000 00000000 00472f04 <0046b07c> 0000002f
00472ef0: 00472f20 <00468f9c> 0046ccc0 00471a18 00472f64 00000000 00471ce4 0046cc70
00472f10: 00000003 00000000 00000000 00000000 00000000 <00d20538> 0046ccc0 00dd0004
00472f30: 00da0220 00000000 00da07bc 00da02c4 00000001 00460ee0 00000000 00000000
00472f50: 0046cc70 0046cc82 00000000 00dd0783 00000003 00472f89 <00472f92> 00472f9b
00472f70: 00000000 00472fab 00472fb2 00472fc0 00472fe3 00000000 636b6d00 666d6172
00472f90: 796d0073 6d617263 6d007366 61726379 2e73666d 6d617263 48007366 3d454d4f
00472fb0: 4853002f 3d4c4c45 6e69622f 0068732f 48544150 69622f3d 752f3a6e 622f7273
00472fd0: 2f3a6e69 6e696273 73752f3a 62732f72 54006e69 3d4d5245 756e696c 622f0078
00472ff0: 6d2f6e69 6172636b 0073666d 00000000 67c0bbd1
Return addresses in stack:
address : <0x004675fe> [ mkcramfs + 0x75be ]
address : <0x00468626> [ mkcramfs + 0x85e6 ]
address : <0x00467f2c> [ mkcramfs + 0x7eec ]
address : <0x004603d6> [ mkcramfs + 0x396 ]
address : <0x00460400> [ mkcramfs + 0x3c0 ]
address : <0x004608f6> [ mkcramfs + 0x8b6 ]
address : <0x00460c64> [ mkcramfs + 0xc24 ]
address : <0x0046b0bc> [ mkcramfs + 0xb07c ]
address : <0x00460fd8> [ mkcramfs + 0xf98 ]
address : <0x00472f92> [ mkcramfs + 0x12f92 ]
address : <0x0046b07c> [ mkcramfs + 0xb03c ]
address : <0x00468f9c> [ mkcramfs + 0x8f5c ]
address : <0x00d20538> [ sh + 0x20538 ]
address : <0x00472f92> [ mkcramfs + 0x12f92 ]
cramfs: memory exhausted
Bus error
root:/> free
total used free shared buffers
Mem: 125840 19640 106200 0 0
QuoteReplyEditDelete
2010-02-24 08:15:27 Re: cramfs : mount failure
Mike Frysinger (UNITED STATES)
Message: 86451
it doesnt make sense to create cramfs images on the board. do it on the host and copy the image over to the board.
QuoteReplyEditDelete
2010-02-25 07:16:00 Re: cramfs : mount failure
Santhosh Kumar (INDIA)
Message: 86537
Ok Mike. I tried cramfs image created at the host side too(rootfs.cramfs) and mounted the same.
Mount fails.
root:/> chmod 777 rootfs.cramfs
root:/>
root:/> ls
bin home mnt rootfs.cramfs tmp
dev init proc sbin usr
etc lib root sys var
root:/> dd if=rootfs.cramfs of=/dev/mtd2
10920+0 records in
10920+0 records out
root:/> ls /dev/mtd*
/dev/mtd0 /dev/mtd1ro /dev/mtd3 /dev/mtd4ro /dev/mtdblock2
/dev/mtd0ro /dev/mtd2 /dev/mtd3ro /dev/mtdblock0 /dev/mtdblock3
/dev/mtd1 /dev/mtd2ro /dev/mtd4 /dev/mtdblock1 /dev/mtdblock4
root:/> cat /proc/iomem
20000000-200fffff : cfi_probe
20100000-20100100 : r8a66597_hcd
ffc00400-ffc004ff : bfin-uart.1
ffc01400-ffc01400 : i2c-bfin-twi.0
ffc02000-ffc020ff : bfin-uart.1
root:/> mkdir /mnt/test_cramfs
root:/> mount -t cramfs /dev/mtdblock2 /mnt/test_cramfs
mount: mounting /dev/mtdblock2 on /mnt/test_cramfs failed: Invalid argument
QuoteReplyEditDelete
2010-02-25 21:54:18 Re: cramfs : mount failure
Sonic Zhang (CHINA)
Message: 86562
Did you enabled the cramfs support in your kernel configuration?
How did you build the rootfs.cramfs on your host?
QuoteReplyEditDelete
2010-02-26 02:08:00 Re: cramfs : mount failure
Santhosh Kumar (INDIA)
Message: 86568
Yes, enabled through menuconfig
Enabled cramfs support in File Systems->Miscellaneous filesystems->Compressed ROM file system support (cramfs)
Also enabled mkcramfs utility in File System Applications.
QuoteReplyEditDelete
2010-02-28 14:19:10 Re: cramfs : mount failure
Mike Frysinger (UNITED STATES)
Message: 86643
you write files to mtdblock#, not to mtd#
read `dmesg` to see if there is anything useful and verify that /proc/filesystems lists cramfs
QuoteReplyEditDelete
2010-03-03 02:28:19 Re: cramfs : mount failure
Santhosh Kumar (INDIA)
Message: 86739
But cramfs requires block device, so i used mtdblock#.
Also /proc/filesystems list cramfs, but without any physical device association.
dmesg not giving any usefull info for mount failure.
root:/> cat /proc/filesystems
nodev sysfs
nodev rootfs
nodev bdev
nodev proc
nodev debugfs
nodev sockfs
nodev usbfs
nodev pipefs
nodev anon_inodefs
nodev tmpfs
nodev inotifyfs
nodev devpts
cramfs
nodev ramfs
nodev jffs2
root:/> flash_unlock /dev/mtd2
root:/> flash_eraseall -j /dev/mtd2
Erasing 128 Kibyte @ 760000 -- 100 % complete.Cleanmarker written at 740000.
root:/> ifconfig eth0 10.142.14.146
root:/> PHY: 0:01 - Link is Up - 100/Half
root:/> tftp -g -r rootfs.cramfs 10.142.14.126
root:/> ls
bin home mnt rootfs.cramfs tmp
dev init proc sbin usr
etc lib root sys var
root:/> chmod 777 rootfs.cramfs
root:/> dd if=rootfs.cramfs of=/dev/mtd2
10920+0 records in
10920+0 records out
root:/> mount -t cramfs /dev/mtd2 /mnt
mount: mounting /dev/mtd2 on /mnt failed: Block device required
root:/> mount -t cramfs /dev/mtdblock2 /mnt
mount: mounting /dev/mtdblock2 on /mnt failed: Invalid argument
QuoteReplyEditDelete
2010-03-09 02:43:08 Re: cramfs : mount failure
Santhosh Kumar (INDIA)
Message: 86966
Any suggestion for this mount failure ?
QuoteReplyEditDelete
2010-03-10 04:09:59 Re: cramfs : mount failure
Sonic Zhang (CHINA)
Message: 87036
Could you please try a loop mount to your cramfs image in your ramfs?
root/> mount -t cramfs -o loop=/dev/loop your_cramfs_img /mnt
What's the result?
QuoteReplyEditDelete
2010-03-10 06:56:50 Re: cramfs : mount failure
Santhosh Kumar (INDIA)
Message: 87039
Hi Sonic,
Tried the same, different error shown
root:/> ls
bin home mnt rootfs.cramfs tmp
dev init proc sbin usr
etc lib root sys var
root:/> mount -t cramfs -o loop=/dev/loop rootfs.cramfs /mnt
mount: cannot setup loop device: No such file or directory
QuoteReplyEditDelete
2010-03-10 09:05:09 Re: cramfs : mount failure
Mike Frysinger (UNITED STATES)
Message: 87045
things mount fine for me:
root:/> grep cramfs /proc/filesystems
cramfs
root:/> mount -o loop /rootfs.cramfs /mnt/
root:/> ls /mnt/
bin dev etc home lib mnt proc root sbin sys tmp usr var
root:/> grep cramfs /proc/mounts
/dev/loop0 /mnt cramfs ro,relatime 0 0
QuoteReplyEditDelete
2010-03-10 22:06:05 Re: cramfs : mount failure
Sonic Zhang (CHINA)
Message: 87065
You need to enable loop device option in your kernel configure.
QuoteReplyEditDelete
2010-03-11 07:53:17 Re: cramfs : mount failure
Santhosh Kumar (INDIA)
Message: 87093
Hi Sonic,
Thanks, after enabling loop device option cramfs image mounts successfully.
But if the same image written to one of my MTD partition, and if mounted "Invalid argument error " shown
root:/> cat /proc/mtd
dev: size erasesize name
mtd0: 00040000 00020000 "UBoot Bootloader"
mtd1: 00060000 00020000 "VDSP Fallback Binary"
mtd2: 00760000 00020000 "NP Kernel+App Binary"
mtd3: 00780000 00020000 "Persistent Storage through MTD"
mtd4: 00080000 00020000 "Persistent Storage custom driver"
root:/> flash_unlock /dev/mtd2
root:/> flash_eraseall -j /dev/mtd2
Erasing 128 Kibyte @ 760000 -- 100 % complete.Cleanmarker written at 740000.
root:/>
root:/>
root:/> dd if=rootfs.cramfs of=/dev/mtd2
10920+0 records in
10920+0 records out
root:/> mount -t cramfs -o loop=/dev/loop /dev/mtdblock2 /mnt
mount: mounting /dev/mtdblock2 on /mnt failed: Invalid argument
root:/> mount -t cramfs -o loop=/dev/loop /dev/mtd2 /mnt
mount: mounting /dev/mtd2 on /mnt failed: Block device required
QuoteReplyEditDelete
2010-03-11 11:20:34 Re: cramfs : mount failure
Mike Frysinger (UNITED STATES)
Message: 87100
you've already been told how to handle the mtd layers. if you cant follow directions, then there isnt anything we can do to help.
QuoteReplyEditDelete
2010-03-15 03:33:44 Re: cramfs : mount failure
Santhosh Kumar (INDIA)
Message: 87204
Mike
Now I have written my cramfs image to mtdblock2 and mounted using the same that, mount is successfull and i am able to see the contents.
I went through mtd home page, and it says mtdblock emulates block devices over mtd devices
But the same thing works fine for an JFFS2 image, ie
dd if=rootfs.jffs2 of=/dev/mtd2
mount -t jffs2 /dev/mtdblock2 /mnt , works fine and i am able to read/write in this partition.
Thought i dont know how writing to a mtd device and mount the same using its block driver(mtdblock) works for JFFS2
But the same not working for cramfs.
Please let me know if you have any pointers for better understanding of the same.
QuoteReplyEditDelete