Chinaunix首页 | 论坛 | 博客
  • 博客访问: 45343
  • 博文数量: 8
  • 博客积分: 1400
  • 博客等级: 上尉
  • 技术积分: 90
  • 用 户 组: 普通用户
  • 注册时间: 2009-05-23 22:30
文章分类

全部博文(8)

文章存档

2011年(1)

2009年(7)

我的朋友

分类: LINUX

2009-06-04 13:59:03

 

软件环境:linux2.6.28 + android 1.5

 

1.      下载wireless_tools.30.pre8.tar.gz 此版本支持non-ASCII char in ESSID

 

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

 

3.      创建Android.mk,主要内容如下

LOCAL_PATH:= $(call my-dir)

 

################## build iwlib ###################

include $(CLEAR_VARS)

 

LOCAL_SRC_FILES := iwlib.c

 

LOCAL_CFLAGS += -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Winline -MMD -fPIC

 

LOCAL_MODULE:= libiw

 

LOCAL_STATIC_LIBRARIES := libcutils libc libm

 

include $(BUILD_STATIC_LIBRARY)

 

################## build iwconfig ###################

include $(CLEAR_VARS)

 

LOCAL_SRC_FILES := iwconfig.c

 

LOCAL_CFLAGS += -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Winline -MMD -fPIC

 

LOCAL_MODULE:= iwconfig

 

LOCAL_STATIC_LIBRARIES := libcutils libc libm libiw

 

#LOCAL_FORCE_STATIC_EXECUTABLE := true

LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)  # install to system/xbin

#LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_UNSTRIPPED)

#LOCAL_MODULE_TAGS := eng user

 

include $(BUILD_EXECUTABLE)

……..

 

4.      修改

wireless.22.h 更名为wireless.h

修改ifrename.c 增加getline的函数,代码可以从external/genext2fs/genext2fs.c中获得

修改iwlib.h,将#include 改为#include

 

5.      编译

$cd mydroid

$source build/envsetup.sh

$mmm external/wireless-tools

 

阅读(1742) | 评论(1) | 转发(0) |
0

上一篇:没有了

下一篇:移植iperf到android

给主人留下些什么吧!~~

chinaunix网友2010-01-19 13:51:47

I want to see your's an android cupcake modify source about wifi. I'm student in KOREA. Could you give me a source file to email??. Please.ㅠ I don't know . why I make source files error. about this .. out / target / product / generic / obj / EXECUTABLES / iwconfig_intermediates / LINKED / iwconfig 'needs in the target `out / target / product / generic / obj / lib / crtbegin_dynamic.o' can not create a rule. Stop. help me.ㅠㅠㅠㅠㅠㅠ lecon@nate.