<Linux development> -The detailed record of the system transplantation uboot transplantation process (Part 1)

<Linux development> -The detailed record of the system transplantation uboot transplantation process (Part 1)

Preface: This series of articles mainly explains some records of the development process of the Punctual Atom Linux development board;
this chapter mainly explains the porting of the uboot officially provided by NXP to the Punctual Atomic Linux development board;
generally, the design and development of a Linux development board will Refer to the demo board of the original chip manufacturer, and the original chip manufacturer will provide a complete set of information for the demo board. Therefore, when using a development board designed by a third party or a circuit board made by yourself, you will refer to the design of the remote demo board of the chip; in terms of software, the tools supporting the demo board will also be transplanted. After all, the data provided by the original chip manufacturer matches compatibility. Definitely better than the others.
This part mainly introduces, related design software, and NXP original uboot compilation test.

<Linux development> -The detailed record of the system transplantation uboot transplantation process (Part II)

The data involved in the following development process can be obtained from the author if necessary.
Contact QQ: 759521350

1. Preliminary preparations for uboot transplantation
Note: For the following preparations, refer to the Punctual Atomic Linux Development Manual
1. Install a virtual machine and ubuntu; (usually, it is convenient to use with the window environment)
2. Install cross-compilation tools; (for compilation)
3. Install FileZillaClient; (convenient to transfer files with window)
4. Install vscode; (convenient for some modifications of uboot source code)
5. Punctual atomic Linux development board; (or IMX6ULL same series of development boards. The general operation process is similar, after all NXP's)

2. NXP original Uboot test
Note: First use the original NXP uboot to test it directly, generally it can run normally. The main difference between different development boards with the same chip is that some configuration parameters are different, including part of the driver selection, name, storage type selection and so on.
1. Transfer the original uboot of NXP to Ubuntu through FileZillaClient, and then decompress it;
decompression command: tar -vxjf file name
insert image description here
Command: tar -vxjf uboot-imx-rel_imx_4.1.15_2.1.0_ga.tar.bz2
insert image description here
Note: original factory The source of uboot use is provided by the supporting materials of the Atomic Linux development board.

2. Create mx6ull_water.sh in the directory obtained after decompression, as shown in the figure below:
Use the command: touch mx6ull_water.sh
insert image description here
3. Use vscode to open the uboot-imx-rel_imx_4.1.15_2.1.0_ga folder and add it to mx6ull_water.sh The following command is added as shown below:

#!/bin/bash
#清理工程
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- distclean
#执行配置uboot
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- mx6ull_14x14_evk_emmc_defconfig
#执行编译
make V=1 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j16

#注1: ARCH=arm  设置目标为arm架构
#注2: CROSS_COMPILE=arm-linux-gnueabihf-    指定编译工具链前缀
#注3: V=1  用于设置编译过程的信息输出级别
#注4-j16 使用16核编译uboot

4. Run mx6ull_water.sh;
use the command to give the file execution permission: chmod 777 mx6ull_water.h;
use the command to run the file: ./mx6ull_water.sh After
insert image description here
the compilation is completed, the following figure shows:
insert image description here

5. Program u-boot.bin
Use the SD card programming tool "imxdownload" provided by Punctual Atomic to download u-boot.bin to SD;
programming command: ./imxdownload u-boot.bin /dev/sdc
Note: 1) imxdownload is placed in the root directory of the decompressed file; you can find imxdownload by entering any routine in the bare metal routine, and transfer it to the root directory of uboot decompression in Ubuntu through FileZillaClient.
insert image description here
2) Use: chmod 777 imxdownload to give permission
insert image description here
3) /dev/sdc, the sdc in the SD card is the file name of the SD card mounted to ubuntu. When programming, it is recommended to check whether the SD card is successfully mounted, otherwise it may damage the SD card Card;
SD card query command: The following picture shows that there are many sda, sdb, sdc, sde, etc., of which sda/1/2/5 are system disks, and the rest are card readers, because the card reader used by the author is multi-card Bit, so there are multiple, including sdc, sdc1, that is, sdc is the card slot used by the author, and sdc1 is a partition. So the author chose sdc.
insert image description here
Burn into sd card: ./imxdownload u-boot.bin /dev/sdc
insert image description here

6. Run the test
(1) Set the development board to start from the SD card;
insert image description here

(2) Insert the SD card into the development board and open secureCRT;
insert image description here

(3) Press the reset button, you can see the relevant output in the CRT, press the Enter button before the countdown ends, and let the system serial port terminal stay in boot, as shown below:
insert image description here

7. The NXP original uboot test is completed, but it can be seen from the output information that some functions are abnormal, such as network port information, LCD, device name, etc.; this is because the original uboot is supported by the official one The demo board is made, and the author uses the development board of Punctuality Atomic, so there will be some differences in hardware, such as the reset pin of the network chip LAN8720, the size of the LCD and related parameters, etc. The next porting work is for Punctuality Some operations that are modified due to different hardware circuits of the atomic linux development board.

Due to the length of the article, the article is divided into two parts. The first part is mainly based on the established environment. First, test whether the uboot running the original NXP can be used normally, and check the relevant information of the operation. In order to be familiar with the process of compiling, downloading and running, it is convenient for a series of work after transplantation.

<Linux development> -The detailed record of the system transplantation uboot transplantation process (Part II)

This series of articles explains the recording process, all refer to the driver development tutorial provided by Punctual Atom.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324492528&siteId=291194637