1. Prepare materialsYou can prepare the corresponding materials according to your needs: Development environment: VMware Operating system: Ubuntu Development version: PaiTu i2S-6UB 2. Download the Linux kernel fileFriends who have downloaded UBoot files before should know that there is a corresponding file in the information of each development version. If you don’t have it, you can ask the store where you bought the development version. After downloading, copy the file to the Linux system and decompress it. The directory after decompression is as shown in the figure below: Note: You must compile in the current path when compiling. 3. Compilation1. Clean up project
2. Set the default configuration file
After the compilation is complete, ".config" will be generated, as shown below: Note: The default configuration file of PaiTu is "i2som_imx6_defconfig". The default configuration files of different manufacturers are different. You can check them according to the corresponding documents. As described on the Paitu official website, as shown in the figure below 3. Compile and generate kernrl file
4. Compile and generate .dtb file
Note: At this point the compilation of the kernel and device tree is complete. If you are careful, you will find out why my command is longer. "ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-" is used in each instruction to set the compiler as a cross compiler. To make the compilation instructions more concise, you can add the configuration of ARCH and CROSS_COMPILE in the Makefile file. In the future, you can omit the "ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-" part in the command when compiling, as shown in the following figure: 5. Generate file path zImage: in the /arch/arm/boot/ directory dtb: in the /arch/arm/boot/dts directory 4. Burn zImage and .dtb files through TFTp1. Put the zImage and .dtb files into the tftp server 2. Enter the command line of the development version of UBoot and configure the TFTP service address
3. Download the zImage file
4. Download the .dtb file
5. Start loading zImage and dtb files
6. Verify success After the burning is completed, the compilation time will be printed when the kernel starts. If the time is correct, it means it is successful. The startup information is shown in the figure below: 5. Frequently Asked Questions1. The errors that may occur when compiling and generating zImage are shown in the figure below: This error is mainly because the development environment does not have the 'lzop' tool installed. You only need to install it and recompile it.
2. The startup is stuck at "Starting kernel ...", as shown below: I don't know if there is a problem with the development I have or what, but as long as the compilation is correct, there will generally be no configuration errors if you change other files, so if you encounter this situation, just try again a few more times. 3. The system can be started as shown in the picture. The development version of PaiTu can also be updated by replacing files. After entering the development version of the system, follow the steps below.
The official tutorial is shown below: 4. After starting, you will find that it cannot start normally. This is because there is no root file. The above is the detailed content of analyzing the compilation and burning of the Linux kernel and device tree. For more information about the compilation and burning of the Linux kernel and device tree, please pay attention to other related articles on 123WORDPRESS.COM! You may also be interested in:
|
<<: How to design a web page? How to create a web page?
Table of contents 1. Constructor and instantiatio...
Recently, I need to package the project for membe...
Table of contents 1. Original demand 2. Solution ...
What are the lifecycle functions of React compone...
Method 1: Submit via the submit button <!DOCTY...
Configure tomcat 1. Click run configuration 2. Se...
1. Download MySQL Workbench Workbench is a graphi...
Installation path: /application/mysql-5.5.56 1. P...
It is troublesome to install the db2 database dir...
Background: A long time ago (2017.6.5, the articl...
This tutorial shares the process of manually inst...
This article shares the installation tutorial of ...
Table of contents 1. Overview 2. Download the Ngi...
Recently, when I was working on a conference heal...
Web design, according to personal preferences and ...