libnl-1.1 移植到ARM Linux

来源:互联网 发布:韩子高网络剧下 编辑:程序博客网 时间:2024/06/05 15:42

日期: 2013.7.26 作者:杨正 1209758756<yz2012ww@gmail.com>

 

Libnl简介:

libnl是为了方便应用程序使用netlink接口而开发的一个库。这个库为原始netlink消息传递以及不同的netlink family专用接口提供了一个统一的接口。移植libnl1.1是hostapd的移植的一部分,所以在移植hostapd之前先要移植libnl。

开发环境:

 

Linux3.0

 

目标环境:

 

Fl2440

 

移植步骤:

1、下载源代码包,并解压缩:
[lingyun@localhost wireless]$ wget http://www.infradead.org/~tgr/libnl/files/libnl-1.1.tar.gz
[lingyun@localhost wireless]$ tar -zxf libnl-1.1.tar.gz

2、建立安装目录
[lingyun@localhost wireless]$ mkdir install

3、进入libnl目录:
[lingyun@localhost wireless]$ cd libnl-1.1
[lingyun@localhost libnl-1.1]$ ls

aclocal.m4  configure     COPYING  include     lib         libnl-1.pc.in  Makefile.opts.in  src

ChangeLog   configure.in  doc      install-sh  libnl-1.pc  Makefile       Makefile.rules    tests

4、执行./configure --host=arm-linux --enable-static --prefix=安装路径:

[lingyun@localhost libnl-1.1]$ ./configure --host=arm-linux --enable-static --prefix=/home/lingyun/yangzheng/wireless/install/

5、执行make编译:

[lingyun@localhost libnl-1.1]$ make

6、执行make install进行安装:

[lingyun@localhost libnl-1.1]$ make install

[lingyun@localhost install]$ ls

include  lib

[lingyun@localhost install]$ tree

.

|-- include

|   `-- netlink

|       |-- addr.h

|       |-- attr.h

|       |-- cache-api.h

|       |-- cache.h

|       |-- data.h

|       |-- fib_lookup

|       |   |-- lookup.h

|       |   `-- request.h

|       |-- genl

|       |   |-- ctrl.h

|       |   |-- family.h

|       |   |-- genl.h

|       |   `-- mngt.h

|       |-- handlers.h

|       |-- list.h

|       |-- msg.h

|       |-- netlink-compat.h

|       |-- netlink.h

|       |-- netlink-kernel.h

|       |-- object-api.h

|       |-- object.h

|       |-- route

|       |   |-- addr.h

|       |   |-- class.h

|       |   |-- classifier.h

|       |   |-- classifier-modules.h

|       |   |-- class-modules.h

|       |   |-- cls

|       |   |   |-- fw.h

|       |   |   |-- police.h

|       |   |   `-- u32.h

|       |   |-- link.h

|       |   |-- neighbour.h

|       |   |-- neightbl.h

|       |   |-- nexthop.h

|   |-- dsmark.h

|       |   |   |-- fifo.h

|       |   |   |-- htb.h

|       |   |   |-- netem.h

|       |   |   |-- prio.h

|       |   |   |-- red.h

|       |   |   |-- sfq.h

|       |   |   `-- tbf.h

|       |   `-- tc.h

|       |-- socket.h

|       |-- types.h

|       `-- utils.h

`-- lib

    |-- libnl.so -> libnl.so.1

    |-- libnl.so.1 -> libnl.so.1.1

    |-- libnl.so.1.1

    `-- pkgconfig

        `-- libnl-1.pc

 

9 directories, 53 files

 

7、将/usr/local/arm/libnl1.1/lib下所有文件拷贝至开发板的/lib目录下,确保hostapd在开发板上运行,能够正确找到libnl库的位置。

 

参考文献:http://blog.csdn.net/hinyunsin/article/details/6029403

原创粉丝点击