安装目录

/opt/nm/

PATH

export PKG_CONFIG_PATH=/opt/nm/lib/pkgconfig
export CPPFLAGS="-I/opt/nm/include -I/opt/nm/share"
export CFLAGS="-I/opt/nm/include -I/opt/nm/share"

libmnl

./configure --host=arm-linux --prefix=/opt/nm

libnftnl-1.1.7

./configure --host=arm-linux --prefix=/opt/nm

xtable

./configure --disable-nftables --host=arm-linux --prefix=/opt/nm

gmp-5.0.2

./configure --host=arm-linux --prefix=/opt/nm

nettle-2.4

LIBS="-L/opt/nm/lib -lgmp" ./configure --host=arm-linux --prefix=/opt/nm

gnutls

编译gnutls失败,把rpl_localtime找不到 ,修改config.h, 把#define localtime rpl_localtime注释掉。 ./configure --host=arm-linux --prefix=/opt/nm

readline

./configure --disable-nftables --host=arm-linux --prefix=/opt/nm

libffi

./configure --host=arm-linux --prefix=/opt/nm

falloc64

这个库是自己写的,因为glib需要falloc64这个函数,但是libc2.10没有实现,所以我们自己写一个 make 完成后把生成的libfalloc64.a复制到/opt/nm/lib 源码:

fallocate64.c:

#include <fcntl.h>                                                                                                                                     
/* Reserve storage for the data of the file associated with FD.  */              
int                                                                              
fallocate64 (int fd, int mode, __off64_t offset, __off64_t len)                  
{                                                                                
    return fallocate (fd, mode, offset, len);                                    
} 

makefile:

libfalloc64 : fallocate64.o                                                      
|   arm-linux-ar -crv libfalloc64.a fallocate64.o                                
                                                                                 
fallocate64.o : fallocate64.c                                                    
|   arm-linux-gcc -c fallocate64.c 

glib

glib: 修改configure.ac 和 configure glib_cv_stack_grows=no glib_cv_uscore=no ac_cv_func_posix_getpwuid_r=no ac_cv_func_posix_getgrgid_r=no

找不到aclocal-1.13: 修改configure把版本改为1.11

LIBS="-L/opt/nm/lib -lfalloc64" ./configure --host=arm-linux --prefix=/opt/nm --with-libiconv=gnu

expat1.6

CC=arm-linux-gcc ./configure --host=arm-linux --prefix=/opt/nm

ncureses:

./configure --host=arm-linux --prefix=/opt/nm --with-shared 这个install会有报错,但是库是安装完了,所以不管它

dbus:

./configure --host=arm-linux --prefix=/opt/nm dbus 1.6 需要手动复制dbus-1.pc到安装目录

connman

error: unknown type name 'sa_family_t' 修改vim vpn/plugins/libwireguard.c , 把sys/socket.h放到netlink.h前面。 找不到 xt_error_target: 在src/iptables.c中添加定义:

struct xt_error_target {                                                                                                                       
|   struct xt_entry_target target;                                               
|   char errorname[XT_FUNCTION_MAXNAMELEN];                                      
}; 

报错找不到CLOCK_BOOTTIME,修改报错文件源码vim vpn/vpn-provider.c,把CLOCK_BOOTTIME 改成 CLOCK_MONOTONIC

LIBS="-lncurses" ./configure --host=arm-linux --prefix=/opt/nm


libnl-3.2.25:

./configure --host=arm-linux --prefix=/opt/nm

openssl1.1.0:

CC=gcc CROSS_COMPILE=arm-linux- ./config -no-asm --prefix=/opt/nm

wpa_supplicant:

安装:flex,bison

wpa_supplicant-2.6/wpa_supplicant, 编辑.config:

CONFIG_IEEE8021X_EAPOL=y
CONFIG_EAP_MD5=y
CONFIG_EAP_MSCHAPV2=y
CONFIG_EAP_TLS=y
CONFIG_EAP_PEAP=y
CONFIG_EAP_TTLS=y
CONFIG_EAP_GTC=y
CONFIG_EAP_OTP=y
CONFIG_EAP_SIM=y
CONFIG_EAP_AKA=y
CONFIG_EAP_AKA_PRIME=y
CONFIG_EAP_PSK=y
CONFIG_EAP_SAKE=y
CONFIG_EAP_GPSK=y
CONFIG_EAP_PAX=y
CONFIG_EAP_LEAP=y
CONFIG_EAP_IKEV2=y
CONFIG_EAP_PWD=y

CONFIG_DRIVER_NL80211=y
CONFIG_DRIVER_WEXT=y

CONFIG_DRIVER_NL80211=y
CONFIG_DRIVER_WEXT=y
CONFIG_IEEE8021X_EAPOL=y
CONFIG_EAP_MD5=y
CONFIG_EAP_MSCHAPV2=y
CONFIG_EAP_TLS=y
CONFIG_EAP_PEAP=y
CONFIG_EAP_TTLS=y
CONFIG_EAP_GTC=y
CONFIG_EAP_OTP=y
CONFIG_EAP_SIM=y
CONFIG_EAP_AKA=y
CONFIG_EAP_PSK=y
CONFIG_EAP_SAKE=y
CONFIG_EAP_GPSK=y
CONFIG_EAP_PAX=y
CONFIG_EAP_LEAP=y
CONFIG_EAP_IKEV2=y

CONFIG_CTRL_IFACE_DBUS_NEW=y
CONFIG_CTRL_IFACE_DBUS_INTRO=y
CONFIG_CTRL_IFACE=y
CONFIG_LIBNL32=y

CC=arm-linux-gcc CFLAGS="-I/opt/nm/include -I/opt/nm/share" LIBS="-L/opt/nm/lib -l:libssl.a" make

降成本编译Qt+dbus支持

./configure -prefix /opt/arm/qt-arm-4.8.4/ -embedded arm -platform qws/linux-x86-g++ -xplatform qws/linux-arm-g++ -nomake demos -nomake examples -nomake docs -fast -shared -release -opensource -no-mmx -no-pch -no-3dnow -no-sse -no-sse2 -no-cups -no-webkit -no-libmng -no-libtiff -no-openssl -no-qt3support -no-exceptions -no-accessibility -qt-zlib -qt-libpng -qt-libjpeg -qt-sql-sqlite -depths 16,24,32 -force-pkg-config -qt-mouse-pc -plugin-mouse-pc -qt-mouse-linuxtp -qt-mouse-linuxinput -plugin-mouse-linuxtp -qt-mouse-tslib -dbus -no-glib -I/usr/local/tslib/lib -L/usr/local/tslib/lib 

./configure \
-prefix /opt/arm/qt-arm-4.8.6 \
-opensource \
-confirm-license \
-xplatform qws/linux-arm-g++ \
-embedded arm \
-little-endian \
-depths 4,8,16,24,32 \
-shared \
-nomake docs \
-no-largefile \
-no-3dnow \
-no-sse \
-no-sse2 \
-script \
-no-mmx \
-no-cups \
-no-iconv \
-no-gfx-vnc \
-no-svg \
-qt-gfx-linuxfb \
-qt-gfx-qvfb \
-qt-kbd-linuxinput \
-qt-mouse-tslib \
-qt-zlib \
-qt-libtiff \
-qt-libpng \
-qt-libmng \
-qt-sql-sqlite \
-qt-libjpeg \
-qt3support \
-no-opengl \
-no-openvg \
-qt-freetype \
-no-fontconfig -dbus -force-pkg-config -no-glib