Use the procedure documented below to install the U-Boot firmware, Linux kernel and filesystem images to an SD Card on the i.MX 8M module. Having completed the installation, the i.MX 8M SOM will boot to Linux from the SD Card on next reset / power on.
Please note that the installation will erase files previously installed on your SD Card. The SD card size should be at least 8 Gb for the Linux kernel and filesystem images to fit on the card.
- Download and unpack the tarball with the prebuilt bootable Linux images from the Emcraft site:
$ tar xvfj images-imx8m-beta6.tar.bz2
Image
Image-imx8m-som.dtb
imx-boot-imx8m-som-sd.bin
imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin
modules-imx8m-som.tgz
emcraft-rootfs-imx8m-som.tar.bz2
$
- Insert an empty SD Card into development host. Install the U-Boot image file (imx-boot-imx8m-som-sd.bin) to the SD Card starting at 33KB offset. Note that you need to specify the whole device as the destination for the dd command (i.e. do not install the image to a partition):
$ sudo dd if=imx-boot-imx8m-som-sd.bin of=/dev/sdd bs=1k seek=33
...
- Flush the system caches:
$ sync
- Re-create the partitions on the SD Card, as follows (note the offset of 9000 sectors before the first partition):
$ sudo fdisk -l /dev/sdd
Disk /dev/sdd: 15.6 GB, 15552479232 bytes
64 heads, 32 sectors/track, 14832 cylinders, total 30375936 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x423e3293
Device Boot Start End Blocks Id System
/dev/sdd1 9000 657143 396929 c W95 FAT32 (LBA)
/dev/sdd2 657144 6947599 3145728 83 Linux
$
- Create the filesystems on the SD Card:
$ sudo mkfs.vfat /dev/sdd1
$ sudo mkfs.ext4 /dev/sdd2
- Re-insert the SD Card into you host PC, so the system discovers the new partitions and mounts them. Copy the Linux kernel, DTB and Cortex-M4 demo images to the first (VFAT) partition:
$ df
...
/dev/sdd1 324824 38928 285896 12% /media/emcraft/13B4-D0A1
/dev/sdd2 4062520 2068732 1767712 54% /media/emcraft/
b8a8aa84-4c96-443e-8563-88a388f197ec
...
$ cp Image Image-imx8m-som.dtb imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin \
/media/emcraft/13B4-D0A1/
- Install the root filesystem to the ext4 SD Card partition:
$ cd /media/emcraft/b8a8aa84-4c96-443e-8563-88a388f197ec
$ sudo tar xfj /tmp/emcraft-rootfs-imx8m-som.tar.bz2
$ cd -
$ umount /media/emcraft/*
- Insert the SD Card to the SD Card holder on the IMX8M-SOM-BSB board. Configure the board for booting from the SD Card. Set the S1 DIP switch boot selection jumpers as follows:
S1.1 |
Off |
S1.2 |
On |
S1.3 |
Off |
S1.4 |
Off |
S1.5 |
On |
S1.6 |
On |
S1.7 |
Off |
S1.8 |
Off |
- Re-apply the power. The system will boot to the Linux prompt:
U-Boot SPL 2017.03-imx_v2017.03_4.9.51_imx8m_beta (Feb 04 2018 - 22:09:01)
DDR PLL1 400MHz locked
DDR PLL1 395MHz locked
Normal Boot
Trying to boot from MMC2
U-Boot 2017.03-imx_v2017.03_4.9.51_imx8m_beta (Feb 04 2018 - 22:09:01 +0300)
CPU: Freescale i.MX8MQ rev2.0 1500 MHz (running at 1000 MHz)
CPU: Commercial temperature grade (0C to 95C) at 32C
Reset cause: POR
Model: EmCraft i.MX8M SOM LPDDR4
DRAM: 1 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
In: serial
Out: serial
Err: serial
Net: eth0: ethernet@30be0000
Normal Boot
Hit any key to stop autoboot: 0
...
NXP i.MX Release Distro 4.9.51-mx8-beta imx8m-som ttymxc0
imx8m-som login: root
...
If the target board does not boot (no activity on the console), verify the following items: