Booting Linux from SD Card Print

 

The below instructions describe how to flash a micro SD card with a Linux image suitable for running on the i.MX 8M Mini kit, and prepare the kit for booting from that card.


Installing Linux Image to SD card

Instructions on building Linux images for i.MX 8M Mini kit can be found at the following page: https://emcraft.com/som/imx8m-mini-som/understanding-and-running-yoctobuild.

When the build is complete the result image will be located at the following path in the Yocto build directory tmp/deploy/images/8mminicube2g/.

  1. Locate the image, which has the image-pmd-debug-imx8mmcube2g.sdcard.bz2 name and decompress it:
  2. [user@localhost ~]$ bzip2 -dk image-pmd-debug-imx8mmcube2g.sdcard.bz2

  3. Insert a suitable SD card into a host PC, and write the decompressed image into it (replace  /dev/sdd with your actual device for SD card):
  4. [user@localhost ~]$ dd if=image-pmd-debug-imx8mmcube2g.sdcard of=/dev/sdd bs=1M status=progress conv=fdatasync


Setting Up Boot Switches for SD card Boot

  1. Power the kit off by disconnecting the USB Type C cable from the development host.
  2. Set the boot switches for eMMC boot, as shown below:

SD Boot Settings


Verifying Boot from SD card

  1. Power the kit on by connecting the USB Type C cable to the development host.
  2. Verify that the following boot messages appear on the Linux console:
  3. U-Boot SPL 2019.04+gd62847f248 (May 19 2020 - 09:22:02 +0000) power_bd71837_init DDRINFO: start DRAM init DDRINFO:ddrphy calibration done DDRINFO: ddrmix config done Normal Boot Trying to boot from MMC1 U-Boot 2019.04+gd62847f248 (May 19 2020 - 09:22:02 +0000) CPU: Freescale i.MX8MMQ rev1.0 1800 MHz (running at 1200 MHz) CPU: Commercial temperature grade (0C to 95C) at 36C Reset cause: POR Model: Emcraft i.MX8MM Cube board DRAM: 2 GiB ... Starting kernel ... [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034] [ 0.000000] Linux version 5.4.3+ga922dd67988c (oe-user@oe-host) (gcc version 9.2.0 (GCC)) #1 SMP PREEMPT Tue May 19 10:16:49 UTC 2020 [ 0.000000] Machine model: FSL i.MX8MM EVK board [ 0.000000] earlycon: ec_imx6q0 at MMIO 0x0000000030890000 (options '115200') [ 0.000000] printk: bootconsole [ec_imx6q0] enabled [ 0.000000] efi: Getting EFI parameters from FDT: [ 0.000000] efi: UEFI not found. [ 0.000000] Reserved memory: created CMA memory pool at 0x0000000078000000, size 640 MiB ... Mounting /run/media/mmcblk2p1... [ OK ] Mounted /run/media/mmcblk2p1. [ 8.494745] fec 30be0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx [ 8.502532] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 10.115764] random: crng init done [ 10.119172] random: 7 urandom warning(s) missed due to ratelimiting [ OK ] Started Load/Save Random Seed. i.MX 8M Mini Release beta1-20200519 imx8mmcube ttymxc1 imx8mmcube login: