【OpenWrt】如何单独编译packages软件包

官网说明:https://downloads.openwrt.org/kamikaze/docs/openwrt.html

2.1.5 Troubleshooting

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
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
make package/<name>/install V=99
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.
Other useful targets include:

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

查看原文:http://www.boyemaker.com/2016/09/08/%e3%80%90openwrt%e3%80%91%e5%a6%82%e4%bd%95%e5%8d%95%e7%8b%ac%e7%bc%96%e8%af%91packages%e8%bd%af%e4%bb%b6%e5%8c%85/

  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
OpenWrt 是一个针对路由器和嵌入式设备的开源固件项目,它提供了额外的功能和自定义选项,让网络设备具有更强的灵活性和可扩展性。如果你想要为特定的硬件单独编译 OpenWrt,你可以按照以下步骤操作: 1. **选择合适的版本和平台**:首先,访问 OpenWrt 官网 (<https://openwrt.org/>),确定你的设备支持的版本,并下载适合的 buildroot 或者 LuCI 配置文件。 2. **获取编译环境**:在你的开发机器上安装必要的编译工具,如 `make`、Git 和交叉编译工具链(取决于你的目标硬件架构)。 3. **克隆仓库**:使用 Git,克隆 OpenWrt 的源代码仓库到本地: ``` git clone https://github.com/openwrt/openwrt.git ``` 4. **配置构建**:进入 OpenWrt 根目录,根据你的需求修改 `Makefile.config` 或选择相应的配置文件。这可能涉及到选择内核版本、模块、第三方软件等。 5. **开始编译**:运行 `make menuconfig` 或 `make defconfig` 进行配置,然后执行 `make` 开始编译过程。这个过程可能会花费一些时间,取决于你的硬件性能和网络连接速度。 6. **分区和安装**:编译完成后,通常会生成一个固件文件。使用 TFTP、SSH 或其他方法将固件烧录到你的路由器的内部存储或通过网络更新。 7. **测试与调试**:安装完成后,重启路由器并检查新固件是否正常工作,如有必要,可以使用网络管理工具(如 Telnet 或 Web 界面)进行调试。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值