Problems with SD boot of FSO, OM 2008.8, add /dev/mmcblk0... to distros?

Dennis Ferron dennis.ferron at gmail.com
Fri Sep 19 16:58:21 CEST 2008


I think a number of people are having the same problem stemming from the sd
card driver not reading some cards.  The mmcblk0p1, p2, etc. device files
actually will be autocreated whenever Linux thinks there are partitions
there, but the problem is that sometimes when it tries to read the partition
table of the card it fails to get any data, so it doesn't think any
partitions exist.  Thanks for posting the mknod syntax because I was
wondering how you do that manually, but you can also do this to make the p1,
p2, p3 device files show up automatically:
fdisk /dev/mmcblk0
visually verify that partition table exists
use w to make fdisk write the (unchanged) partition table back out

What happens is after the w command, fdisk calls ioctl to resync the
partition table, and you magically get the dev files back.  (Don't save with
w if fdisk thinks the partition table is empty though!)

In fact, would you try this and tell us if it works?  I'd like to verify
we're all having the same problem and not different problems.

If the first time you call fdisk you get no table, try calling fdisk
multiple times.  Here's an actual session capture.  fdisk is returning
different results every time I call it:

root at om-gta02:~# fdisk -l /dev/mmcblk0
root at om-gta02:~# fdisk -l /dev/mmcblk0

Disk /dev/mmcblk0: 7948 MB, 7948206080 bytes
4 heads, 16 sectors/track, 242560 cylinders
Units = cylinders of 64 * 512 = 32768 bytes

Disk /dev/mmcblk0 doesn't contain a valid partition table
root at om-gta02:~# fdisk -l /dev/mmcblk0

Disk /dev/mmcblk0: 7948 MB, 7948206080 bytes
4 heads, 16 sectors/track, 242560 cylinders
Units = cylinders of 64 * 512 = 32768 bytes

        Device Boot      Start         End      Blocks  Id System
/dev/mmcblk0p1               1         245        7832  83 Linux
/dev/mmcblk0p2             246      242560     7754080  83 Linux


On Fri, Sep 19, 2008 at 8:53 AM, Erland Lewin <erland at lewin.nu> wrote:

> I got a new SDHC card, and tried installing FSO and OM2008.8 to boot off
> it.
> I had problems, which I believe I tracked down to the fact that there are
> no /dev/mmcblk0, /dev/mmcblk0p1, etc devices in the file systems
> distributed.
>
> U-boot starts the kernel OK, but when the kernel tries to mount the root
> filesystem, it fails because the device node /dev/mmcblk0p1 for example
> above can't be found. Creating these manually with:
>
> (in the /dev directory of the card)
> mknod mmcbkl0 b 179 0
> mknod mmcblk0p1 b 179 1
> mknod mmcblk0p2 b 179 2
> mknod mmcblk0p3 b 179 3
>
> Seems to have fixed the problem.
>
> Note that I booted with the kernel on the same partition as the root file
> system.
>
> I would recommend that these device nodes be created in the distributed
> root file systems.
>
> /Erland
>
>
> _______________________________________________
> Openmoko community mailing list
> community at lists.openmoko.org
> http://lists.openmoko.org/mailman/listinfo/community
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openmoko.org/pipermail/community/attachments/20080919/2007ac59/attachment.htm 


More information about the community mailing list