当前位置:网站首页>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/边栏推荐
- Leetcode-1: sum of two numbers
- JS operation DOM node
- 携手SiFive,格兰仕进军半导体领域!两款自研芯片曝光
- Modify spark to support remote access to OSS files
- The risk of multithreading -- thread safety
- JS uses for in and for of to simplify ordinary for loops
- [sword finger offer] interview question 39: numbers that appear more than half of the time in the array
- Implement custom spark optimization rules
- Multimap case
- 数组名是首元素地址吗?
猜你喜欢

MySQL表数据的增删查改

Voice live broadcast system -- a necessary means to improve the security of cloud storage

C语言:数据的存储

UDP message structure and precautions

线程间等待与唤醒机制、单例模式、阻塞队列、定时器
![[sword finger offer] interview question 41: median in data flow - large and small heap implementation](/img/c3/7caf008b3bd4d32a00b74f2c508c65.png)
[sword finger offer] interview question 41: median in data flow - large and small heap implementation

leetcode25题:K 个一组翻转链表——链表困难题目详解

Spark 3.0 DPP implementation logic

Learn parquet file format

CAS compares the knowledge exchanged, ABA problems, and the process of lock upgrading
随机推荐
C语言:字符串函数与内存函数
Is the array name the address of the first element?
[sword finger offer] interview question 56-i: the number of numbers in the array I
C: What is the return value (revolution) in a function
Causes and solutions of deadlock in threads
多线程带来的的风险——线程安全
js操作dom节点
Interview focus - TCP protocol of transport layer
It is said that the US government will issue sales licenses to Huawei to some US enterprises!
Zhaoqi scientific innovation and entrepreneurship competition planning and undertaking organization, mass entrepreneurship and innovation platform, project landing and docking
Is low code the future of development? On low code platform
drf使用:get请求获取数据(小例子)
Sword finger offer 51. reverse pairs in the array
NPM install error unable to access
makefile 中指定程序运行时加载的库文件路径
Breaking through soft and hard barriers, Xilinx releases Vitis unified software platform for developers
Spark 3.0 DPP implementation logic
表格插入行内公式后,单元格失去焦点
接连取消安富利/文晔/世平代理权,TI到底打的什么算盘?
After the table is inserted into an in row formula, the cell loses focus