2013年4月14日 星期日

wpa_supplicant(mipsel-linux-gcc)



1: 編譯libnl-1.1.3
   (1) ./configure --host=mipsel-linux --prefix=/home/jimmy/work/tmp/libnl
   (2)  make
   (3) make install


2:編譯openssl-0.9.8x
    (1) cp wpa_supplicant-2.0/patches/openssl-0.9.8x-tls-extensions.patch openssl-0.9.8x
    (2) patch -p1 < openssl-0.9.8x-tls-extensions.patch

    (3)改Makefile
    將linux-x86_64 取代成mips
    -m64  全部移除
    CC= mipsel-linux-gcc
    AR= mipsel-linux-ar $(ARFLAGS) r
    RANLIB= mipsel-linux-ranlib
  
    (4)make
    (5)make install

ps: openssl-1.1.1
     ./config no-asm no-async --cross-compile-prefix=mipsel-linux- --prefix=/home/jimmy/vda/tmp/ssl
     Makefile -m64移除
     make && make install

3: 編譯wpa_supplicant-2.0
    (1)修改defconfig
    CC=mipsel-linux-gcc
     LDFLAGS = -L/home/jimmy/work/tmp/libnl/lib -L/home/jimmy/work/tmp/ssl/lib
     #CC=/opt/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-gcc
     CFLAGS += -Os -I/home/jimmy/work/tmp/libnl/include -I/home/jimmy/work/tmp/ssl/include
     #CPPFLAGS += -I../src/include -I../../src/router/openssl/include
    LIBS += -lssl
    LIBS += -L/home/jimmy/vda/tmp/ssl/lib

    (2)cp -f defconfig .config

    (3)make


4: 你已經可以得到 wpa_cli
 





ps: bin/ld: cannot find -lssl
LIBS += -L/home/jimmy/vda/tmp/ssl/lib

沒有留言:

張貼留言