<div dir="ltr"><div><div>My eMMC is mmcblk3. mmcblk3boot0 contains u-boot.imx, mmcbl3p1 contains the zImage and dtb files, and mmcblk3p2 contains the rootfs. When booting, I use the u-boot of mmcblk3boot0. To use the system of the eMMC, I've tried this command in u-boot : <br><br><span>fatload mmc 2:1 0x12000000 zImage ; fatload mmc 2:1 0x18000000 
imx6q-sabresd-ldo.dtb ; setenv bootargs console=ttymxc0,115200 
root=/dev/mmcblk3p2 ; bootz 0x12000000 - 0x18000000<br><br></span></div><span>It works well, but it seems that the rootfs is loaded in RAM (after a reboot, all modifications are lost, and mount gives no indication of mmcbl3p2 being mounted). But if I boot without </span><span>root=/dev/mmcblk3p2, I have a kernel panic because the kernel doesn't find the rootfs. I don't understand. Does the kernel read the rootfs in en eMMC and load it in RAM ? It's illogical, and it's not what I want. Where am I wrong ?<br><br></span></div><span> </span></div><div class="gmail_extra"><br><div class="gmail_quote">2015-04-15 14:06 GMT+02:00 Gary Thomas <span dir="ltr"><<a href="mailto:gary@mlbassoc.com" target="_blank">gary@mlbassoc.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 2015-04-15 05:55, Shanx wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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 :<br>
<br>
echo 0 > /sys/block/mmcblk3boot0/force_<u></u>ro<br>
<br>
dd if=uboot.imx of=/dev/mmcblk3boot0 bs=512 seek=2 skip=2<br>
<br>
(the first line ables to write on mmcblk3boot0)<br>
<br>
I've tried to write the system on the eMMC, using :<br>
<br>
dd if=rootfs.sdcard of=/dev/mmcblk3<br>
<br>
After that, I can see the rootfs in mmcblk3p2 and the kernel and dtb files in mmcblk3p1.<br>
<br>
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<br>
(stored in RAM) works.<br>
</blockquote>
<br></span>
What are the commands being used to boot in U-Boot?<br>
What are the errors?<br>
Have you tried running these commands by hand?<br>
<br>
The most likely problem is that U-Boot is trying to find your kernel<br>
on the wrong MMC device.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
<br>
Any idea how I can use the system written on the eMMC to boot ?<br>
<br></span>
2015-04-14 17:11 GMT+02:00 Gary Thomas <<a href="mailto:gary@mlbassoc.com" target="_blank">gary@mlbassoc.com</a> <mailto:<a href="mailto:gary@mlbassoc.com" target="_blank">gary@mlbassoc.com</a>>>:<span class=""><br>
<br>
  Â  On 2015-04-14 09:05, Otavio Salvador wrote:<br>
<br></span><span class="">
  Â  Â  Â  On Tue, Apr 14, 2015 at 12:04 PM, Gary Thomas <<a href="mailto:gary@mlbassoc.com" target="_blank">gary@mlbassoc.com</a> <mailto:<a href="mailto:gary@mlbassoc.com" target="_blank">gary@mlbassoc.com</a>>> wrote:<br>
<br>
  Â  Â  Â  Â  Â  On 2015-04-14 09:00, Otavio Salvador wrote:<br>
<br>
<br></span><span class="">
  Â  Â  Â  Â  Â  Â  Â  On Tue, Apr 14, 2015 at 11:58 AM, Gary Thomas <<a href="mailto:gary@mlbassoc.com" target="_blank">gary@mlbassoc.com</a> <mailto:<a href="mailto:gary@mlbassoc.com" target="_blank">gary@mlbassoc.com</a>>> wrote:<br>
<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  On 2015-04-14 08:28, Otavio Salvador wrote:<br>
<br>
<br>
<br></span><div><div class="h5">
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  On Tue, Apr 14, 2015 at 11:12 AM, Shanx <<a href="mailto:shanx@legtux.org" target="_blank">shanx@legtux.org</a> <mailto:<a href="mailto:shanx@legtux.org" target="_blank">shanx@legtux.org</a>>> wrote:<br>
<br>
<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Hello,<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  I've tried a lot of things, but I can't boot on eMMC. I've flashed it<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  from<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  u-boot, or from the system (booted from the sdcard). For exemple, I've<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  tried<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  : dd if=rootfs.sdcard of=/dev/mmcblk3<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  I've also tried to flash only u-boot.imx (with dd and seek=2)<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  When booting on eMMC (with the boot switch setup given on the Linux<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  User<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Guide), nothing append. Any idea why ?<br>
<br>
<br>
<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  eMMC has some details which differ from the uSD normal usage. Mainly<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  regarding the use of Boot Partitions. So you must to write it to the<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  boot partition otherwise it won't work.<br>
<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  I'm not sure this is correct.  I have an i.MX6Q board which has<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  eMMC on SD4 and SD on SD3 and I can boot from either, using the<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  same command to install U-Boot<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â dd if=/tmp/disk/${UBOOT_NAME} of=${DISK} seek=2 bs=512 conv=notrunc<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Maybe it's a difference in the eMMC device (mine is Sandisk SDIN5<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  (or7)C2-32G-L)<br>
<br>
<br>
<br>
  Â  Â  Â  Â  Â  Â  Â  It depends if Boot Partition is enabled or not.<br>
<br>
<br>
  Â  Â  Â  Â  Â  Is that an i.MX6 setting?<br>
<br>
<br>
  Â  Â  Â  No; it is eMMC 4.41 (or later) one if IIRC. There are some fields<br>
  Â  Â  Â  exposed in sysfs and also a mmc-utils package at meta-oe.<br>
<br>
<br>
  Â  Interesting, I'll look at this but my boards have boot partitions:<br>
<br>
  Â  mmc0: new high speed DDR MMC card at address 0001<br>
  Â  mmcblk0: mmc0:0001 SEM32G 29.1 GiB<br>
  Â  mmcblk0boot0: mmc0:0001 SEM32G partition 1 4.00 MiB<br>
  Â  mmcblk0boot1: mmc0:0001 SEM32G partition 2 4.00 MiB<br>
  Â  usb 1-1: new high-speed USB device number 2 using ci_hdrc<br>
  Â  mmcblk0rpmb: mmc0:0001 SEM32G partition 3 4.00 MiB<br>
  Â  Â  mmcblk0: p1 p2<br>
  Â  Â  mmcblk0boot1: unknown partition table<br>
  Â  Â  mmcblk0boot0: unknown partition table<br>
<br>
  Â  As I said, I install U-Boot directly to block 2 of the device,<br>
  Â  not to any of the "boot" partitions.<br>
<br>
  Â  --<br></div></div>
  Â  ------------------------------<u></u>__----------------------------<u></u>--<span class=""><br>
  Â  Gary Thomas  Â  Â  Â  Â  Â  Â  Â  Â |  Consulting for the<br>
  Â  MLB Associates  Â  Â  Â  Â  Â  Â  |  Â  Embedded world<br></span>
  Â  ------------------------------<u></u>__----------------------------<u></u>--<br>
  Â  --<br>
  Â  ______________________________<u></u>___________________<br>
  Â  meta-freescale mailing list<br>
  Â  meta-freescale@yoctoproject.__<u></u>org <mailto:<a href="mailto:meta-freescale@yoctoproject.org" target="_blank">meta-freescale@<u></u>yoctoproject.org</a>><br>
  Â  <a href="https://lists.yoctoproject." target="_blank">https://lists.yoctoproject.</a>__<u></u>org/listinfo/meta-freescale <<a href="https://lists.yoctoproject.org/listinfo/meta-freescale" target="_blank">https://lists.yoctoproject.<u></u>org/listinfo/meta-freescale</a>><br>
<br>
<br>
<br>
<br><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
-- <br>
Please keep your replies on the mailing list(s) so that all<br>
may benefit.  Private support is available under contract<br>
from various agents, including MLB Associates.  Private<br>
email to me without a contract will be ignored.</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
------------------------------<u></u>------------------------------<br>
Gary Thomas  Â  Â  Â  Â  Â  Â  Â  Â |  Consulting for the<br>
MLB Associates  Â  Â  Â  Â  Â  Â  |  Â  Embedded world<br>
------------------------------<u></u>------------------------------<br>
<br>
<br>
-- <br>
______________________________<u></u>_________________<br>
meta-freescale mailing list<br>
<a href="mailto:meta-freescale@yoctoproject.org" target="_blank">meta-freescale@yoctoproject.<u></u>org</a><br>
<a href="https://lists.yoctoproject.org/listinfo/meta-freescale" target="_blank">https://lists.yoctoproject.<u></u>org/listinfo/meta-freescale</a><br>
</div></div></blockquote></div><br></div>