Skip to content

03. Boot from SD card

vraevsky edited this page Nov 12, 2018 · 11 revisions

This page explains how to boot Yocto Linux on CL-SOM-iMX8 from an SD card.

Setup Boot Environment

  • Set-up the CL-SOM-iMX8 eval-kit (SBC-iMX8) as detailed at CL-SOM-iMX8 Getting Started
  • Insert the Yocto SD card into SD socket P9 on the CL-SOM-iMX8 eval-kit (SBC-iMX8).
  • Power up the device
  • Stop the boot process in U-Boot
PMIC:  PFUZE100 ID=0x10
check ddr4_pmu_train_imem code
check ddr4_pmu_train_imem code pass
check ddr4_pmu_train_dmem code
check ddr4_pmu_train_dmem code pass
Training PASS
Normal Boot
SPL Boot Device: MMC1
Trying to boot from MMC1


U-Boot 2017.03-imx_v2017.03_4.9.51_imx8m_beta+g0adb492 (Feb 06 2018 - 17:45:09 +0200)

CPU:   Freescale i.MX8MQ rev2.0 1500 MHz (running at 1000 MHz)
Reset cause: POR
Model: CompuLab CL-SOM-iMX8
DRAM:  2 GiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
In:    serial
Out:   serial
Err:   serial
switch to partitions #0, OK
mmc0(part 0) is current device
Net:   eth0: ethernet@30be0000
Normal Boot
Hit any key to stop autoboot:  0

Boot Options

The CompuLab imx8 device has two boot options.

Alt-Boot (preferred)

This approach assumes that a compatible boot loader is at the 33K offset of the SD card. The Yocto image build produces SD card images with a compatible boot loader at the 33K offset.

⚠️ If there is no a compatible boot loader, the device gets stuck. Probably an SD card image was created manually outside of the Yocto build environment or an incorrect machine was in use.

In order to make the device boot this way, follow this simple procedure:

  • press and hold SW5 and SW6
  • release SW5 and then SW6

U-Boot command line boot

This approach assumes:

  1. the device was booted with a compatible boot loader
  2. the default environment allows booting from the mmcdev device.

In order to make the device boot this way, issue:

env default -a
setenv mmcdev 1
boot

Yocto Linux boot

The Yocto image build produces SD card images that allow booting the Yocto Linux using the default boot environment. After issuing either of the boot methods the device will boot into the Yocto Linux.

Proceed to How To Install Yocto Linux on eMMC