Versions Compared

Key

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

...

Info
iconfalse

$ make ARCH=arm CROSS_COMPILE=${CC} distclean

$ make ARCH=arm CROSS_COMPILE=${CC} smarcimx8mqsmarcimx8mp_2g4g_ser3_defconfig

$ make ARCH=arm CROSS_COMPILE=${CC}

Note
iconfalse

Note1:

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

If the board is SMARC-iMX8M-Q-4G or SMARC-iMX8M-Q-4G-I (4GB LPDDR4)6GB LPDDR4, use
$ make ARCH=arm CROSS_COMPILE=${CC} smarcimx8mqsmarcimx8mp_4g6g_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/imx8mqimx8mp/include/platform_def.h in mk in the imx-atf. Find "#define IMX_BOOT_UART_BASE U(0x30860000)BASE      ?=      0x30890000" and change to the correct address that defined in uEnv.txt file.

Note 4:

The SMARC-iMX8MiMX8MP 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-iMX8MiMX8MP 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

$ cp u-boot-nodtb.bin spl/u-boot-spl.bin arch/arm/dts/imx8mqimx8mp-smarc.dtb ../imx-mkimage/iMX8M/

$ cp tools/mkimage ../imx-mkimage/iMX8M/mkimage_uboot

...

Info
iconfalse

$ cd ../imx-mkimage

$ make CROSS_COMPILE=${CC} SOC=iMX8M flash_spl_uboot
Note
iconfalse

If you device has HDMI port use the following command instead.

iMX8MP clean

$ make CROSS_COMPILE=${CC} SOC=iMX8M iMX8MP flash_hdmi_spl_ubootevk

 

If you device has Display Port use the following command instead.

$ make CROSS_COMPILE=${CC} SOC=iMX8M flash_dp_spl_uboot

The flash.bin file will be located at imx-mkimage/iMX8M directory. Go to "Setup SD Card" section to instruct you how to flash this file into SD card.

...

Linux Kernel

...

Download:

For 5.410.24 9 (Based on Freescale imx_NXP lf-5.4.24_2.1.0 official 10.y official release):

Info
iconfalse

$ git clone git@git.embedian.com:developer/smarc-fsl-linux-kernel.git linux_v5.410.24 9 -b smarc_8mq8mp_imx_lf-5.4.24_2.1.010.y

$ cd linux_v5.410.249

Configure and Build:

DCSS vs LCDIF

i.MX8M comes with 2 display controllers: DCSS and LCDIF.

Info
iconfalse

$ make ARCH=arm64 CROSS_COMPILE=${CC} distclean

$ make ARCH=arm64 CROSS_COMPILE=${CC} smarcimx8mqsmarcimx8mp_defconfig

$ make ARCH=arm64 CROSS_COMPILE=${CC} Image modules dtbs

Note
iconfalse

 

...

 LCDIF can be connected only to MIPI-DSI and supports resolutions up to 1080p.

Selecting display configuration is a matter of selecting an appropriate DTB file under arch/arm64/boot/dts/embedian.

All available DTB files are listed in the table below.

 

DTB File NameDescription
imx8mqimx8mp-smarc.dtbDevice tree blob for no display configuration.
imx8mqimx8mp-smarc-hdmi.dtbDevice tree blob for HDMI display configuration (DCSS).
imx8mqimx8mp-smarc-dp.dtbDevice tree blob for Display Port (DP) display configuration (DCSS).imx8mq-smarc-lcdif-lvds.dtbDevice tree blob for LCDIF LVDS display configuration.
imx8mqimx8mp-smarc-dcss-lvdsm7.dtbDevice tree blob for DCSS LVDS display configuration.imx8mq-smarc-dual-display.dtbDevice tree blob for dual LVDS+HDMI display Cortex-M7 co-processor configuration.

Root File System

...

Fuse flash.bin to the on-module eMMC flash. (The eMMC flash is emulated as /dev/mmcblk0 mmcblk2 in SMARC-iMX8MiMX8MP)

Info
iconfalse
titlehome directory

$ sudo dd if=flash.bin of=/dev/mmcblk0 mmcblk2 bs=1024 seek=33

Note
  1. If your u-boot hasn't been finalized and still under development, it is recommended to shunt cross the test pin and boot directly from SD card first. Once your u-boot is fully tested and finalized, you can fuse your flash.bin to eMMC flash.
  2. When TEST# pin of SMARC-iMX8M iMX8MP is not shunt crossed, it will always boot up from on-module eMMC flash. U-boot will read the BOOT_SEL configuration and determine where it should load Image and device tree blob. When TEST# is shunt crossed (pull low), it will always boot up from SD card.

...

Info
iconfalse
title~/uEnv.txt

optargs="video=HDMI-A-1:1920x1080-32@60 consoleblank=0"
#optargs="video=HDMI-A-1:3840x2160-32@30 consoleblank=0"
#optargs="video=HDMI-A-1:3840x2160-32@60 consoleblank=0"
#console port SER3
console=ttymxc0ttymxc1,115200 earlycon=ec_imx6q,0x308600000x30890000,115200
#console port SER2
#console=ttymxc1ttymxc2,115200 earlycon=ec_imx6q,0x308900000x30880000,115200
#console port SER1
#console=ttymxc2ttymxc3,115200 earlycon=ec_imx6q,0x308800000x30a60000,115200
#console port SER0
#console=ttymxc3ttymxc0,115200 earlycon=ec_imx6q,0x30A600000x30860000,115200
mmcdev=1
mmcpart=1
image=Image
loadaddr=0x40480000
fdt_addr=0x43000000
mmcroot=/dev/mmcblk1p2 rw
usbroot=/dev/sda2 rw
mmcrootfstype=ext4 rootwait fixrtc
netdev=eth0
ethact=FEC0
ipaddr=192.168.1.150
serverip=192.168.1.53
gatewayip=192.168.1.254
mmcargs=setenv bootargs cma=1280M console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ${optargs}
uenvcmd=run loadimage; run loadfdt; run mmcboot
# USB Boot
#usbargs=setenv bootargs console=${console} root=${usbroot} rootfstype=${mmcrootfstype} ${optargs}
#uenvcmd=run loadusbimage; run loadusbfdt; run usbboot

...

Info
iconfalse
title~/linux_v5.410.249

$ sudo cp -v arch/arm64/boot/Image /media/boot

...

Info
iconfalse

$ sudo mkdir -p /media/boot/dtbs

$ sudo cp -v arch/arm64/boot/dts/embedian/<device tree name> /media/boot/dtbs/imx8mqimx8mp-smarc.dtb

All available DTB files are listed in the table below.

DTB File NameDescription
imx8mp-smarc.dtbDevice tree blob for no display configuration.
imx8mp-smarc-hdmi.dtbDevice tree blob for HDMI display configuration.
imx8mp-smarc-lvds.dtbDevice tree blob for LVDS display configuration.
imx8mp-smarc-m7.dtbDevice tree blob for Cortex-M7 co-processor configuration.
Note
iconfalse

The device tree name in your SD card has be to imx8mqimx8mp-smarc.dtb

Install Root File System and Kernel Modules

...