Aodv路由协议——将aodv-uu-0.9.3移植到ARM-LINUX中
2007-07-28 17:03
411 查看
<SCRIPT type=text/javascript><!--
google_ad_client = "pub-2132256014190581";
/* 160x600, 创建于 09-1-4 */
google_ad_slot = "4461398019";
google_ad_width = 160;
google_ad_height = 600;
//-->
</SCRIPT>
<SCRIPT src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type=text/javascript>
</SCRIPT>
kernel 2.6.21.1
aodv aodv-uu-0.9.3
1 内核的配置要求
我的内核为linux-2.6.21.1
Networking --->
Networking options --->
[*] Network packet filtering framework (Netfilter) --->
IP: Netfilter Configuration --->
<*> IP Userspace queueing via NETLINK (OBSOLETE)
我是直接编译到内核中的,也可以编译成模块ip_queue.ko,然后挂载。
2 修改Makefile
line20 修改内核的版本号,我的内核为linux-2.6.21.1
KERNEL=$(shell uname -r)改为:
KERNEL= 2.6.21.1
line22 为内核的源码路径,我的内核源码路径为/home/zht/redhatzht/sources/mykernel/21/linux-2.6.21.1
KERNEL_DIR=/lib/modules/$(KERNEL)/build改为:
KERNEL_DIR=/home/zht/redhatzht/sources/mykernel/21/linux-2.6.21.1
line125 $(MAKE) -C $(AODVDIR)/lnx kaodv-arm.o KERNEL_DIR=$(KERNEL_DIR) KCC=$(ARM_CC) LD=$(ARM_LD)
修改如下:
$(MAKE) -C $(KERNEL_DIR) M=$(AODVDIR)/lnx
3 错误修改:
a /home/zht/redhat/linuxhome/zht/sources/warelesscard/aodv-uu-0.9.3/lnx/kaodv-mod.c:22:26: error: linux/config.h: No such file or directory
将lnx/kaodv-mod.c line22的linux/config.h 改为 linux/autoconf.h
b /home/zht/redhat/linuxhome/zht/sources/warelesscard/aodv-uu-0.9.3/lnx/kaodv-mod.c:261: error: too few arguments to function ip_route_me_harder
在linux2.6的内核中该函数ip_route_me_harder多了一个参数,所以在调用的时候要增加一个参数,具体传递什么数,不知道。暂 时改为如下 :
lnx/kaodv-mod.c line261 ip_route_me_harder(skb);该为:ip_route_me_harder(skb,RTN_UNSPEC);
c /home/zht/redhat/linuxhome/zht/sources/warelesscard/aodv-uu-0.9.3/lnx/kaodv-netlink.c:287: error: too few arguments to function security_netlink_recv
在linux2.6的内核中该函数security_netlink_recv多了一个参数,所以在调用的时候要增加一个参数,具体增加什么参数,不知道。 暂时改为如下 :
lnx/kaodv-netlink.c line287 的if (security_netlink_recv(skb))修改为:if (security_netlink_recv(skb,10))
if (security_netlink_recv(skb,CAP_NET_ADMIN))
d /home/zht/redhat/linuxhome/zht/sources/warelesscard/aodv-uu-0.9.3/lnx/kaodv-queue.c:249: error: too few arguments to function ip_route_me_harder该错误与b相同 ,修改如下 :
lnx/kaodv-queue.c line249 ip_route_me_harder(&entry->skb); 改为:ip_route_me_harder(&entry->skb,RTN_UNSPEC);
4 编译过后将在当前目录下生成aodvd的可执行文件,在lnx目录中将生成kaodv.ko模块。
5 然后将aodvd kaodv.ko拷贝到目标板中,测试是否移植成功。
<SCRIPT type=text/javascript><!--
google_ad_client = "pub-2132256014190581";
/* 160x600, 创建于 09-1-4 */
google_ad_slot = "4461398019";
google_ad_width = 160;
google_ad_height = 600;
//-->
</SCRIPT>
<SCRIPT src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type=text/javascript>
</SCRIPT>
google_ad_client = "pub-2132256014190581";
/* 160x600, 创建于 09-1-4 */
google_ad_slot = "4461398019";
google_ad_width = 160;
google_ad_height = 600;
//-->
</SCRIPT>
<SCRIPT src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type=text/javascript>
</SCRIPT>
kernel 2.6.21.1
aodv aodv-uu-0.9.3
1 内核的配置要求
我的内核为linux-2.6.21.1
Networking --->
Networking options --->
[*] Network packet filtering framework (Netfilter) --->
IP: Netfilter Configuration --->
<*> IP Userspace queueing via NETLINK (OBSOLETE)
我是直接编译到内核中的,也可以编译成模块ip_queue.ko,然后挂载。
2 修改Makefile
line20 修改内核的版本号,我的内核为linux-2.6.21.1
KERNEL=$(shell uname -r)改为:
KERNEL= 2.6.21.1
line22 为内核的源码路径,我的内核源码路径为/home/zht/redhatzht/sources/mykernel/21/linux-2.6.21.1
KERNEL_DIR=/lib/modules/$(KERNEL)/build改为:
KERNEL_DIR=/home/zht/redhatzht/sources/mykernel/21/linux-2.6.21.1
line125 $(MAKE) -C $(AODVDIR)/lnx kaodv-arm.o KERNEL_DIR=$(KERNEL_DIR) KCC=$(ARM_CC) LD=$(ARM_LD)
修改如下:
$(MAKE) -C $(KERNEL_DIR) M=$(AODVDIR)/lnx
3 错误修改:
a /home/zht/redhat/linuxhome/zht/sources/warelesscard/aodv-uu-0.9.3/lnx/kaodv-mod.c:22:26: error: linux/config.h: No such file or directory
将lnx/kaodv-mod.c line22的linux/config.h 改为 linux/autoconf.h
b /home/zht/redhat/linuxhome/zht/sources/warelesscard/aodv-uu-0.9.3/lnx/kaodv-mod.c:261: error: too few arguments to function ip_route_me_harder
在linux2.6的内核中该函数ip_route_me_harder多了一个参数,所以在调用的时候要增加一个参数,具体传递什么数,不知道。暂 时改为如下 :
lnx/kaodv-mod.c line261 ip_route_me_harder(skb);该为:ip_route_me_harder(skb,RTN_UNSPEC);
c /home/zht/redhat/linuxhome/zht/sources/warelesscard/aodv-uu-0.9.3/lnx/kaodv-netlink.c:287: error: too few arguments to function security_netlink_recv
在linux2.6的内核中该函数security_netlink_recv多了一个参数,所以在调用的时候要增加一个参数,具体增加什么参数,不知道。 暂时改为如下 :
lnx/kaodv-netlink.c line287 的if (security_netlink_recv(skb))修改为:if (security_netlink_recv(skb,10))
if (security_netlink_recv(skb,CAP_NET_ADMIN))
d /home/zht/redhat/linuxhome/zht/sources/warelesscard/aodv-uu-0.9.3/lnx/kaodv-queue.c:249: error: too few arguments to function ip_route_me_harder该错误与b相同 ,修改如下 :
lnx/kaodv-queue.c line249 ip_route_me_harder(&entry->skb); 改为:ip_route_me_harder(&entry->skb,RTN_UNSPEC);
4 编译过后将在当前目录下生成aodvd的可执行文件,在lnx目录中将生成kaodv.ko模块。
5 然后将aodvd kaodv.ko拷贝到目标板中,测试是否移植成功。
<SCRIPT type=text/javascript><!--
google_ad_client = "pub-2132256014190581";
/* 160x600, 创建于 09-1-4 */
google_ad_slot = "4461398019";
google_ad_width = 160;
google_ad_height = 600;
//-->
</SCRIPT>
<SCRIPT src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type=text/javascript>
</SCRIPT>
相关文章推荐
- Aodv路由协议——将aodv-uu-0.9.3移植到ARM-LINUX中 (转)
- lighttpd+php(fastcgi) 移植到arm-linux
- jsoncpp linux平台编译和 arm移植
- ARM AT91SAM9260 移植Linux-2.6.30流程
- Arm-Linux下Samba的移植与开发环境搭建
- 【OpenCV】arm-linux-gcc 3.4.1 移植OpenCV 1.0 出现[cvpyrsegmentation.lo] Error 1 错误
- 在ARM-Linux平台上移植SQLite(上)
- 移植kvm-cldc1.1到arm-linux上心得
- Linux下移植OpenCV + Qt 到ARM(Tiny6410)总结 转
- 通过ssh连接开发板——arm-linux下ssh的移植
- qt4.7.2移植到arm-linux&nbsp;s3c2440全…
- Linux应用程序开发(一)---移植thttpd+Sqlite3+PHP5到arm linux(4)
- 我的arm_linux移植笔记
- 嵌入式ARM移植之三:移植 linux-2.6.26 内核
- 成功移植SSH到ARM目标板的Linux系统中
- SQLite向arm-linux的移植
- [ARM-LINUX]移植2.6.31.12内核到立宇泰ARMSYS2440开发板之LCD驱动+触摸屏驱动
- 移植BoaWeb服务器到ARM-Linux&mipsel-linux系统
- arm-linux移植MT7601Uusb无线网卡(小度wifi,360随身WIFI 2代)
- OpenCV2.0.0 移植 arm-linux-gcc version 4.5.1