分类: LINUX
2009-06-04 13:59:03
软件环境:linux
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
5. 编译
$cd mydroid
$source build/envsetup.sh
$mmm external/wireless-tools
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.