当前位置:网站首页>使用buildroot学习驱动开发
使用buildroot学习驱动开发
2022-07-15 18:47:00 【juno】
1、什么是buildroot
援引官方的一段话
Buildroot is a simple, efficient and easy-to-use tool to generate
embedded Linux systems through cross-compilation.
2、基本使用方法
当我们从官网下载好buildroot的源码之后,发现里边并没有我们想要的东西(内核源码,
程序的C代码等等,这时候不要慌,我们没有下载错误。按照以下操作之后,我们便可以开始学习
驱动开发了。
3、下载源码
找个你喜欢的位置执行以下命令,如果没有安装,请根据自己的系统安装wget支持
wget https://buildroot.org/downloads/buildroot-2022.02.3.tar.xz && tar xf buildroot-2022.02.3.tar.xz
此时我们就将buildroot的环境解压完成了。
4、生成配置
通过上述操作,如果没有出错,说明已经成功解压了buildroot的源码。接下来执行以
下命令生成我们需要的配置。
make qemu_arm_vexpress_defconfig
如果你系统安装了相关了命令,并且没有提示错误,此时就可以开始编译内核和相关的环境了。
make
注意,上述编译时间的长短和你电脑的配置,和网速相关,如果有遇到软件包无法下载,建
议使用迅雷之类的下载软件,将文件下载到电脑,放保存到dl目录下相对应的目录中再次执行
make
5、启动内核
成功编译完之后会有一如下提示
>>> Executing post-image script board/qemu/post-image.sh
此时执行以下命令就可以启动ARM的虚拟环境了。
./output/images/start-qemu.sh --serial-only
内核源码目录在output/build/linux-5.xx.xx/中。
修改内核配置命令以下命令
make linux-menuconfig
修改完之后,执行以下命令更新内核
make linux-rebuild && make
如果没有出错,此时再次启动虚拟环境,内核就是新的配置了。
用户名root,默认没有密码。
默认使用的是vexpress-v2p-ca9.dts这个设备树文件。可以自行修改实验。修改之后
需执行make相关的命令将新的配置更新到环境中。
边栏推荐
- 【集训DAY3】Delete【模拟】
- [training Day1] maximum benefit [discretization] [greed]
- 上海的这一新数字规划,为 NFT、元宇宙等带来了新的可能性
- What is the execution method of polardb for PostgreSQL's HTAP cross machine parallel query?
- (codeforce631) c.report (monotone stack)
- 【小5聊】C#基础之内置和自定义委托的简单使用
- Day2: language element
- 洞悉数据库迷局,2022金仓创新产品发布会召开
- HybridCLR——划时代的Unity原生C#热更新技术
- 黑龙江“智慧林草”顶层规划方案
猜你喜欢

(手工)【sqli-labs40、41】堆叠注入、盲注

无需训练代码,推理性能提升1.4~7.1倍,业界首个自动模型压缩工具开源!

【Luogu_P4820】 【国家集训队】书堆【数学】【物理】【调和级数】

QT (II) UI control introduction and optional tree control demonstration

(2021牛客多校五)K-King of Range(单调队列/ST表)

(codeforce1699)A&B (构造)

HMS Core图形图像技术展现最新功能和应用场景,加速构建数智生活

(codeforce319)B.Psychos in a Line(单调栈)

【Leetcode二叉树--最大路径和】124.二叉树中的最大路径和

【Renesas RA6M4开发板之两路PWM驱动】
随机推荐
九联科技开发板正式合入OpenHarmony主干
One article understand go integrate CAPTCHA to realize the function of verification code
运行时数据区&方法区(永久代/元空间)&栈帧
【MATLAB项目实战】基于GUI的数字信号处理系统
【集训DAY2】Torch bearer【暴力】【DFS】
MySQL about the installation process of zip installation package
(codeforce631) c.report (monotone stack)
How to clean up your email subscriber list to improve email marketing
【集训DAY3】 Section【贪心】【二分】
Golang优秀开源项目汇总
一文搞懂Go整合captcha实现验证码功能
Day2: language element
6 个超级良心的开源教程!
[in depth study of 4g/5g/6g topic -36]: urllc-7 - in depth interpretation of 3GPP urllc related protocols, specifications and technical principles -1- business scenarios, evolution routes and performa
【集训DAY2】Sculpture【状压DP】
Rendering and cloud rendering: 25% of the production time of a movie is "waiting"
iNFTnews | NFT门票将改变参与活动的方式
在 SQL Server 中查找活动的 SQL 连接
(2021 Niuke multi school V) k-king of range (monotonous queue /st table)
Top ten cases of "enterprise digital transformation"!