Cross Compile OpenSSH for ARM

后端 未结 3 1009
猫巷女王i
猫巷女王i 2020-12-01 02:08

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

First I\'ve downloaded Zlib source code, untarred it, built it and installed it

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-01 02:57

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

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

    Download:

    • Zlib
    • OpenSSL
    • OpenSSH

    Build Zlib:

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

    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
    

    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
    

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

提交回复
热议问题