Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info
iconfalse

$ git clone https://source.codeaurora.org/external/imx/imx-atf -b imx_5.4.24_2.1.0

$ cd imx-atf

$ wget -c ftp://ftp.embedian.com/public/smarcimx8m/0001-imx8m-atf-ddr-timing.patch

$ patch -p1 <0001-imx8m-atf-ddr-timing.patch

$ make CROSS_COMPILE=${CC} PLAT=imx8mq bl31

$ cp build/imx8mq/release/bl31.bin ../imx-mkimage/iMX8M/

$ cd ../

...

Note
iconfalse

Note1:

If the board is 2GB LPDDR4 in commercial or industrial temperature, use
$ make ARCH=arm CROSS_COMPILE=${CC} smarcimx8mq_2g_ser3_defconfig

If the board is SMARC-iMX8M-Q-4G or SMARC-iMX8M-Q-4G-I (4GB LPDDR4), use
$ make ARCH=arm CROSS_COMPILE=${CC} smarcimx8mq_4g_ser3_defconfig

Note 2:

"ser3" stands for console debug port in SMARC definition. In this example, we uses SER3 as debug port. If user uses SER0 as your debug port, make change to "ser0" instead. Same as SER1 and SER2.

Note 3:

To change the debug port, in addition to u-boot defconfig and uEnv.txt files, you also need to modify plat/imx/imx8m/imx8mq/include/platform_def.h in the imx-atf. Find "#define IMX_BOOT_UART_BASE U(0x30860000)" and change to the correct address that defined in uEnv.txt file.

Note 4:

The SMARC-iMX8M module always boot up from the on-module eMMC flash. The factory default will be flash.bin pre-installed with SER3 as console output. In some cases when the eMMC flash is empty or needs to be upgraded. Users can shunt crossed the TEST# to ground. In this way, the SMARC-iMX8M module will boot up to carrier SD card, if TEST# pin is shunt crossed. The flash.bin image are the same, the difference is how you flash flash.bin. This will be explained in the "Setup SD card" section.

...

Info
iconfalse
$ sync
$ sudo umount /media/boot
$ sudo umount /media/rootfs

...

Setup eMMC

...

Setting up eMMC usually is the last step at development stage after the development work is done at your SD card or NFS environments. From software point of view, eMMC is nothing but a non-removable SD card on board. For SMARC-iMX8MiMX8MQ, the SD card is always emulated as /dev/mmcblk1 and on-module eMMC is always emulated as /dev/mmcblk0. Setting up eMMC now is nothing but changing the device descriptor. 

This section gives a step-by-step procedure to setup eMMC flash. Users can write a shell script your own at production to simplify the steps.

...

Info
iconfalse

$ sudo mkdir -p /media/boot/dtbs

$ sudo cp -v imx8mq-smarc.dtb /media/boot/dtbs/

Setup eMMC

...

Info
iconfalse

$ sudo tar -zxvf smarcimx8mq-emmc-rootfs.tar.gz -C /media/rootfs

...