sabre SD eMMC

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

sabre SD eMMC

2,554 Views
niklasmolin
Senior Contributor I

Hi.

I just received a Sabre SD board and trying to access the 8GB eMMC chip (I think it is connected on SD4).

First I notice I can't boot from the eMMC, only from the SD card slots.

When I boot on the SD card, I can't find the eMMC.

I'm pretty sure it is a small detail I have missed.

I have been trying the Linux image that was provided with the board (not sure what environment they used to build that one) and I have also tried the image I build in the Yocto environment.

But I can't see the eMMC.

My question is what device (/dev/...) I need to mount to access that chip?

When I start u-boot only I can see the eMMC chip.

Thanks,

Niklas

Labels (3)
0 Kudos
Reply
3 Replies

907 Views
LeonardoSandova
Specialist I

have you tried flashing the boot through the manufacturing tool? it is the easiest way to flash an eMMC.

Leo

0 Kudos
Reply

907 Views
niklasmolin
Senior Contributor I

Hi Leo.

I haven't tried that.

First I was just trying to figure out how to find the eMMC device when running the Linux image.

I think it put is as /dev/mmcblk1, but I also have /dev/mmcblk1boot0 and /dev/mmcblk1boot1.

But when I check this device with fdisk, it doesn't have any partitions and "file -s" says it's just data.

First I just want to make sure I accessing the right device, before I do anything.

Should there be any image pre-loaded in the eMMC when the boards comes out from the manufacturing?

/Niklas

0 Kudos
Reply

907 Views
LeonardoSandova
Specialist I

Hi Niklas.

When I got these type of questions, I look at how MFGtool does the flashing. Inspecting this file, the fist task is booting a temporal u-boot and kernel,  using a ram filesystem (initramfs). Then it 'dd' u-boot and kernel to /dev/mmcblk0 (/dev/mmcblk1 is for the SD card), then in creates a partition on that device, /dev/mmcblk0p1, and untar the real filesystem there. here are the details:

<LIST name="SabreSD-eMMC" desc="Choose eMMC Linux as media">

    <CMD state="BootStrap" type="boot" body="BootStrap" file ="u-boot-mx6q-sabresd.bin" >Loading U-boot</CMD>

    <CMD state="BootStrap" type="load" file="uImage" address="0x10800000"

        loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" >Loading Kernel.</CMD>

    <CMD state="BootStrap" type="load" file="initramfs.cpio.gz.uboot" address="0x10C00000"

        loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" >Loading Initramfs.</CMD>

    <CMD state="BootStrap" type="jump" > Jumping to OS image. </CMD>

    

    <CMD state="Updater" type="push" body="$ ls /dev/*"/>

    <CMD state="Updater" type="push" body="$ dd if=/dev/zero of=/dev/mmcblk0 bs=512 seek=1536 count=16">clean up u-boot parameter</CMD>

    <CMD state="Updater" type="push" body="$ echo 1 > /sys/devices/platform/sdhci-esdhc-imx.3/mmc_host/mmc0/mmc0:0001/boot_config">access boot partition 1</CMD>

    <CMD state="Updater" type="push" body="send" file="files/u-boot-mx6q-sabresd.bin">Sending U-Boot</CMD>

    <CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk0 bs=512 seek=2 skip=2">write U-Boot to sd card</CMD>

    <CMD state="Updater" type="push" body="$ echo 8 > /sys/devices/platform/sdhci-esdhc-imx.3/mmc_host/mmc0/mmc0:0001/boot_config">access user partition and enable boot partion 1 to boot</CMD>

    

    <CMD state="Updater" type="push" body="send" file="files/uImage">Sending kernel uImage</CMD>

    <CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk0 bs=1M seek=1 conv=fsync">write kernel image to sd card</CMD>

    

    <CMD state="Updater" type="push" body="send" file="mksdcard.sh.tar">Sending partition shell</CMD>

    <CMD state="Updater" type="push" body="$ tar xf $FILE "> Partitioning...</CMD>

    <CMD state="Updater" type="push" body="$ sh mksdcard.sh /dev/mmcblk0"> Partitioning...</CMD>

    <CMD state="Updater" type="push" body="$ mkfs.ext3 -j /dev/mmcblk0p1">Formatting rootfs partition</CMD>

    <CMD state="Updater" type="push" body="$ mkdir -p /mnt/mmcblk0p1"/> 

    <CMD state="Updater" type="push" body="$ mount -t ext3 /dev/mmcblk0p1 /mnt/mmcblk0p1"/>

    <CMD state="Updater" type="push" body="pipe tar -jxv -C /mnt/mmcblk0p1" file="files/rootfs.tar.bz2">Sending and writting rootfs</CMD>

    <CMD state="Updater" type="push" body="frf">Finishing rootfs write</CMD>

    <CMD state="Updater" type="push" body="$ umount /mnt/mmcblk0p1">Unmounting rootfs partition</CMD>

    <CMD state="Updater" type="push" body="$ echo Update Complete!">Done</CMD>

</LIST>

0 Kudos
Reply