boot-time partitions and bootargs for 2.6.14

Robin Gilks robin.gilks at tait.co.nz
Tue Oct 11 11:17:57 EST 2005


Dmytro Bablinyuk wrote:

>> Are you sure that your flash device name in Linux is just "0" ? 
>
> I think you are right. I missed the point.
>
> => flinfo
>
> Bank # 1: Sharp 28F016SC (16 Mbit, 32 x 64K)
>   Size: 8 MB in 32 Sectors
>   Sector Start Addresses:
>     FF800000      FF840000      FF880000      FF8C0000      FF900000
>     FF940000      FF980000      FF9C0000      FFA00000      FFA40000
>     FFA80000      FFAC0000      FFB00000      FFB40000      FFB80000
>     FFBC0000      FFC00000      FFC40000      FFC80000      FFCC0000
>     FFD00000      FFD40000      FFD80000      FFDC0000      FFE00000
>     FFE40000      FFE80000      FFEC0000      FFF00000 (RO) FFF40000 (RO)
>     FFF80000      FFFC0000
>
> So I have
> mtdparts=1:1024k(Linux),4096k(FS),2048k(Unused),512k(U-Boot),512()
>
> But problem remains...
> Kernel panic - not syncing: VFS: Unable to mount root fs on 
> unknown-block(31,1)

Are you using physmap as the means of creating the mtd devices? If so 
there is a bug in many variants of the kernel that defines the map 
structure as follows:
struct map_info physmap_map = {
    .name = "Physically mapped flash",
    .size = WINDOW_SIZE,
    .buswidth = BUSWIDTH,
    .phys = WINDOW_ADDR,
};

Note that the name has embedded spaces - something I've never managed to 
get U-Boot to pass across on the kernel command line (I'm sure Wolfgang 
will correct me if I'm wrong here!!). The '1' in your 
"mtdparts=1:1024k(Linux)" should match the name of this map. In this 
case the code needs to be changed to NOT have spaces in it (and perhaps 
a more user friendly name) and the kernel config values for WINDOW_SIZE, 
BUSWIDTH and WINDOW_ADDR set correctly. That way you'd end up with 
something like:
struct map_info physmap_map = {
    .name = "fred",
    .size = WINDOW_SIZE,
    .buswidth = BUSWIDTH,
    .phys = WINDOW_ADDR,
};
and a command line something like:
mtdparts=fred:1024k(Linux),4096k(FS),2048k(Unused),512k(U-Boot),512()

I'd also suggest that you mount a known good fs using NFS (if you have 
ethernet on your target) and then try manually mounting the flash fs - 
that will check out its structure (endian-ness?) and the jffs2 drivers 
on your target.

-- 
Robin Gilks
Senior Design Engineer          Phone: (+64)(3) 357 1569
Tait Electronics                Fax  :  (+64)(3) 359 4632
PO Box 1645 Christchurch        Email : robin.gilks at tait.co.nz
New Zealand


=======================================================================
This email, including any attachments, is only for the intended
addressee.  It is subject to copyright, is confidential and may be
the subject of legal or other privilege, none of which is waived or
lost by reason of this transmission.
If the receiver is not the intended addressee, please accept our
apologies, notify us by return, delete all copies and perform no
other act on the email.
Unfortunately, we cannot warrant that the email has not been
 altered or corrupted during transmission.
=======================================================================




More information about the Linuxppc-embedded mailing list