CRAMFS on arm : how to mount with busybox?

I create cramfs, I mount on pc and works I mount with busybox on target and it doesn't work. Why? Thank you and bye bye

mkcramfs skin skin.cramfs sudo mount -o loop -t cramfs skin.cramfs cramfs-mount/ dd if=skin.cramfs of=/dev/mtd7

bash# busybox mount -t cramfs /dev/mtd7 cramfs-mount/ mount: Mounting /dev/mtd7 on /cramfs-mount failed: Block device required bash# strace /busybox mount -t cramfs /dev/mtd7 cramfs-mount/ execve("/busybox", ["/busybox", "mount", "-t", "cramfs", "/dev/mtd7", "cramfs-mount/"], [/* 10 vars */]) = 0 brk(0) = 0x202af58 open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/v5l/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat("/lib/v5l", 0xbffff840) = -1 ENOENT (No such file or directory) open("/lib/libc.so.6", O_RDONLY) = 4 fstat(4, {st_mode=S_IFREG|0755, st_size=974744, ...}) = 0 read(4, "\177ELF\1\1\1a\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0x\302\1\000"...,

4096) = 4096 old_mmap(NULL, 965788, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) = 0x4001e000 mprotect(0x400fa000, 64668, PROT_NONE) = 0 old_mmap(0x400fe000, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0xd8000) = 0x400fe000 old_mmap(0x40107000, 11420, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40107000 close(4) = 0 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,

-1, 0) = 0x40015000 personality(PER_LINUX) = 8388608 getpid() = 28 brk(0) = 0x202af58 brk(0x202bf70) = 0x202bf70 brk(0x202c000) = 0x202c000 brk(0x202e000) = 0x202e000 stat("/dev/mtd7", {st_mode=S_IFCHR|0644, st_rdev=makedev(90, 14), ...}) = 0 getcwd("/", 4097) = 2 mount("/dev/mtd7", "/cramfs-mount", "cramfs", 0xc0ed0000, 0x202cf80) =

-1 ENOTBLK (Block device required) write(2, "mount: ", 7mount: ) = 7 write(2, "Mounting /dev/mtd7 on /cramfs-mo"..., 42Mounting /dev/mtd7 on /cramfs-mount failed) = 42 write(2, ": Block device required\n", 24: Block device required ) = 24 _exit(1) = ?

Reply to
iappi
Loading thread data ...

In order to mount MTD partitions (or any filesystem), you need to use the block device, not the char device.

Try 'mount -t cramfs /dev/mtdblock7 cramfs-mount/'

Chuck

Reply to
Chuck Gales

Thank you very much. I have compiled the kernel with CONFIG_MTD_BLOCK And works. Bye bye

Reply to
iappi

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.