当前位置:网站首页>Compile - compile for itop4412 development board makefile
Compile - compile for itop4412 development board makefile
2022-06-30 17:04:00 【mucheni】
In front of the introductory video, issue 10 “ Build a compilation environment uboot_linux_Android” in , Only the input is described Make Command to compile the kernel , It doesn't show how it works . This is done when adding drivers to the kernel 3 Work , Include :
1) stay Kconfig Add the new code to the compilation conditions of the project , This part of the experiment 3 It has been introduced ;
2) Add the driver source code to the corresponding directory , This step is easier to understand , In this chapter, we will show you ;
3) In the catalog Makefile Add a compile entry for the new code in the , This part will introduce in this chapter . Video resources :
The supporting video of this section is “ video 04_Makefile compile ”
1 Compiler path settings
In the previous introductory knowledge , It only introduces the directory in which to decompress the compiler , Add a path to the environment variable file , You can compile the kernel , It doesn't explain how they correspond to each other .
As shown in the figure below , Follow the basic tutorial provided earlier , Good configuration Ubuntu Compiler and library files in , Enter the command “make”, You can compile and generate a binary image of the kernel .

As shown in the figure below , Use command “#cd”, Use command “#vim .bashrc” Open environment variable file “.bashrc”.

As shown in the figure below , Go to bottom line , You can see , In the environment variable file, the compiler path is set to
export PATH=$PATH:/usr/local/arm/arm-2009q3/bin

Then use the command “#cd /usr/local/arm/”, Enter the decompression compiler “arm-2009q3.tar.bz2” File directory for

You can see clearly , The path set in the environment variable corresponds to the path of decompression . Back to the kernel source code directory , As shown in the figure below .

As shown in the figure below , Use command “vim Makefile” Open the kernel directory Makefile file .

Through here vim The editor looks for parameters “CROSS_COMPILE”, As shown in the figure below .

You can find the parameters “CROSS_COMPILE”, As shown in the figure below .

Let's look at the parameters again “CROSS_COMPILE” Next line , You can see that there are traces of changes here . It's easy to infer that , It turns out that Samsung uses “4.5.1” Version of compiler , But it doesn't matter , As long as it can be compiled and passed .
As a general rule , The first step after getting the source code , It is necessary to compile the source code first . Set the variables in the figure above “CROSS_COMPILE” And the environment variables and the compiler's actual decompression path . After these three correspond , To ensure that Make After the command , The system can find the compiler .
During the execution of the compile command , Will prompt some mistakes , And then according to the error in the prompt , Check and revise one by one , To add or modify library files . There are advantages and disadvantages in this process , The test is only patience , Not too much skill . Since the missing library files have been written into scripts , In this way, you can compile the following script in the compiler .
In the kernel directory Makefile file , Let me remind you , There is a lot in this document , With the exception of the compiler path variables above, little attention is paid to .
There is another place to learn about , As shown in the figure below , In the first line of the file , You can see the version of the kernel .

边栏推荐
- 编译丨迅为iTOP4412开发板Makefile编译
- BC1.2 PD协议
- TCP socket and TCP connection
- 列表变成向量 列表变向量 list vector
- Home office discussion on the experience of remote assistance to quickly improve efficiency | community essay solicitation
- MC Instruction Decoder
- MySQL8 NDB Cluster安装部署
- After 15 years of working on 21 types of hardware, where is Google?
- 2020 Blue Bridge Cup group B - move bricks - (greedy sorting +01 backpack)
- go-micro教程 — 第一章 快速入门
猜你喜欢

redis淘汰策略

Niuke.com: minimum cost of climbing stairs

Eight basic sorting (detailed explanation)

The meaning of linetypes enumeration values (line_4, line_8, line_aa) in opencv

Home office discussion on the experience of remote assistance to quickly improve efficiency | community essay solicitation

Deep learning - (2) several common loss functions

坚果云-在新电脑上同步移动硬盘的文件

After 15 years of working on 21 types of hardware, where is Google?

Multi terminal collaboration of Huawei accounts to create a better internet life

redis数据结构分析
随机推荐
Internet R & D efficiency practice qunar core field Devops landing practice
Dart: string replace related methods
Niuke: how many different binary search trees are there
八大基本排序(详解)
名单揭晓 | 2021年度中国杰出知识产权服务团队
The meaning of linetypes enumeration values (line_4, line_8, line_aa) in opencv
Design of piece counter based on 51 single chip microcomputer
Simpleitk encountered an ITK only supports orthonormal direction cosines error while reading NII
simpleITK读取nii遇到ITK only supports orthonormal direction cosines的错误
聊聊远程办公那些事儿 | 社区征文
List becomes vector list becomes vector list vector
jspreadsheet/CE JExcel数据字段比给的字段(columns)多会导致空白列的问题解决方案
编译丨迅为STM32P157开发板编译U-Boot源码
HMS Core音频编辑服务3D音频技术,助力打造沉浸式听觉盛宴
STL教程7-set、pair对组和仿函数
IndexSearch
restartProcessIfVisible的流程
Exception class_ Log frame
【微信小程序】小程序的宿主环境
编译丨迅为iTOP4412开发板Makefile编译