mini2440开发板安装ssh

首先确定已经

开发板已与路由器相连,并进行了必要的网络配置,可以ping通本机

1. 下载需要的源码,直接google最新的版本吧

mkdir ~/work/fs ;mkdir -p ~/work/source

下载zlib: zlib-1.2.3.tar.gz

下载ssl :  openssl-0.9.8d.tar.gz

下载ssh : openssh-4.6p1.tar.gz

2.  编译:

cd ~/work/source

(1) 编译zlib :

tar zxvf zlib-1.2.3.tar.gz -C .

cd zlib-1.2.3/

./configure –prefix=/root/work/fs/zlib-1.2.3

修改Makefile :

CC=gcc 改为:

CROSS=/usr/local/arm/4.3.2/bin/arm-linux -   ###这里的4.3.2依据自己的linux内核不同

CC= $ ( CROSS) gcc

LDSHARED= gcc 改为: LDSHARED= $ ( CROSS) gcc

CPP= gcc - E   改为 : CPP= $ ( CROSS) gcc - E

AR= ar rc     改为: AR= $ ( CROSS) ar rc

开始编译: make;

make install

(2)  编译openssl:

tar zxvf openssl- 0. 9. 8d.tar.gz

cd openssl-0.9.8d.tar.gz

. / Configure --prefix= /root/work/fs/openssl- 0. 9. 8d

os/ compiler: /usr/local/arm/4.3.2/bin/arm- linux- gcc

make

make install

(3) 编译openssh:

tar zxvf openssh-4.6p1.tar.gz

cd openssh-4.6p1/

./configure –host=arm-linux –with-libs –with-zlib=/root/work/fs/zlib-1.2.3

-with-ssl-dir=/root/work/fs/openssl-0.9.8d –disable-etc-default-login

CC=/usr/local/arm/4.3.2/bin/arm-linux-gcc AR=/usr/local/arm/4.3.2/bin/arm-linux-ar

make

####不要make install

相关推荐