您的位置:首页 > 运维架构

openWRT自学---对官方的开发指导文档的解读和理解 记录3:一些常用方法

2014-04-17 15:10 736 查看
1.约定

configuration files follow the convention: <name>.conf

init files follow the convention: <name>.init

patches are numerically prefixed and named related to what they do

2.TroublesShooting

A.If you find your package doesn’t show up in menuconfig, try the following command to see if you get the correct description: TOPDIR=$PWD make -C package/<name> DUMP=1 V=99 --- 此命令敲入后,会针对输入的package,打印出相关信息,并进行编译

比如:TOPDIR=$PWD make -C package/dropbear DUMP=1 V=99,则打印出:

Package: dropbear
Version: 0.52-4
Depends:
Provides:
Section: net
Category: Base system
Title: Small SSH2 client/server
Maintainer: OpenWrt Developers Team <openwrt-devel@openwrt.org>
Source: dropbear-0.52.tar.gz
Type: ipkg
Description: A small SSH2 server/client designed for small memory environments. http://matt.ucc.asn.au/dropbear/ @@

Package: dropbearconvert
Version: 0.52-4
Depends:
Provides:
Section: utils
Category: Utilities
Title: Utility for converting SSH keys
Maintainer: OpenWrt Developers Team <openwrt-devel@openwrt.org>
Source: dropbear-0.52.tar.gz
Type: ipkg
Description: Utility for converting SSH keys http://matt.ucc.asn.au/dropbear/ @@

make:进入目录'/home/hadoop/openwrt/backfire_10.03/package/dropbear'
make: 没有什么可以做的为 `all'。
make:离开目录“/home/hadoop/openwrt/backfire_10.03/package/dropbear”

B.If you’re just having trouble getting your package to compile, there’s a few shortcuts you can take. Instead of waiting for make to get to your package, you can run one of the following:

make package/<name>/clean V=99 --- 单独将对应的package进行clean
make package/<name>/install V=99 --- 单独将对应的package进行install

make package/<name>/prepare V=99
make package/<name>/compile V=99
make package/<name>/configure V=99

C.Another nice trick is that if the source directory under build_dir/<arch> is newer than the package directory, it won’t clobber it by unpacking the sources again. If you were working on a patch you could simply edit the sources under the build_dir/<arch>/<source> directory and run the install command above, when satisfied, copy the patched sources elsewhere and diff them with the unpatched sources. A warning though - if you go modify anything under package/<name> it will remove the old sources and unpack a fresh copy. --- 另外一个不错的技巧是,如果在build_dir/<arch>中的源目录比package目录更新,它不会再次解压缩源文件(即dl目录下的?)。如果你正在处理一个补丁,你可以简单地编辑build_dir/<arch>/<source>目录下的源,然后执行安装命令:make package/<name>/install。那么就可以这样做:在其他地方复制修补来源,并与未打补丁的来源进行修复合并。警告:如果你去包下修改任何/它的<name>则将删除旧的来源和解压一个新的副本。 --- 翻译的对不?等待后面实际检验

D.wiki介绍如何编译的网址,http://wiki.openwrt.org/doc/howto/build

E.wifi介绍如何patch的网址:http://wiki.openwrt.org/doc/devel/patches
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: