Guide to flash an eMMC from SD Card on i.MX6Q SABRE-SD

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

Guide to flash an eMMC from SD Card on i.MX6Q SABRE-SD

Guide to flash an eMMC from SD Card on i.MX6Q SABRE-SD

This document describes the steps for flashing eMMC from SD Card on i.MX6Q SabreSD board.

  1. Download the prebuilt images (Linux 4.1.15) of i.MX6Q SabreSD board from this link.
  2. Flash the sdcard image on SD Card.
    • sudo dd if=<sdcard_image> of=/dev/sdX bs=1M && sync
  3. Select Boot Mode to SD Card and boot the board from SD Card.
  4. Stop the console at u-boot and execute below command.
    • ums 0 mmc 1                 // this will mount SD card as USB Mass Storage to your system
  5. Copy bootloader image from system to USB Mass Storage
    • cp <u-boot_image> /media/username/<rootfs>/home/root/
  6. Eject the USB Mass Storage and terminate the ums process by pressing ctrl+c in u-boot.
  7. Power Off and Power On the board and login to the kernel console.
  8. Flash the bootloader image to eMMC
    • dd if=/home/root/<u-boot_image> of=/dev/mmcblk3 bs=512 seek=2 conv=fsync
  9. Mount the partition 1 of SD Card to copy the kernel image and DTB file to /home/root folder.
    • mount /dev/mmcblk2p1 /mnt/
    • cp -r /mnt/zImage /mnt/imx6q-sabresd.dtb /home/root
    • umount /dev/mmcblk2p1
  10. Make partitions on eMMC manually as per section 4.3.3 in this document using fdisk /dev/mmcblk3 command.
  11. Format the partition 1 on eMMC as VFAT and partition 2 as ext4 with below commands
    • mkfs.vfat /dev/mmcblk3p1
    • mkfs.ext4 /dev/mmcblk3p2
  12. Mount the partion 1 of eMMC and copy kernel image & DTB file.
    • mount /dev/mmcblk3p1 /mnt/
    • cp -r /home/root/zImage /home/root/imx6q-sabresd.dtb /mnt/
    • umount /dev/mmcblk3p1
  13. Mount the partion 2 of eMMC & SD Card and copy the file system.
    • mount /dev/mmcblk3p2 /mnt/                                                         // mount partition 2 of SD Card
    • mkdir /home/root/rootfs && mount /dev/mmcblk3p2 rootfs     // mount partition 2 of eMMC
    • cp -ar /mnt/* /home/root/rootfs/
    • sync
    • umount /dev/mmcblk2p2
    • umount /dev/mmcblk3p2
  14. Change the Boot Mode to eMMC
  15. Power Up the Board. (this will boot the images from eMMC)

NOTE: Above steps does not require any other images for eMMC. All the images for eMMC and SD Card are same.

Regards,

Shivani

No ratings
Version history
Last update:
‎04-18-2019 08:08 AM
Updated by: