Cross compile with sftp-server to ARM

zlib

  1. tar xvf zlib-1.2.11.tar.xz
  2. cd zlib-1.2.11/
  3. ./configure --prefix=/root/Downloads/sftp-server/rootfs
  4.  
  5. [root@localhost zlib-1.2.11]# diff Makefile Makefile_bak 
  6. 19c19
  7. < CC=arm-linux-gnueabihf-gcc
  8. ---
  9. > CC=gcc
  10. 30,31c30,31
  11. < LDSHARED=arm-linux-gnueabihf-gcc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map
  12. < CPP=arm-linux-gnueabihf-gcc -E
  13. ---
  14. > LDSHARED=gcc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map
  15. > CPP=gcc -E
  16. 39c39
  17. < AR=arm-linux-gnueabihf-ar
  18. ---
  19. > AR=ar
  20. 41c41
  21. < RANLIB=arm-linux-gnueabihf-ranlib
  22. ---
  23. > RANLIB=ranlib
  24.  
  25. make
  26. make install

openssh

  1. tar xzf openssh-6.9p1.tar.gz 
  2. cd openssh-6.9p1/
  3. ./configure --prefix= --host=arm-linux-gnueabihf --sysconfdir=/etc --with-zlib=/root/Downloads/sftp-server/rootfs
  4. make sftp-server
  5.  
  6. [root@localhost openssh-6.9p1]# file sftp-server
  7. sftp-server: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 3.2.0, BuildID[sha1]=3f3bb0178b0e2ff2e27553e4754bd58d78dffd4d, not stripped
Posted in ARM

Leave a Reply

Your email address will not be published. Required fields are marked *