Re: Devicetree: Initialization order of mmc block devices?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



El Wed, Jul 18, 2012 at 05:16:49PM +0200 Knut Wohlrab ha dit:

> On 07/18/2012 04:54 PM, Eric Nelson wrote:
> >On 07/18/2012 07:11 AM, Knut Wohlrab wrote:
> >>On 07/18/2012 03:47 PM, Jassi Brar wrote:
> >>>On 18 July 2012 15:19, Knut Wohlrab <knut.wohlrab@xxxxxxxxxxxx> wrote:
> >>>
> >>>>If a SD card is inserted at boot time, its "mmcblk0", the embedded
> >>>>MMC (eMMC) device "mmcblk1". This makes it difficult to give the kernel the
> >>>>correct device for the eMMC root file system ("root=/dev/mmcblk?p1 ...").
> >>>>
> >>>How about root=UUID=<eMMC-partition> ?
> >>Because we are talking about an embedded device, it is very difficult to get a
> >>UUID of a eMMC partition into kernel command line with U-Boot. Handling of UUID
> >>is also a big effort at board manufacturing.
> >>
> >>Startup speed is very important for us. Searching for UUID on several MMC/SD
> >>devices will significant slow down the boot process.
> >>
> >>This problem can occur on many devices with embedded MMC and removable SD, e.g.
> >>smart phones. So I think we should find an solution to define MMC scan order or
> >>device number/name in a device tree.
> >>
> >Isn't /dev/disk/by-path what you're after?
> >
> >~$ ls -l /dev/disk/by-path/
> >lrwxrwxrwx    1 root     root           13 Jan  1 15:22 platform-mmc0:b368 ->
> >../../mmcblk0
> >lrwxrwxrwx    1 root     root           15 Jan  1 15:22 platform-mmc0:b368-part1
> >-> ../../mmcblk0p1
> >lrwxrwxrwx    1 root     root           15 Jan  1 15:22 platform-mmc0:b368-part2
> >-> ../../mmcblk0p2
> >lrwxrwxrwx    1 root     root           15 Jan  1 15:22 platform-mmc0:b368-part3
> >-> ../../mmcblk0p3
> No, because we have to know which will be the name of the root
> device _before_ we start the kernel. In our embedded device we start
> the kernel with a bootloader (U-Boot) and pass the root device with
> the kernel command line parameter "root=/dev/mmcblk0p1". That is not
> possible if we do not know what will be the name of the root device
> (mmcblk0 or mmcblk1) when kernel try to mount it.

what you can do is let u-boot pass the mmc channel of the boot device,
launch a tiny init from initramfs to perform the resolution to
/dev/mmcblkXpY (for example through /sys/class/mmc_host/...), mount
the real rootfs and exec the real init

best regards

-- 
Matthias Kaehlcke
Embedded Linux Developer
Amsterdam

   Usually when people are sad, they don't do anything. They just cry over
     their condition. But when they get angry, they bring about a change
                              (Malcolm X)
                                                                 .''`.
    using free software / Debian GNU/Linux | http://debian.org  : :'  :
                                                                `. `'`
gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4                  `-
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux