OpenSSL
- Download the source:
wget https://www.openssl.org/source/openssl-1.0.2j.tar.gz
- Extract it and change the working directory:
tar -xvf openssl-1.0.2j.tar.gz && cd openssl-1.0.2j
- Configure it:
./Configure gcc -static -no-shared --prefix=/home/user/vpn_compile --cross-compile-prefix=arm-linux-gnueabi-
- Compile:
make
- Install:
make install
LZO
- Download the source:
wget http://www.oberhumer.com/opensource/lzo/download/lzo-2.09.tar.gz
- Extract it and change the working directory:
tar -xvf lzo-2.09.tar.gz && cd lzo-2.09
- Configure it:
./configure --prefix=/home/user/vpn_compile --enable-static --target=arm-linux-gnueabi --host=arm-linux-gnueabi --disable-debug
- Compile:
make
- Install:
make install
OpenVPN
- Download the source:
wget https://swupdate.openvpn.org/community/releases/openvpn-2.3.12.tar.gz
- Extract it and change the working directory:
tar -xvf openvpn-2.3.12.tar.gz && cd openvpn-2.3.12
- Configure it:
./configure --target=arm-linux-gnueabi --host=arm-linux-gnueabi --prefix=/home/user/vpn_compile --disable-server --enable-static --disable-shared --disable-debug --disable-plugins OPENSSL_SSL_LIBS="-L/home/user/vpn_compile/lib -lssl" OPENSSL_SSL_CFLAGS="-I/home/user/vpn_compile/include" OPENSSL_CRYPTO_LIBS="-L/home/user/vpn_compile/lib -lcrypto" OPENSSL_CRYPTO_CFLAGS="-I/home/user/vpn_compile/include" LZO_CFLAGS="-I/home/user/vpn_compile/include" LZO_LIBS="-L/home/user/vpn_compile/lib -llzo2"
- Compile:
make LIBS="-all-static"
- Install:
make install
编译指令:
./configure --target=aarch64-linux-gnu --host=aarch64-linux-gnu --prefix=/home/victor/openvpn/openvpn-2.3.12/INSTALLDIR --enable-static --disable-debug OPENSSL_SSL_LIBS="-L/home/victor/openvpn/openssl
./configure --target=aarch64-linux-gnu --host=aarch64-linux-gnu --prefix=/home/victor/espVpn/openvpn-2.6.0/INSTALLDIR --enable-iproute2 --disable-debug --enable-static OPENSSL_CFLAGS="-I/home/victor/espVpn/openssl-3.1.0/INSTALLDIR/include" OPENSSL_LIBS="-L/home/victor/espVpn/openssl-3.1.0/INSTALLDIR/lib -lssl -lcrypto" LZO_CFLAGS="-I/home/victor/espVpn/lzo-2.10/INSTALLDIR/include" LZO_LIBS="-L/home/victor/espVpn/lzo-2.10/INSTALLDIR/lib -llzo2" LDFLAGS="-ldl" GCC=aarch64-linux-gnu-gcc LD=aarch64-linux-gnu-ld LZ4_CFLAGS="-I/home/victor/espVpn/lz4-1.9.4/INSTALLDIR/usr/local/include -I/home/victor/espVpn/libcap-ng-0.8.3/INSTALLDIR/include" LZ4_LIBS="-L/home/victor/espVpn/lz4-1.9.4/INSTALLDIR/usr/local/lib -L/home/victor/espVpn/libcap-ng-0.8.3/INSTALLDIR/lib -lcap-ng -llz4" LIBPAM_CFLAGS="-I/home/victor/espVpn/linux-pam-1.5.2/INSTALLDIR/include" LIBPAM_LIBS="-L/home/victor/espVpn/linux-pam-1.5.2/INSTALLDIR/lib -lpam"