Detailed steps for uboot clipping
1.uboot preparation before cutting
Before uboot cutting, we need to prepare the uboot source code of the corresponding board, uboot cross-compilation tool, uboot compilation instructions document and uboot image burning document.
It is recommended to make sure that the image generated by the original uboot compilation can run normally on the board before uboot clipping.
2.uboot cut 2.1to get the configuration file of the corresponding board.
Uboot is mainly through the corresponding board configuration file to add and delete macros to achieve cutting. So we first need to find the configuration file of the corresponding board. You can find the corresponding card configuration file through the CFG file in the uboot root directory.
Take AM4378 as an example, find the CFG file in the uboot-2013.10 root directory, as shown in figure 2.1.
Figure 2.1 CFG file
In the CFG file, get the profile name by corresponding to the card model. Take AM43XX as an example, as shown in figure 2.2 in the CFG file.
Figure 2.2 profile name
If the card model corresponds to multiple configuration files, you need to refer to the uboot compilation documentation and select the configuration file corresponding to the compilation option, as shown in figure 2.3.
Figure 2.3 configuration options
After getting the name of the configuration file, go to the uboot/include/configs/ directory and find the configuration file. Take AM4378 as an example, find the corresponding configuration file rico_board according to the compilation option myir_ricoboard, as shown in figure 2.4.
Figure 2.4 profile
2.2 modify the board configuration file
Add and tailor uboot functionality by adding and removing macro definitions in the configuration file. Taking AM4378 as an example, we remove the PING function and verify it.
Find the PING feature macro in the rico_board configuration file and comment it, as shown in figure 2.5.
Figure 2.5 configuring macros
Save the configuration file, compile the modified uboot source code, and then burn the generated image file to the board to run through the specified burning tool.