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


    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

     

  • 相关阅读:
    1003 Emergency (25分)
    1013 Battle Over Cities (25分)
    1009 Product of Polynomials (25分)
    一元多项式的乘积与和(C++)
    1015 Reversible Primes (20分)
    list()函数对原来类型已经是列表的不会在添加[]
    全局变量把值固定
    python中None与Null的区别
    基础算法之排序
    列表和字符串的方法返回一个新的对象;直接加入到原对象中
  • 原文地址:https://www.cnblogs.com/lagujw/p/3662734.html
Copyright © 2020-2023  润新知