回答

收藏

各种openwrt默认配置文件所在目录

其他 其他 3769 人阅读 | 0 人回复 | 2017-07-21

各种openwrt默认配置文件所在目录

                                                                                                                                         本文系转载,原文作者wwwx0715
openwrt版本为15.05.1,以mt7620为例,其他类似。

1.wifi的默认开启方式、ssid、加密方式等配置
package/kernel/mac80211/files/lib/wifi/mac80211.sh

2.硬件资源的配置(usb、gpio、flash等),即dts
target/linux/ramips/dts/下文件

3.镜像生成方式控制
target/linux/ramips/image/Makefile

4.board检测配置脚本(对升级有影响)
target/linux/ramips/base-files/lib/ramips.sh匹配/proc/cpuinfo中字段设置board名字

5.升级镜像检查脚本
target/linux/ramips/base-files/lib/upgrade/platform.sh根据board名字来检测镜像中magic是否匹配

6.status_led设置
target/linux/ramips/base-files/etc/diag.sh根据board名字设置status_led为在dts中定义的gpio

7.usb_led、wifi_led设置
target/linux/ramips/base-files/etc/board.d/01_leds根据board名字设置led为在dts中定义的gpio

8.以太网网络配置(lan/wan配置)
target/linux/ramips/base-files/etc/board.d/02_network设置switch的port vlan,及lan、wan端口的配置,lan、wan的mac地址配置

9.uboot-evntools    分区设置
package/boot/uboot-envtools/files/ramips根据board名字设置uboot env分区所在的mtd及大小,之后在系统中可以通过fw_printenv、fw_setenv来查看或设置uboot env中的变量

分享到:
回复

使用道具 举报

您需要登录后才可以回帖 注册/登录

本版积分规则

关闭

站长推荐上一条 /3 下一条