当前位置: 首页 > news >正文

编译OpenWrt步骤

实验平台搭建

硬件平台:hilink-7628n核心板

宿主机系统:ubuntu20.04 server

宿主机安装所需工具:

binutils bzip2 diff find flex gawk gcc-6+ getopt grep install libc-dev libz-dev
make4.1+ perl python3.7+ rsync subversion unzip which

官方安装步骤:https://github.com/openwrt/openwrt

镜像下载工具:TFTPD64 v4.64

镜像下载途径:LuCI Web或在U-Boot中使用TFTP

常规下载release版本压缩包安装

任务:将openwrt23.05.5系统装入hilink-7628n主板

openwrt源码链接:

https://github.com/openwrt/openwrt/archive/refs/tags/v23.05.5.zip

编译步骤(在宿主机上操作):

1. mkdir openwrt

2. wget https://github.com/openwrt/openwrt/archive/refs/tags/v23.05.5.zip

3. unzip openwrt-23.05.5.zip

4. cd openwrt-23.05.5

5. ./scripts/feeds update -a

6. ./scripts/feeds install -a

7. make menuconfig

注意:将老版本系统源码根目录下的.config文件复制到新系统源码目录下,可以省去make menuconfig步骤。

8. make

生成的镜像路径:openwrt-23.05.5/bin/targets/ramips/mt76x8/openwrt-ramips-mt76x8-hilink_hlk-7628n-squashfs-sysupgrade.bin

git clone安装

任务:将main branch下的系统装入hilink-7628n主板

注意:main分支下为snapshoot版本(开发版-非稳定版),随着时间的推移opkg安装软件会出现不兼容问题。

编译步骤:

1. git clone https://github.com/openwrt/openwrt.git

注意:默认就在main分支

2. cd openwrt

3. ./scripts/feeds update -a

4. ./scripts/feeds install -a

5. make menuconfig

注意:将老版本系统源码根目录下的.config文件复制到新系统源码目录下,可以省去make menuconfig步骤。

6. make

生成的镜像路径:openwrt/bin/targets/ramips/mt76x8/openwrt-ramips-mt76x8-hilink_hlk-7628n-squashfs-sysupgrade.bin

git clone安装(指定tag)

任务:将v23.05.5 tag下的系统装入hilink-7628n主板。假如项目是以前clone的,并且用的是main  branch还对某些源码文件做了修改或新增。

注意:tag下面的版本为稳定版本,随着时间的推移opkg安装软件不会出现不兼容问题。

编译步骤:

1. cd openwrt

2. git fetch origin

同步代码仓库

3. git stash

将你的本地更改保存到一个栈中,并恢复工作目录的干净状态。

4. git checkout tags/v23.05.5

5. git stash pop

恢复本地更改

6. ./scripts/feeds update -a

7. ./scripts/feeds install -a

8. make menuconfig

9. make -j6

-j后面的数字:cpu核心数 * 1.5

http://www.lryc.cn/news/489221.html

相关文章:

  • Linux:confluence8.5.9的部署(下载+安装+pojie)离线部署全流程 遇到的问题
  • ✅✅✅【Vue.js】sd.js基于jQuery Ajax最新原生完整版for凯哥API版本
  • axios 请求跨域问题
  • 什么是 Faiss?
  • 24.UE5枚举,怪物分类,龙卷风技能
  • 什麼是ISP提供的公共IP地址?
  • git操作总结
  • CompressAI安装!!!
  • 豆包MarsCode算法题:最小周长巧克力板组合
  • vue项目添加骨架屏vue-skeleton-webpack-plugin,通过app.vue添加骨架屏,解决衔接空白问题
  • 测试实项中的偶必现难测bug之模糊匹配逻辑
  • Vue:后端返回二进制文件,前端如何实现浏览器自动下载?
  • Android解压zip文件到指定目录
  • 主要用于图像的颜色提取、替换以及区域修改
  • gbase8c之运维操作
  • 云原生学习
  • 深入解析 Vue 3 中的 defineExpose
  • Docker3:docker基础1
  • 【UGUI】背包的交互01(道具信息跟随鼠标+道具信息面板显示)
  • ubuntu20.04中编译安装gcc 9.2.0
  • ss 命令的基本用法
  • Leetcode198. 打家劫舍(HOT100)
  • kafka基础
  • STM32CUBEIDE FreeRTOS操作教程(九):eventgroup事件标志组
  • Python设计模式详解之2 —— 工厂模式
  • 【Zookeeper】二、主从应用(master-worker架构)
  • Diffusion【2】:VAE
  • 高级java每日一道面试题-2024年11月19日-基本篇-获取一个类Class对象的方式有哪些?
  • xilinx xapp1171学习笔记
  • 一次需升级系统的wxpython安装(macOS M1)