当前位置:网站首页>Openwrt 新增平台编译
Openwrt 新增平台编译
2022-07-27 14:37:00 【xhoufei2010】
1 说明
本文主要介绍,如何在openwrt系统中,新增一个平台进行编译。如原本的openwrt 包含了adm5120 arc770 ath25 imx6等平台,现在需要新增一个sc9820平台的编译。本文以sc9820平台作为示例说明。
2 开发环境
1、软件环境:ubuntu14.04
2. openwrt版本:openwrt 官方15.05版本SDK开发包(CHAOS CALMER 15.05版本)
3、供应商提供可编译的sc9820 内核包。
4、linux官网的 linux-3.10.65原生内核包。
3 操作步骤
3.1 进入openwrt 的linux开发目录
path1 为openwrt的目录路径
cd /path1/openwrt/target/linux/3.2 随便拷贝一个现成的平台作为sc9820的框架
cp -r imx/ sc98203.3 清空file文件夹和patch文件夹内容
(1)file文件夹为平台的内核包,与原生版本内核包相比,新增的内容。
(2)patch 文件夹,为平台的内核包与原生的内核包相比,文件的差异,是补丁包。
其中由于该版本imx的内核包采用的为linux-4.4版本,文件夹名称为file-4.4 、patches-4.4。
直接清空两个文件夹,并将文件夹该名称。
rm file-4.4/* -rf rm patches-4.4/* -rf 由于sc9820的内核包采用Linxu-3.10.65,故文件夹名称更改。
mv file-4.4/ file-3.10
mv patches-4.4/ patches-3.10
3.4 拷贝内核包的config
3.4.1 将供应商提供的内核包,制作.config
cd /path2/kernel_sc9820path2为自己存放sc9820内核包的路径
cp arch/arm/configs/sp9820w_6c10_defconfig .config
make menuconfig ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
当然,如果之前已经把ARCH 和CROSS_COMPILE 环境变量export出来,则可以不加这两个参数
然后保存退出,此时内核配置已经保存至.config
3.4.2 拷贝config 文件至openwrt目录
cd /path1/openwrt/target/linux/sc9820
cp /path2/kernel_sc9820/.config config-3.10
3.4.3 删除之前多余的config
之前拷贝目录,有config-4.4,此时多余,删除该配置
rm config-4.43.5 修改编译makefile
cd /path1/openwrt/target/linux/
vi Makefile将Makefile的部分内容修改为如下
BOARD:=sc9820
BOARDNAME:=board sc9820
KERNEL_PATCHVER:=3.10.65
3.6 配置系统config
cp configs/imx6ul/imx6ul-prolin2-defconfig .config 如果自己没有单独保存这个imx6ul的配置,则可忽略这步,自己再去配置其他选项。
make menuconfig然后在菜单页面中,选择
Target System 选择为board sc9820
Subtarget 选择为 sc9820_pax
然后在Kernel modules —> 中,把所有的内核模块删除
最后保存退出。
3.7 对内核进行配置
make kernel_menuconfig然后保存退出。
特别注意,一定要执行这一步,不然在编译内核的时候,会提示:
scripts/kconfig/conf --silentoldconfig Kconfig
* * Restart config...
* *这是因为内核初次没有配置的原因,如果执行了make kernel_menuconfig
,则会将配置写入内核中。
对于内核,可以先测试是否可以正常编译
make target/linux/compile V=s3.8 编译固件
make V=s 3.9 保存配置.config
cd configs
mkdir sc98290
cd ../
cp .config configs/sc9820/边栏推荐
- [sword finger offer] interview question 45: arrange the array into the smallest number
- go语言慢速入门——基本内置类型
- 台积电6纳米制程将于明年一季度进入试产
- C language: custom type
- Causes and solutions of deadlock in threads
- 网络设备硬核技术内幕 路由器篇 22
- leetcode25题:K 个一组翻转链表——链表困难题目详解
- [sword finger offer] interview question 53- Ⅱ: missing numbers in 0 ~ n-1 - binary search
- 43亿欧元现金收购欧司朗宣告失败!ams表示将继续收购
- js操作dom节点
猜你喜欢
随机推荐
MySQL表数据的增删查改
JS uses unary operators to simplify string to number conversion
【云享读书会第13期】音频文件的封装格式和编码格式
js操作dom节点
Half find
Spark troubleshooting finishing
【云享读书会第13期】FFmpeg 查看媒体信息和处理音视频文件的常用方法
[TensorBoard] OSError: [Errno 22] Invalid argument处理
JS operation DOM node
Using Lombok results in the absence of parent class attributes in the printed toString
[sword finger offer] interview question 56-i: the number of numbers in the array I
[Yunxiang book club issue 13] coding format of video files
[sword finger offer] interview question 50: the first character that appears only once - hash table lookup
语音直播系统——提升云存储安全性的必要手段
[sword finger offer] interview question 45: arrange the array into the smallest number
First understanding of structure
Binder初始化过程
Under the ban, the Countermeasures of security giants Haikang and Dahua!
Use deconstruction to exchange the values of two variables
初识MySQL数据库








