2008-01-20 20:17:38     MMC/SD partition problem

Document created by Aaronwu Employee on Aug 5, 2013
Version 1Show Document
  • View in full screen mode

2008-01-20 20:17:38     MMC/SD partition problem

Karol Bizewski (POLAND)

Message: 49872    Hello! In 2007R1 when i partitioned SD card i saw in /dev/ spi_mmc1 and spi_mmc2. In current SVN version after using fdisk for partitioning there is no more those devices. What can be wrong? Thanks Karol

QuoteReplyEditDelete

 

 

2008-01-21 22:01:50     Re: MMC/SD partition problem

Yi Li (CHINA)

Message: 49904    Could you make sure your spi-mmc driver works? Could post your fdisk output here? We tested it daily and it works well.

QuoteReplyEditDelete

 

 

2008-01-22 08:12:18     Re: MMC/SD partition problem

Karol Bizewski (POLAND)

Message: 49954    spi_mmc driver works, here is print from dmesg : New MMC/SD card found: 970 MB(1017643008 bytes) spi_mmc: spi_mmc1 spi_mmc2 here is from fdisk : Disk /dev/spi_mmc: 8 heads, 62 sectors, 4007 cylinders Units = cylinders of 496 * 512 bytes Device Boot Start End Blocks Id System /dev/spi_mmc1 1 2000 495969 83 Linux /dev/spi_mmc2 2001 4007 497736 6 FAT16 and after that form ls /dev : root:/dev> ls audio mem ram11 ram5 sequencer urandom console mixer ram12 ram6 sequencer2 watchdog dpmc null ram13 ram7 snd zero dsp ptmx ram14 ram8 spi_mmc full pts ram15 ram9 sport0 kmem ram0 ram2 random sport1 kmsg ram1 ram3 rtc0 tty log ram10 ram4 seq ttyBF0 So there is no spi_mmc1 and spi_mmc2. What may cause this?

QuoteReplyEditDelete

 

 

2008-01-22 22:07:05     Re: MMC/SD partition problem

Yi Li (CHINA)

Message: 49978    Hi,

 

Our situation is a little different from yours.

 

1. We create 2 partitions in /dev/spi_mmc using fdisk

2. reboot the kernel and install the spi_mmc driver

3. We can see /dev/spi_mmc, but /dev/spi_mmc1 and /dev/spi_mmc2 are missing.

4. run fdisk, "print" shows there are two partitions, then do nothing and quit.

5. /dev/spi_mmc1, /dev/spi_mmc2 appear. (They are still missing in your system..)

 

By default, the system uses /bin/mdev to monitor /sys/ to create device node.

 

So I think there is a bug with the spi_mmc driver, it cannot create necessary entries in /sys/block/spi_mmc.

 

root:/>

root:/> cd /sys/block/

root:/sys/block> ls

ram0     ram11    ram14    ram3     ram6     ram9

ram1     ram12    ram15    ram4     ram7     spi_mmc

ram10    ram13    ram2     ram5     ram8

root:/sys/block> cd spi_mmc/

root:/sys/block/spi_mmc> ls

capability  holders     range       size        stat        uevent

dev         queue       removable   slaves      subsystem

root:/sys/block/spi_mmc> fdisk /dev/spi_mmc

spi_mmc: spi_mmc1 spi_mmc2

 

The number of cylinders for this disk is set to 2045.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

   (e.g., DOS FDISK, OS/2 FDISK)

 

Command (m for help): p

 

Disk /dev/spi_mmc: 8 heads, 62 sectors, 2045 cylinders

Units = cylinders of 496 * 512 bytes

 

       Device Boot    Start       End    Blocks   Id  System

/dev/spi_mmc1             1      1033    256153   83  Linux

/dev/spi_mmc2          1034      2045    250976   83  Linux

 

Command (m for help): q

 

root:/sys/block/spi_mmc> ls

capability  queue       size        spi_mmc2    uevent

dev         range       slaves      stat

holders     removable   spi_mmc1    subsystem

root:/sys/block/spi_mmc>

QuoteReplyEditDelete

 

 

2008-01-23 10:40:22     Re: MMC/SD partition problem

Karol Bizewski (POLAND)

Message: 50033    Hello! I found that when i run fdisk, and then mdev -s spi_mmc1 and 2 appears in /dev/ .

 

So in 2007R1 it was ran automaticly.. Now we have to found where is the error.

 

Thanks for help

 

But i found new problem with u-boot. It doesn't detect partition made by fdisk (ext2 and fat16) Maby there is any clue?

QuoteReplyEditDelete

 

 

2008-01-23 21:23:33     Re: MMC/SD partition problem

Yi Li (CHINA)

Message: 50061    By default we put in /etc/rc:

 

"if [ -e /bin/mdev ] ; then

        echo /bin/mdev 2>/dev/null > /proc/sys/kernel/hotplug

        /bin/mdev -s 2> /dev/null

fi"

 

So maybe you can check your "/proc/sys/kernel/hotplug".

 

> But i found new problem with u-boot. It doesn't detect partition made by fdisk (ext2 and fat16) Maby there is any clue?

 

We did not test spi-mmc with u-boot for now.

 

 

QuoteReplyEditDelete

 

 

2008-01-24 21:57:06     Re: MMC/SD partition problem

Sonic Zhang (CHINA)

Message: 50126   

 

In 2007R1 device node is generated statically, while in SVN, they are generated by mdev daemon automatically. But, that depends on the correct behavior of the driver.

Attachments

    Outcomes