(First release) |
(Updated to zlib 1.2.11 & OpenSSH 8.5) |
||
Line 9: | Line 9: | ||
<PRE> | <PRE> | ||
− | wget http://zlib.net/zlib-1.2. | + | wget http://zlib.net/zlib-1.2.11.tar.gz |
− | tar -xzf zlib-1.2. | + | tar -xzf zlib-1.2.11.tar.gz |
− | cd zlib-1.2. | + | cd zlib-1.2.11/ |
./configure --prefix=/home/export/rootfs | ./configure --prefix=/home/export/rootfs | ||
</PRE> | </PRE> | ||
Line 37: | Line 37: | ||
<PRE> | <PRE> | ||
− | wget http://mirror.internode.on.net/pub/OpenBSD/OpenSSH/portable/openssh- | + | wget http://mirror.internode.on.net/pub/OpenBSD/OpenSSH/portable/openssh-8.5p1.tar.gz |
− | tar -xzf openssh- | + | tar -xzf openssh-8.5p1.tar.gz |
− | cd openssh- | + | cd openssh-8.5p1 |
− | ./configure --prefix= --host=arm-linux-gnueabi --sysconfdir=/etc --with-zlib=/ | + | ./configure --prefix= --host=arm-linux-gnueabi --sysconfdir=/etc --with-zlib=../zlib-1.2.11 --without-openssl |
make sftp-server | make sftp-server | ||
</PRE> | </PRE> | ||
Now copy sftp-server to /usr/libexec/ on your target system. | Now copy sftp-server to /usr/libexec/ on your target system. |
If you have installed the DropBear SSH Server and now need to transfer files using SFTP (Secure File Transfer Protocol), the SFTP-server as part of OpenSSH is a good choice.
sftp-server requires zlib. Download, cross compile and install the zlib compression libraries. Configure doesn't accept the --host parameter (reports unknown option), so you need to hack the makefile.
wget http://zlib.net/zlib-1.2.11.tar.gz tar -xzf zlib-1.2.11.tar.gz cd zlib-1.2.11/ ./configure --prefix=/home/export/rootfs
Edit the makefile and prefix the build tools with arm-none-linux-gnueabi-.
CC=arm-linux-gnueabi-gcc LDSHARED=arm-linux-gnueabi-gcc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map CPP=arm-linux-gnueabi-gcc -E AR=arm-linux-gnueabi-ar RANLIB=arm-linux-gnueabi-ranlib
Make and install:
make make install
Download and build the sftp-server component of OpenSSH:
wget http://mirror.internode.on.net/pub/OpenBSD/OpenSSH/portable/openssh-8.5p1.tar.gz tar -xzf openssh-8.5p1.tar.gz cd openssh-8.5p1 ./configure --prefix= --host=arm-linux-gnueabi --sysconfdir=/etc --with-zlib=../zlib-1.2.11 --without-openssl make sftp-server
Now copy sftp-server to /usr/libexec/ on your target system.