2012/8/24 Jonas Gorski <jonas.gorski+open...@gmail.com>:
> Hi Rafał,
>
> On 24 August 2012 23:09, Rafał Miłecki <zaj...@gmail.com> wrote:
>> (...)
>> # head /dev/mtd4 | hexdump -C
>> 00000000  73 68 73 71 2b 03 00 00  00 00 00 54 03 00 00 d8  
>> |shsq+......T....|
>> (...)
>> Can someone explain to me, what does it mean? Is there something wrong
>> with my mtdblock4? I don't get anything interesting in dmesg.
>
> The problem is that Broadcom uses its own "squashfs with lzma"-magic.
> The standard squashfs magic is "sqsh" or "hsqs" (depending on
> endianess), and Broadcom chose to use a different one (since squashfs3
> does not support storing the compressor type). There is a patch adding
> support for unsquashfs in the repo (so you should be able to just
> throw a copy of the image at it), but the in-kernel squashfs only
> accepts standard squashfs magics.

Ah, OK, thanks a lot!

I've managed to track where mounting fails. It's
fs/squashfs/super.c::squashfs_fill_super. As you said, it fails at:

if (sb->s_magic != SQUASHFS_MAGIC)

Unfortunately error wasn't displayed to me, because flag MS_SILENT was set.

Backtrace after I put WARN_ON(1):

[   33.984000] ------------[ cut here ]------------
[   33.988000] WARNING: at fs/squashfs/super.c:126
squashfs_fill_super+0x1a0/0x84c()
[   33.996000] Modules linked in:
[   34.000000] Call Trace:
[   34.004000] [<8025ce80>] dump_stack+0x8/0x34
[   34.008000] [<80023780>] warn_slowpath_common+0x78/0xa4
[   34.012000] [<800237c4>] warn_slowpath_null+0x18/0x24
[   34.016000] [<80103640>] squashfs_fill_super+0x1a0/0x84c
[   34.024000] [<800a7c0c>] mount_bdev+0x14c/0x1cc
[   34.028000] [<801033b0>] squashfs_mount+0x18/0x24
[   34.032000] [<800a856c>] mount_fs+0x20/0xe4
[   34.036000] [<800bfaf4>] vfs_kern_mount+0x64/0xe8
[   34.040000] [<800bfda0>] do_kern_mount+0x48/0xf4
[   34.048000] [<800c1cc0>] do_mount+0x67c/0x6fc
[   34.052000] [<800c1dcc>] sys_mount+0x8c/0xf0
[   34.056000] [<8000d1d0>] stack_done+0x20/0x40
[   34.060000]
[   34.060000] ---[ end trace 088bd3492332a7b0 ]---

-- 
Rafał
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to