Foreword:
The i.MX8M Plus development board has 4 Cortex-A53 cores, running at 1.8GHz; 1 Cortex-M7 core, running at 800MHz; in addition, it also integrates a 2.3 TOPS NPU, which greatly accelerates machine learning reasoning.
The development platform used in the full text is the FS-IMX8MPCA development board (Huaqing Yuanjian imx8mp development board) that cooperates with NXP official, supports Weston, ubuntu20.04, Android11 and other operating systems; also supports Xenomai hard real-time kernel, EtherCAT bus, TSN Time-sensitive network, ROS1.0, ROS2.0 and other industrial and robot applications; can be used in industrial Internet, artificial intelligence, edge computing, multi-screen display and other application directions. Huaqing Foresight R&D Center has compiled a large number of development tutorials and recorded rich video teaching resources for free!
More information about the development board can be obtained by leaving a message below the comment area~~~~~~
Ubuntu 20.04 version
This chapter will introduce how to compile and burn the Ubuntu 20.04 system in Chapter 4 for the development of I.MX8M Plus.
System source code compilation
This section mainly describes how to use the Yocto build system to compile the source code of Ubuntu 20.04.
Create a source directory
⚫ Yocto source code import
First, we create the imx8mp folder in ubuntu "home" to store the imx8mp source code
linux@ubuntu:$ cd ~
linux@ubuntu:$ mkdir imx8mp
Next, import all the imxlinux-gatesgarth.tar.xzxx files in the directory [Huaqing Vision-I.MX8M Plus Development Documentation\Program Source Code\imx-linux-gatesgarth] to the newly created imx8mp directory in the virtual machine. Use the following command to decompress
linux@ubuntu:$ cat imx-linux-gatesgarth* | tar Jxvf -
After decompression, you will get the imx-linux-gatesgarth directory, which contains the following files.
The bsp_source directory under this directory mainly stores the system source code including tf-a, u-boot, kernel, etc.
The linux system development part of the book will focus on it. The sources folder mainly stores configuration files related to Yocto build system and ubuntu 20.04.
Since imx-linux-gatesgarth will depend on many external source packages during compilation, we can
You can download it yourself by compiling the program, or you can use the complete dependency package we provide.
Because the dependent package is large, this part is made into a dependent package image [Huaqing Vision-I.MX8M Plus-ubuntu]
Dependency package] Import all the downloads.tar.xz* files in the ISO file to the imx-linux-gatesgarth source code directory, and decompress them.
linux@ubuntu:$ cd ~/imx8mp/imx-linux-gatesgarth
linux@ubuntu:$ cat downloads.tar.xz* | tar Jxvf -
After the decompression is completed, the downloads directory will be obtained under the imx-yocto-bsp directory.
Ubuntu 20.04 version
The compilation environment of the development board ubuntu20.04 needs to be compiled in the ubuntu18.04 linux distribution, and before compiling, please ensure that the "Yocto Development Environment Construction" development tool mentioned earlier in this document is installed in ubuntu.
5) Switch the current working directory to the imx-linux-gatesgarth folder
linux@ubuntu:$ cd ${HOME}/workdir/imx8mp/imx-linux-gatesgarth
6) Import compilation configuration
linux@ubuntu:$ DISTRO=imx-desktop-xwayland MACHINE= imx8mpairobotdesktop source imxsetup-desktop.sh -b build-ai-robot-desktop
7) If it is the first configuration, you need to agree to some agreements
Then press space to the end of the protocol
Enter y and the interface will be as follows
8) Compile the source code
Compile the ubuntu 20.04 image
linux@ubuntu:$ build imx-image-desktop
Note: When compiling the Ubuntu 20.04 system, make sure that the ubuntu host can connect to the Internet due to the source code involved
More, so compilation will be more time-consuming.
After the compilation is completed, the generated image file is saved in the tmp/deploy/images/imx8mp-ai-robot directory. here
imx-image-desktop-imx8mp-ai-robot.wic.bz2 is the overall burning image.
Ubuntu20.04 burning
Before burning the image, we need to connect the necessary data lines according to the following figure:
Connect the USB data cable, power cable, and debugging serial port according to the above figure (from bottom to top are 5V, M4_TX,
M4_RX, A53_TX, A53_RX, GND). Here we only connect GND, A53_RX, A53_TX three lines.
Before powering on, we also need to press and hold the red programming button on the development board to put the development board into the programming mode.
imx8m plus ubuntu20.04 supports emmc startup. Before programming, make sure that the uuu tool can connect to the development board normally.
Export the "ubuntu image" compiled in the previous section "ubuntu20.04 compilation" to the Windows host for burning.
If you have not compiled ubuntu20.04, you can use our [Huaqing Vision-I.MX8M Plus Development Documentation\System Image
\imx8mp-ai-car-ubuntu20.04] directory to burn the image file.
This file contains boot images, rootfs and other images, and we can use different commands to burn related image files.
Before burning, you need to open the cmd window first, and switch the working command to this directory for burning.
⚫ eMMC burning
When using the uuu tool to burn the image, you can use the following command to burn the Weston image.
dos@windows:$uuu -b emmc_all .\imx-boot-imx8mp-ai-robot-sd.bin-flash_ddr4_evk .\im
x-image-desktop-imx8mp-ai-robot.wic.bz2
The burning is successful as shown in the figure below
After the burning is completed, completely power off the development board and restart it. The default account and password of ubuntu are both "user"