为openwrt添加新的profile

一、环境
openwrt版本为15.05.1,以添加基于mt7620a硬件为例介绍添加新profile的方法。
二、步骤
1.添加profile
在target/linux/ramips/mt7620/profiles/下添加一个新的profile wifi7620.mk:

#
# Copyright (C) 2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
define Profile/WIFI7620
        NAME:=wifi 7620
endef
define Profile/WIFI7620/Description
        Default package set compatible with WIFI7620
endef
$(eval $(call Profile,WIFI7620))
    记住名字WIFI7620,之后新建dts文件时名字必须为WIFI7620.dts。
2.添加dts
    在target/linux/ramips/dts/添加dts文件WIIF7620.dts,该可以拷贝其他使用mt7620的dts,然后稍作修改即可。
    完成该步骤后,make menuconfong即可在 Target Profile中看到我们新加的profile(当然Target System要选择Ralink RT288x/RT3xxx,Subtarget选择MT7620 based boards)。注意:要是新添加的profile能被看到,需要删除主目录下的tmp目录或使用touch更新target/linux/ramips/Makefile的时间。
3.image build
    做完以上步骤后,还需要在target/linux/ramips/image/Makefile添加相应的条目来编译生成升级文件。
#
# MT7620A Profiles
#
Image/Build/Profile/WIFI7620=$(call BuildFirmware/Default16M/$(1),$(1),wifi7620,WIFI7620)
4.添加board的识别
    target/linux/ramips/base-files/lib/ramips.sh
5.添加upgrade时board的是吧
    target/linux/ramips/base-files/lib/upgrade/platform.sh
6.status LED如果有
    target/linux/ramps/base-files/etc/diag.sh
7.其他LED如wifi、sub如果有
     target/linux/ramps/base-files/etc/board.d/01_leds
8.network针对board的特别设置
    target/linux/ramps/base-files/etc/board.d/02_network
  • 2
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值