Skip to end of metadata
Go to start of metadata

The phyBOARD-Zeta is delivered with a pre-flashed bootloader. The following instructions for flashing images from SD card will be useful if you want to:

  • Flash images because eMMC is empty
  • Upgrade to a new release
  • Use custom built images

phyCORE-i.MX7 SOMs with part number PCM-061-2110111C.A0 and later revisions are populated with eMMC 5.0. This device runs in HS400 mode and requires a patch to function with BSP release PD17.1.0. Please use BSP release PD17.1.1 or newer or apply the following patch to the Linux kernel source if you are using this SOM:

0001-MX7FLY-84-dts-imx7d-phycore-som-emmc-add-sd3-strobe-.patch


PCM-061.A0 - PCM-061.A4 and other SOM variants that do not use eMMC are not affected.

For further questions please contact support via the PHYTEC Support Portal.

Configure SD Card for Flashing

The SD card image "fsl-image-gui-<YOCTO MACHINE>.sdcard" can be flashed to eMMC. This image will need to be copied to the boot partition of a properly formatted SD card as described in Create a Bootable SD Card

Due to the UUIDs of the partitions in the sdcard image, it is recommended that you manually format the SD card if you plan on using it after flashing the image to eMMC, otherwise if using the sdcard image for both eMMC and SD, mmcblk0p1 and mmcblk1p1 as well as mmcblk0p2 and mmcblk1p2 will have the same UUID.


  1. Due to the size of the image, a new partition is required on the SD card to hold it. To create an additional partition that extends to the rest of the SD card, execute the following from your host machine:

    sudo fdisk /dev/sd<X>
    		p			print partition table. *Note end of partition /dev/sd<x>2* 	
    		n 			new partition
    		p 			primary
    		3 			partition number
    		<start> 	enter value after end of partition 2 (from partition table). This is the first sector of partition 3
    		<enter>		Use default value for last sector
    		t			Change partition system id
    		3			Partition number
    		c 			FAT32
    		w			write table to disk and exit
    
    sudo mkfs.vfat -n "data" /dev/sd<X>3
  2. Copy the sdcard image to the new "data" partition:

    cp fsl-image-gui-<YOCTO MACHINE>.sdcard /media/user/data/; sync

Option 1: Flash eMMC from Linux

  1. Configure the boot switch to boot from SD Card as described in i.MX7 Boot Configurations. Power on the board and boot into Linux.
  2. Flash fsl-image-gui-<YOCTO MACHINE>.sdcard from the SD card to eMMC. This will partition the card and copy U-Boot, zImage, dtb, and root filesystem to eMMC.

    Umount existing partitions (if any) and write the image to flash.

    umount /run/media/mmcblk2p*
    dd if=/run/media/mmcblk0p3/fsl-image-gui-<YOCTO MACHINE>.sdcard of=/dev/mmcblk2 bs=1MB; sync

Option 2: Flash eMMC from U-Boot

The default fsl-image-gui-<YOCTO MACHINE>.sdcard image in release PD17.1.x is larger than the DDR3 so cannot be loaded into memory from U-Boot. Use Option 1 for flashing eMMC.


  1. Configure the boot switch to boot from SD Card as described in i.MX7 Boot Configurations. Power on the board and stop in U-Boot.

  2. Flash fsl-image-gui-<YOCTO MACHINE>.sdcard from the SD card to eMMC. This will partition the card and copy U-Boot, zImage, dtb, and root filesystem to eMMC.

    => fatload mmc 0:3 ${loadaddr} fsl-image-gui-<YOCTO MACHINE>.sdcard
    reading fsl-image-gui-<YOCTO MACHINE>.sdcard
    935329792 bytes read in 41164 ms (21.7 MiB/s)
    
    => mmc dev 1
    switch to partitions #0, OK
    mmc1(part 0) is current device
    => mmc write ${loadaddr} 0x0 <number of blocks to write. In this case 0x1BF000>
    
    MMC write: dev # 1, block # 0, count 1830912 ... 1830912 blocks written: OK
    
    
  3. Reset the board. Stop in U-Boot again and check that the partition table for eMMC is as expected.

    => reset
     
    ...
     
    => mmc dev 1
    switch to partitions #0, OK
    mmc1(part 0) is current device
    => mmc part
    
    Partition Map for MMC device 1  --   Partition Type: DOS
    
    Part    Start Sector    Num Sectors     UUID            Type
      1     8192            16384           ef3963c1-01     0c
      2     24576           1794048         ef3963c1-02     83

Updating Individual Images

U-Boot

Flash U-Boot to eMMC. The i.MX7 expects an Image Vector Table offset of 0x400 bytes for SD/MMC boot device type. Type the following in U-Boot (alternatively, use dd command in Linux):

fatload mmc 0:1 ${loadaddr} u-boot.imx
mmc dev 1
mmc write ${loadaddr} 0x2 <u-boot image size in blocks>

Linux/DTB

From Linux, copy the kernel and device tree file to eMMC:

# The eMMC partitions will mount to /run/media/ on boot. If you just partitioned eMMC, you may manually mount the partition:
mkdir /run/media/mmcblk2p1
mount /dev/mmcblk2p1 /run/media/mmcblk2p1
 
cp /run/media/mmcblk0p1/zImage /run/media/mmcblk2p1/
cp /run/media/mmcblk0p1/<YOCTO IMAGE>.dtb /run/media/mmcblk2p1/

Root Filesystem

From Linux, flash the root filesystem to eMMC, partition 2.

dd if=/run/media/mmcblk0p3/fsl-image-gui-<YOCTO MACHINE>.ext4 of=/dev/mmcblk2p2 bs=1M

Boot Options in U-Boot

The target can be booted from on-board media or from a development host via network (Booting from network untested as of BSP-Yocto-FSL-iMX7-PD17.2.x). In our standard configuration, this BSP release loads the kernel and root filesystem from MMC if an SD card is inserted in the micro SD card slot. If no SD card is present, it will boot from eMMC.

Stand Alone SD/MMC Card Boot

This is the default boot configuration. Simply type the following:

boot 

Stand-Alone eMMC Boot

By default, the U-Boot environment is configured to autodetect which mmc interface U-boot was booted from (See i.MX7: Boot Configurations) and boot the kernel and root file system from the same device. However, if you would like to boot Linux from eMMC regardless of the boot source for U-Boot, then disable auto-detection and set the mmc boot device to mmc1 by modifying the environment as follows:

=> setenv mmcautodetect no
=> setenv mmcdev 1
=> saveenv

Reset the board and let it boot fully into Linux, or use the "boot" command within U-boot:

=> boot