8,460
个编辑
更改
→编译OpenWRT源码
<li><p>首先安装下面这些依赖包(目前仅测试了在Ubuntu20.04上编译需要安装下列依赖包,如果在其他版本的系统上编译,请根据出错信息自行安装依赖包)</p>
<ol style="list-style-type: lower-alpha;">
<li>方法1:使用脚本安装依赖包的命令如下所示:</li></ol></li></ol>{| class="wikitable" style="width:800px;" |-|
test@test:~/openwrt$ '''sudo ./install_dep.sh'''
|}</ol>
<ol start="2" style="list-style-type: lower-alpha;">
<li>方法2:直接使用下面的命令安装依赖包</li></ol>{| class="wikitable" style="width:800px;" |-|
test@test:~/openwrt$ '''sudo apt update'''
'''vim wget xmlto xxd zlib1g-dev'''
|}</ol></li></ol>
<ol start="2" style="list-style-type: decimal;">
<li>然后执行'''./scripts/feeds update -a'''和'''./scripts/feeds install -a'''下载依赖包</li></ol>{| class="wikitable" style="width:800px;" |-|
test@test:~/openwrt$ '''./scripts/feeds update -a'''
test@test:~/openwrt$ '''./scripts/feeds install -a'''
|}</ol>
<ol start="3" style="list-style-type: decimal;">
<li><p>然后选择使用OrangePi 5 Plus的配置文件</p>
<ol style="list-style-type: lower-alpha;">
<li>编译支持TF卡、eMMC、NVMe启动的镜像,选择如下的配置</li></ol></li></ol>{| class="wikitable" style="width:800px;" |-|
test@test:~/openwrt$ '''cp configs/orangepi-5-plus-rk3588_defconfig .config'''
|}</ol>
<ol start="2" style="list-style-type: lower-alpha;">
<li>编译支持SPIFlash启动的镜像,选择如下的配置</li></ol>{| class="wikitable" style="width:800px;" |-|
test@test:~/openwrt$ '''cp configs/orangepi-5-plus-rk3588-spi_defconfig .config'''
|}</ol></li></ol>
<ol start="4" style="list-style-type: decimal;">
<li>然后执行下面的命令使配置生效</li></ol>{| class="wikitable" style="width:800px;" |-|
test@test:~/openwrt$ '''make defconfig'''
|}</ol>
<ol start="5" style="list-style-type: decimal;">
<li>执行下面的命令开始编译openwrt源码</li></ol>{| class="wikitable" style="width:800px;" |-|
test@test:~/openwrt$ '''make V=s'''
|}</ol>
<ol start="6" style="list-style-type: decimal;">
<li>编译完成后,镜像生成所在的路径为:</li></ol>{| class="wikitable" style="width:800px;" |-|
test@test:~/openwrt$ '''tree -L 1 bin/targets/rockchip/armv8/'''
└── version.buildinfo
1 directory, 9 files
|}</ol>
<span id="android-12系统的使用说明"></span>