wireless-tools

来源:互联网 发布:网络教育学士学位证 编辑:程序博客网 时间:2024/06/04 18:59
http://blog.csdn.net/bojue01/article/details/47665849

源码下载地址:http://www.labs.hpe.com/personal/Jean_Tourrilhes/Linux/Tools.html

下载wireless_tools.30.pre9.tar.gz

解压到mydroid/external/wireless-tools目录

创建Android.mk,内容如下:
#this library is added by lqy as wireless testing toolsLOCAL_PATH:= $(call my-dir)################## build iwlib ###################include $(CLEAR_VARS)LOCAL_SRC_FILES := iwlib.cLOCAL_CFLAGS += -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Winline -MMD -fPICLOCAL_MODULE:= libiwLOCAL_SHARED_LIBRARIES := libcutils libc libminclude $(BUILD_SHARED_LIBRARY)################## build iwconfig ###################include $(CLEAR_VARS)LOCAL_SRC_FILES := iwconfig.cLOCAL_CFLAGS += -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Winline -MMD -fPICLOCAL_MODULE:= iwconfigLOCAL_SHARED_LIBRARIES := libcutils libc libm libiw#LOCAL_FORCE_STATIC_EXECUTABLE := trueLOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES) # install to system/xbin#LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_UNSTRIPPED)#LOCAL_MODULE_TAGS := eng userinclude $(BUILD_EXECUTABLE)################## build iwlist ###################include $(CLEAR_VARS)LOCAL_SRC_FILES := iwlist.cLOCAL_CFLAGS += -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Winline -MMD -fPICLOCAL_MODULE:= iwlistLOCAL_SHARED_LIBRARIES := libcutils libc libm libiw#LOCAL_FORCE_STATIC_EXECUTABLE := trueLOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES) # install to system/xbin#LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_UNSTRIPPED)#LOCAL_MODULE_TAGS := eng userinclude $(BUILD_EXECUTABLE)


需要修正的地方

将wireless.22.h 更名为wireless.h
修改ifrename.c 增加getline的函数,代码可以从external/genext2fs/genext2fs.c中获得,注意里边是用宏把另一个函数传给getline
修改iwlib.h,将#include <net/ethernet.h>改为#include <net/if_ether.h>


原创粉丝点击