[meta-freescale] Boot on eMMC

Shanx shanx at legtux.org
Wed Apr 15 04:55:36 PDT 2015


I'he successfly booted from the eMMC. To do that, I've boot from the
sdcard, and I have written u-boot on mmcbl3boot0 (mmcblk3 is the eMMC)
using :

echo 0 > /sys/block/mmcblk3boot0/force_ro
dd if=uboot.imx of=/dev/mmcblk3boot0 bs=512 seek=2 skip=2

(the first line ables to write on mmcblk3boot0)

I've tried to write the system on the eMMC, using :

dd if=rootfs.sdcard of=/dev/mmcblk3

After that, I can see the rootfs in mmcblk3p2 and the kernel and dtb files
in mmcblk3p1.

When booting, I access to u-boot, but it can't boot because it doesn't find
the kernel. But setting the bootargs with root=/dev/mmcblk3p2, and booting
using a downloaded kernel (stored in RAM) works.
Any idea how I can use the system written on the eMMC to boot ?

2015-04-14 17:11 GMT+02:00 Gary Thomas <gary at mlbassoc.com>:

> On 2015-04-14 09:05, Otavio Salvador wrote:
>
>> On Tue, Apr 14, 2015 at 12:04 PM, Gary Thomas <gary at mlbassoc.com> wrote:
>>
>>> On 2015-04-14 09:00, Otavio Salvador wrote:
>>>
>>>>
>>>> On Tue, Apr 14, 2015 at 11:58 AM, Gary Thomas <gary at mlbassoc.com>
>>>> wrote:
>>>>
>>>>>
>>>>> On 2015-04-14 08:28, Otavio Salvador wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> On Tue, Apr 14, 2015 at 11:12 AM, Shanx <shanx at legtux.org> wrote:
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Hello,
>>>>>>> I've tried a lot of things, but I can't boot on eMMC. I've flashed it
>>>>>>> from
>>>>>>> u-boot, or from the system (booted from the sdcard). For exemple,
>>>>>>> I've
>>>>>>> tried
>>>>>>> : dd if=rootfs.sdcard of=/dev/mmcblk3
>>>>>>> I've also tried to flash only u-boot.imx (with dd and seek=2)
>>>>>>>
>>>>>>> When booting on eMMC (with the boot switch setup given on the Linux
>>>>>>> User
>>>>>>> Guide), nothing append. Any idea why ?
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> eMMC has some details which differ from the uSD normal usage. Mainly
>>>>>> regarding the use of Boot Partitions. So you must to write it to the
>>>>>> boot partition otherwise it won't work.
>>>>>>
>>>>>>
>>>>> I'm not sure this is correct.  I have an i.MX6Q board which has
>>>>> eMMC on SD4 and SD on SD3 and I can boot from either, using the
>>>>> same command to install U-Boot
>>>>>     dd if=/tmp/disk/${UBOOT_NAME} of=${DISK} seek=2 bs=512 conv=notrunc
>>>>>
>>>>> Maybe it's a difference in the eMMC device (mine is Sandisk SDIN5
>>>>> (or7)C2-32G-L)
>>>>>
>>>>
>>>>
>>>> It depends if Boot Partition is enabled or not.
>>>>
>>>>
>>> Is that an i.MX6 setting?
>>>
>>
>> No; it is eMMC 4.41 (or later) one if IIRC. There are some fields
>> exposed in sysfs and also a mmc-utils package at meta-oe.
>>
>>
> Interesting, I'll look at this but my boards have boot partitions:
>
> mmc0: new high speed DDR MMC card at address 0001
> mmcblk0: mmc0:0001 SEM32G 29.1 GiB
> mmcblk0boot0: mmc0:0001 SEM32G partition 1 4.00 MiB
> mmcblk0boot1: mmc0:0001 SEM32G partition 2 4.00 MiB
> usb 1-1: new high-speed USB device number 2 using ci_hdrc
> mmcblk0rpmb: mmc0:0001 SEM32G partition 3 4.00 MiB
>  mmcblk0: p1 p2
>  mmcblk0boot1: unknown partition table
>  mmcblk0boot0: unknown partition table
>
> As I said, I install U-Boot directly to block 2 of the device,
> not to any of the "boot" partitions.
>
> --
> ------------------------------------------------------------
> Gary Thomas                 |  Consulting for the
> MLB Associates              |    Embedded world
> ------------------------------------------------------------
> --
> _______________________________________________
> meta-freescale mailing list
> meta-freescale at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-freescale/attachments/20150415/4e7e3cc5/attachment.html>


More information about the meta-freescale mailing list