为 ARM 交叉编译 OpenSSH [英] Cross Compile OpenSSH for ARM

查看:31
本文介绍了为 ARM 交叉编译 OpenSSH的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道我如何为 ARM 交叉编译 OpenSSH?这就是我所做的:

Does anybody know how I can cross compile OpenSSH for ARM? This is what I have done:

首先,我下载了 Zlib 源代码,将其解压缩、构建并使用以下命令行安装:

First I've downloaded Zlib source code, untarred it, built it and installed it using the following command lines:

   # ./configure --prefix=/usr/local/cross/arm

   # make 

   # make install

但是当我尝试为 ARM 目标板编译 OpenSSH 时,它在 ./configure 过程中给出错误zlib missing":

But then when I try to compile OpenSSH for the ARM target board, it gives the error "zlib missing" during the ./configure process:

  # sudo LDFLAGS=-L/usr/local/cross/arm/lib CC=arm-none-linux-gnueabi-gcc PATH=$PATH:/home/arishop/arm-tool-chain/arm-fsl-linux-gnueabi/bin/ ./configure --host=arm-linux --with-zlib=/usr/local/cross/arm/ --prefix=/usr/local/cross/arm/openssh

推荐答案

为了交叉编译 openSHH for ARM(在我的例子中是 mini2440),我做了以下事情:

To cross compile openSHH for ARM (in my case a mini2440) I did following:

安装 arm 交叉编译器 -(例如.什么是 arm-linux-gcc 以及如何在 ubuntu 中安装它)

Install arm cross compiler - (eg. what is arm-linux-gcc and how to install this in ubuntu)

下载:

  • Zlib
  • OpenSSL
  • OpenSSH

构建 Zlib:

cd zlib-1.2.7
CC=arm-linux-gnueabi-gcc
./configure --prefix=$HOME/zlibArm
make 
make install

构建 OpenSSL:

Build OpenSSL:

export cross=arm-linux-gnueabi-
cd openssl-1.0.1c
./Configure dist --prefix=$HOME/opensslArm
make CC="${cross}gcc" AR="${cross}ar r" RANLIB="${cross}ranlib"
make install

构建 OpenSSH:

Build OpenSSH:

./configure --host=arm-linux --with-libs --with-zlib=$HOME/zlibArm --with-ssl-dir=$HOME/opensslArm --disable-etc-default-login CC=gcc-arm-linux-gnueabi-gcc AR=gcc-arm-linux-gnueabi-ar
make

更多信息请访问 http://code.google.com/p/openssh4mini2440/wiki/HowTo,下载源码并阅读build.sh"

More info at http://code.google.com/p/openssh4mini2440/wiki/HowTo, download source and read "build.sh"

这篇关于为 ARM 交叉编译 OpenSSH的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆