This document describes the steps for flashing eMMC from SD Card on i.MX6Q SabreSD board.
- Download the prebuilt images (Linux 4.1.15) of i.MX6Q SabreSD board from this link.
- Flash the sdcard image on SD Card.
- sudo dd if=<sdcard_image> of=/dev/sdX bs=1M && sync
- Select Boot Mode to SD Card and boot the board from SD Card.
- 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
- Copy bootloader image from system to USB Mass Storage
- cp <u-boot_image> /media/username/<rootfs>/home/root/
- Eject the USB Mass Storage and terminate the ums process by pressing ctrl+c in u-boot.
- Power Off and Power On the board and login to the kernel console.
- Flash the bootloader image to eMMC
- dd if=/home/root/<u-boot_image> of=/dev/mmcblk3 bs=512 seek=2 conv=fsync
- 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
- Make partitions on eMMC manually as per section 4.3.3 in this document using fdisk /dev/mmcblk3 command.
- Format the partition 1 on eMMC as VFAT and partition 2 as ext4 with below commands
- mkfs.vfat /dev/mmcblk3p1
- mkfs.ext4 /dev/mmcblk3p2
- 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
- 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
- Change the Boot Mode to eMMC
- 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