首页
/ OpenWrt 配置项目教程

OpenWrt 配置项目教程

2025-04-15 05:07:35作者:龚格成
.config
# # Automatically generated file; DO NOT EDIT. # OpenWrt Configuration # CONFIG_MODULES=y CONFIG_HAVE_DOT_CONFIG=y # CONFIG_TARGET_sunxi is not set # CONFIG_TARGET_apm821xx is not set # CONFIG_TARGET_ath25 is not set CONFIG_TARGET_ar71xx=y # CONFIG_TARGET_ath79 is not set # CONFIG_TARGET_bcm27xx is not set # CONFIG_TARGET_bcm53xx is not set # CONFIG_TARGET_brcm47xx is not set # CONFIG_TARGET_brcm63xx is not set # CONFIG_TARGET_cns3xxx is not set # CONFIG_TARGET_octeon is not set # CONFIG_TARGET_gemini is not set # CONFIG_TARGET_mpc85xx is not set # CONFIG_TARGET_imx6 is not set # CONFIG_TARGET_mxs is not set # CONFIG_TARGET_ixp4xx is not set # CONFIG_TARGET_lantiq is not set # CONFIG_TARGET_malta is not set # CONFIG_TARGET_pistachio is not set # CONFIG_TARGET_mvebu is not set # CONFIG_TARGET_kirkwood is not set # CONFIG_TARGET_mediatek is not set # CONFIG_TARGET_ramips is not set # CONFIG_TARGET_at91 is not set # CONFIG_TARGET_rb532 is not set # CONFIG_TARGET_tegra is not set # CONFIG_TARGET_layerscape is not set # CONFIG_TARGET_octeontx is not set # CONFIG_TARGET_oxnas is not set # CONFIG_TARGET_armvirt is not set # CONFIG_TARGET_ipq40xx is not set # CONFIG_TARGET_ipq806x is not set # CONFIG_TARGET_ipq807x is not set # CONFIG_TARGET_samsung is not set # CONFIG_TARGET_arc770 is not set # CONFIG_TARGET_archs38 is not set # CONFIG_TARGET_ar7 is not set # CONFIG_TARGET_omap is not set # CONFIG_TARGET_uml is not set # CONFIG_TARGET_zynq is not set # CONFIG_TARGET_x86 is not set CONFIG_TARGET_ar71xx_generic=y # CONFIG_TARGET_ar71xx_tiny is not set # CONFIG_TARGET_ar71xx_nand is not set # CONFIG_TARGET_ar71xx_mikrotik is not set # CONFIG_TARGET_MULTI_PROFILE is not set # CONFIG_TARGET_ar71xx_generic_Default is not set # CONFIG_TARGET_ar71xx_generic_DEVICE_carambola2 is not set # CONFIG_TARGET_ar71xx_generic_DEVICE_lima is not set # CONFIG_TARGET_ar71xx_generic_DEVICE_ALFAAP120C is not set # CONFIG_TARGET_ar71xx_generic_DEVICE_ap121f is not set # CONFIG_TARGET_ar71xx_ge...

1. 项目的目录结构及介绍

本项目是基于 Lean 的 OpenWrt 源代码构建的配置项目。项目目录结构如下:

.config/
├── .github/
│   └── workflows/
│       └── build.yml  # GitHub Actions 自动构建配置文件
├── LICENSE           # 项目许可证文件
├── README.md         # 项目说明文件
├── diy-part1.sh       # DIY 脚本第一部分,用于自定义编译选项
├── diy-part2.sh       # DIY 脚本第二部分,用于自定义固件包
└── build.log         # 构建日志文件
  • .github/workflows/build.yml:GitHub Actions 的配置文件,用于自动化构建过程。
  • LICENSE:项目的许可证文件,本项目遵循 MIT 许可。
  • README.md:项目的说明文件,介绍了项目的使用方法和相关说明。
  • diy-part1.sh:自定义编译选项的脚本,用户可以根据需要修改编译选项。
  • diy-part2.sh:自定义固件包的脚本,用户可以根据需要添加或删除固件包。
  • build.log:构建日志文件,记录构建过程中的详细信息。

2. 项目的启动文件介绍

项目的启动主要是通过 GitHub Actions 自动化构建。以下是启动文件的简要介绍:

  • build.yml:GitHub Actions 的配置文件,定义了构建过程的步骤,包括安装依赖、配置编译环境、编译固件等。

.github/workflows/build.yml 文件中,你可以看到以下内容:

name: Build OpenWrt

on:
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      # 其他构建步骤...

这段代码定义了一个 GitHub Actions 工作流,当用户手动触发 workflow_dispatch 事件时,工作流开始执行。它会在最新的 Ubuntu 环境中运行,首先检出代码,然后执行后续的构建步骤。

3. 项目的配置文件介绍

项目的配置文件主要是 .config 文件,它是 OpenWrt 编译系统的基础配置文件。以下是配置文件的简要介绍:

  • .config:OpenWrt 的配置文件,包含了编译选项、固件包选择等配置信息。

.config 文件中,你可以看到以下内容:

CONFIG_MODULES=y
CONFIG_HAVE_DOT_CONFIG=y

# 以下为 Target System 的配置,根据实际情况选择
CONFIG_TARGET_ar71xx=y
# CONFIG_TARGET_ath79 is not set
# CONFIG_TARGET_bcm27xx is not set
# CONFIG_TARGET_bcm53xx is not set

# 其他配置...

这个文件定义了编译系统的基础配置,例如是否启用模块化编译、目标系统的选择等。用户可以根据自己的需求修改这个文件,添加或删除固件包,以及调整编译选项。

.config
# # Automatically generated file; DO NOT EDIT. # OpenWrt Configuration # CONFIG_MODULES=y CONFIG_HAVE_DOT_CONFIG=y # CONFIG_TARGET_sunxi is not set # CONFIG_TARGET_apm821xx is not set # CONFIG_TARGET_ath25 is not set CONFIG_TARGET_ar71xx=y # CONFIG_TARGET_ath79 is not set # CONFIG_TARGET_bcm27xx is not set # CONFIG_TARGET_bcm53xx is not set # CONFIG_TARGET_brcm47xx is not set # CONFIG_TARGET_brcm63xx is not set # CONFIG_TARGET_cns3xxx is not set # CONFIG_TARGET_octeon is not set # CONFIG_TARGET_gemini is not set # CONFIG_TARGET_mpc85xx is not set # CONFIG_TARGET_imx6 is not set # CONFIG_TARGET_mxs is not set # CONFIG_TARGET_ixp4xx is not set # CONFIG_TARGET_lantiq is not set # CONFIG_TARGET_malta is not set # CONFIG_TARGET_pistachio is not set # CONFIG_TARGET_mvebu is not set # CONFIG_TARGET_kirkwood is not set # CONFIG_TARGET_mediatek is not set # CONFIG_TARGET_ramips is not set # CONFIG_TARGET_at91 is not set # CONFIG_TARGET_rb532 is not set # CONFIG_TARGET_tegra is not set # CONFIG_TARGET_layerscape is not set # CONFIG_TARGET_octeontx is not set # CONFIG_TARGET_oxnas is not set # CONFIG_TARGET_armvirt is not set # CONFIG_TARGET_ipq40xx is not set # CONFIG_TARGET_ipq806x is not set # CONFIG_TARGET_ipq807x is not set # CONFIG_TARGET_samsung is not set # CONFIG_TARGET_arc770 is not set # CONFIG_TARGET_archs38 is not set # CONFIG_TARGET_ar7 is not set # CONFIG_TARGET_omap is not set # CONFIG_TARGET_uml is not set # CONFIG_TARGET_zynq is not set # CONFIG_TARGET_x86 is not set CONFIG_TARGET_ar71xx_generic=y # CONFIG_TARGET_ar71xx_tiny is not set # CONFIG_TARGET_ar71xx_nand is not set # CONFIG_TARGET_ar71xx_mikrotik is not set # CONFIG_TARGET_MULTI_PROFILE is not set # CONFIG_TARGET_ar71xx_generic_Default is not set # CONFIG_TARGET_ar71xx_generic_DEVICE_carambola2 is not set # CONFIG_TARGET_ar71xx_generic_DEVICE_lima is not set # CONFIG_TARGET_ar71xx_generic_DEVICE_ALFAAP120C is not set # CONFIG_TARGET_ar71xx_generic_DEVICE_ap121f is not set # CONFIG_TARGET_ar71xx_ge...
登录后查看全文
热门项目推荐
相关项目推荐

项目优选

收起
kernelkernel
deepin linux kernel
C
23
6
docsdocs
OpenHarmony documentation | OpenHarmony开发者文档
Dockerfile
225
2.27 K
flutter_flutterflutter_flutter
暂无简介
Dart
526
116
ohos_react_nativeohos_react_native
React Native鸿蒙化仓库
JavaScript
211
287
nop-entropynop-entropy
Nop Platform 2.0是基于可逆计算理论实现的采用面向语言编程范式的新一代低代码开发平台,包含基于全新原理从零开始研发的GraphQL引擎、ORM引擎、工作流引擎、报表引擎、规则引擎、批处理引引擎等完整设计。nop-entropy是它的后端部分,采用java语言实现,可选择集成Spring框架或者Quarkus框架。中小企业可以免费商用
Java
9
1
frameworksframeworks
openvela 操作系统专为 AIoT 领域量身定制。服务框架:主要包含蓝牙、电话、图形、多媒体、应用框架、安全、系统服务框架。
CMake
795
12
RuoYi-Vue3RuoYi-Vue3
🎉 (RuoYi)官方仓库 基于SpringBoot,Spring Security,JWT,Vue3 & Vite、Element Plus 的前后端分离权限管理系统
Vue
986
583
pytorchpytorch
Ascend Extension for PyTorch
Python
67
97
ops-mathops-math
本项目是CANN提供的数学类基础计算算子库,实现网络在NPU上加速计算。
C++
566
94
GLM-4.6GLM-4.6
GLM-4.6在GLM-4.5基础上全面升级:200K超长上下文窗口支持复杂任务,代码性能大幅提升,前端页面生成更优。推理能力增强且支持工具调用,智能体表现更出色,写作风格更贴合人类偏好。八项公开基准测试显示其全面超越GLM-4.5,比肩DeepSeek-V3.1-Terminus等国内外领先模型。【此简介由AI生成】
Jinja
43
0