当前位置:网站首页>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 .
边栏推荐
- 删除有序数组中的重复项 II[双指针--多情况统一]
- After 15 years of working on 21 types of hardware, where is Google?
- [bjdctf2020]the mystery of ip|[ciscn2019 southeast China division]web11|ssti injection
- 山西化工园区智能化管控平台建设时间表
- [Verilog quick start of Niuke online question series] ~ bit splitting and operation
- JS ES5也可以创建常量?
- Php7.3 centos7.9 installing sqlserver extensions
- Property or method “approval1“ is not defined on the instance but referenced during render
- Multi terminal collaboration of Huawei accounts to create a better internet life
- Eight basic sorting (detailed explanation)
猜你喜欢
Wechat emoticons are written into the judgment, and the OK and bomb you send may become "testimony in court"
Internet R & D efficiency practice qunar core field Devops landing practice
Niuke.com: minimum cost of climbing stairs
idea必用插件
阿里云盘分享压缩包
Undistorted resize using pil
“推广+搞笑剧情”,如何碰撞出爆款的火花?
RT-Thread 堆区大小设置
BC1.2 PD协议
利用PIL进行不失真的resize
随机推荐
Mathematical modeling for war preparation 33- grey prediction model 2
AVIC UAV technology innovation board is listed: the fist product with a market value of 38.5 billion is pterodactyl UAV
dart:字符串replace相关的方法
Research on helmet wearing detection algorithm
基于51单片机的计件器设计
利用PIL进行不失真的resize
The 25th anniversary of Hong Kong's return to China the Hong Kong Palace Museum officially opened as a new cultural landmark
Etcd教程 — 第八章 Etcd之Compact、Watch和Lease API
9:第三章:电商工程分析:4:【通用模块】;(待写……)
IO流_递归
differential analysis between different groups nichenet for silicosis成功运行!
Halcon knowledge: matrix topic [02]
数据安全合规之后,给风控团队带来了新的问题
聊聊远程办公那些事儿 | 社区征文
Rongsheng biology rushes to the scientific innovation board: it plans to raise 1.25 billion yuan, with an annual revenue of 260million yuan
[wechat applet] basic use of common components (view/scroll-view/wiper, text/rich-text, button/image)
坚果云-在新电脑上同步移动硬盘的文件
Etcd教程 — 第八章 Etcd之Compact、Watch和Lease API
Cmakelists Basics
定时任务删除指定时间的的数据