码迷,mamicode.com
首页 > 其他好文 > 详细

OpenWrt 安装sshpass方法

时间:2014-10-30 15:18:44      阅读:230      评论:0      收藏:0      [点我收藏+]

标签:des   style   blog   http   io   ar   for   sp   文件   

自己先整个SDK吧,不明的可以再openwrt源码目录直接make menuconfig 看看有没有SDK这个东西,选择了编译。

下面是这样的:

1. 下载sshpass源码

wget http://sourceforge.net/projects/sshpass/files/sshpass/1.05/sshpass-1.05.tar.gz

2. 新建目录package/sshpass/src

3. 把下载下来的源码放到相应目录。

4. 在新建Makefile文件package/sshpass/Makefile

<span style="font-size:14px;">include $(TOPDIR)/rules.mk
#Name and release number of this package
PKG_NAME:=sshpass
PKG_RELEASE:=1.5

PKG_BUILD_DIR :=$(BUILD_DIR)/$(PKG_NAME)

include $(INCLUDE_DIR)/package.mk

define Package/sshpass
        SECTION:=utils
        CATEGORY:=Utilities
        TITLE:=sshpass
endef

define Package/sshpass/description
        Sshpass is a tool for non-interactivly performing password authentication with SSH's
endef

#Specify what needs to be done to prepare for building the package.
define Build/Prepare
        mkdir -p $(PKG_BUILD_DIR)
        $(CP) ./src/* $(PKG_BUILD_DIR)/
endef

#Specify where and how to install the program.
define Package/sshpass/install
        $(INSTALL_DIR) $(1)/bin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/sshpass $(1)/bin/
endef

#This line executes the necessary commands to compile our program.
$(eval $(call BuildPackage,sshpass))
</span>

5. make V=s 这样就得到了梦寐以求的sshpass了。

OpenWrt 安装sshpass方法

标签:des   style   blog   http   io   ar   for   sp   文件   

原文地址:http://blog.csdn.net/qianguozheng/article/details/40620171

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!