원문 : http://cafe.naver.com/embeddedcrazyboys.cafe?iframe_url=/ArticleRead.nhn%3Farticleid=6066&
0. (Mango64 & Android) Wireless Tools 포함 빌드 방법
http://blog.chinaunix.net/u2/67984/showart_2113952.html
참고로 했습니다.
먼저
http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html
가서 wireless tools를 다운받습니다.
받은 파일을 Android_root/external 에 복사합니다.
#tar –xvfz wireless_tools.29.tar.gz |
압축을 풉니다.
wireless_tools.29 폴더가 생성이 됩니다.
#cd wireless_tools.29 #vi Android.mk |
그리고, 위와 같이 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) ################## build iwlist ################### include $(CLEAR_VARS) LOCAL_SRC_FILES := iwlist.c iwlib.h LOCAL_CFLAGS += -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Winline -MMD -fPIC LOCAL_MODULE:= iwlist 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) |
그리고,
#vi wireless.22.h 열어서
아래와 같이 막습니다.
#if 0 #define IW_EV_LCP_PK_LEN (4) /* Size of the various events when packed in stream */ #define IW_EV_CHAR_PK_LEN (IW_EV_LCP_PK_LEN + IFNAMSIZ) #define IW_EV_UINT_PK_LEN (IW_EV_LCP_PK_LEN + sizeof(__u32)) #define IW_EV_FREQ_PK_LEN (IW_EV_LCP_PK_LEN + sizeof(struct iw_freq)) #define IW_EV_PARAM_PK_LEN (IW_EV_LCP_PK_LEN + sizeof(struct iw_param)) #define IW_EV_ADDR_PK_LEN (IW_EV_LCP_PK_LEN + sizeof(struct sockaddr)) #define IW_EV_QUAL_PK_LEN (IW_EV_LCP_PK_LEN + sizeof(struct iw_quality)) #define IW_EV_POINT_PK_LEN (IW_EV_LCP_LEN + 4) #endif
|
그리고, wireless.22.h 을 복사하여 wireless.h 을 만듭니다.
# cp wireless.22.h wireless.h |
修改ifrename.c 增加getline的函数,代码可以从external/genext2fs/genext2fs.c中获得 |
의 의미는 getline함수를 external/genext2fs/genext2fs.c 있는 것을 사용하라는 의미인데, 수정하지 않아도
컴파일 에러는 발생하지 않았습니다. 발생하면 긁어서 사용하세요.
修改iwlib.h,将#include <net/ethernet.h>改为#include <net/if_ether.h> |
#vi iwlib.h
열어서 아래와 같이 수정하시면 됩니다.
//#include <net/ethernet.h> /* struct ether_addr */ #include <net/if_ether.h> |
그리고, 마지막으로 android_root로 가서
#source build/envsetup.sh #mm external/wireless_tools.29 |
하면 됩니다. 인증 로그
make: Entering directory `/home/crazyboyjji/work/android-work/Cupcake-work/cupcake-mango64-mywork' build/core/product_config.mk:261: WARNING: adding test OTA key ============================================ TARGET_PRODUCT=generic TARGET_BUILD_VARIANT=eng TARGET_SIMULATOR= TARGET_BUILD_TYPE=release TARGET_ARCH=arm HOST_ARCH=x86 HOST_OS=linux HOST_BUILD_TYPE=release BUILD_ID= ============================================ target thumb C: iwconfig <= external/wireless_tools.29/iwconfig.c In file included from external/wireless_tools.29/iwlib.h:27, from external/wireless_tools.29/iwconfig.c:14: bionic/libc/include/stdlib.h:84: warning: declaration of 'abs' shadows a built-in function bionic/libc/include/stdlib.h:88: warning: declaration of 'labs' shadows a built-in function bionic/libc/include/stdlib.h:92: warning: declaration of 'llabs' shadows a built-in function target thumb C: libiw <= external/wireless_tools.29/iwlib.c In file included from external/wireless_tools.29/iwlib.h:27, from external/wireless_tools.29/iwlib.c:14: bionic/libc/include/stdlib.h:84: warning: declaration of 'abs' shadows a built-in function bionic/libc/include/stdlib.h:88: warning: declaration of 'labs' shadows a built-in function bionic/libc/include/stdlib.h:92: warning: declaration of 'llabs' shadows a built-in function target StaticLib: libiw (out/target/product/generic/obj/STATIC_LIBRARIES/libiw_intermediates/libiw.a) target Executable: iwconfig (out/target/product/generic/obj/EXECUTABLES/iwconfig_intermediates/LINKED/iwconfig) target Non-prelinked: iwconfig (out/target/product/generic/symbols/system/bin/iwconfig) target Strip: iwconfig (out/target/product/generic/obj/EXECUTABLES/iwconfig_intermediates/iwconfig) target thumb C: iwlist <= external/wireless_tools.29/iwlist.c In file included from external/wireless_tools.29/iwlib.h:27, from external/wireless_tools.29/iwlist.c:14: bionic/libc/include/stdlib.h:84: warning: declaration of 'abs' shadows a built-in function bionic/libc/include/stdlib.h:88: warning: declaration of 'labs' shadows a built-in function bionic/libc/include/stdlib.h:92: warning: declaration of 'llabs' shadows a built-in function target Executable: iwlist (out/target/product/generic/obj/EXECUTABLES/iwlist_intermediates/LINKED/iwlist) target Non-prelinked: iwlist (out/target/product/generic/symbols/system/bin/iwlist) target Strip: iwlist (out/target/product/generic/obj/EXECUTABLES/iwlist_intermediates/iwlist) Install: out/target/product/generic/system/xbin/iwconfig Install: out/target/product/generic/system/xbin/iwlist Finding NOTICE files: out/target/product/generic/obj/NOTICE_FILES/hash-timestamp Combining NOTICE files: out/target/product/generic/obj/NOTICE.html |
http://cafe.naver.com/embeddedcrazyboys Crazy Embedded Laboratory 페이지 2
'안드로이드' 카테고리의 다른 글
[안드로이드] 전화번호 포맷에 맞게 변환하기 (0) | 2011.09.02 |
---|---|
[안드로이드] /dev 디렉토리 권한 설정 (0) | 2011.09.01 |
[안드로이드] ListView의 Selector에 관해서... (0) | 2011.08.31 |
[안드로이드] StateListDrawable에서 Drawable 가져오기 (0) | 2011.08.31 |
[안드로이드] 메모리 누수 OutOfMemoryError 관련 링크들 (0) | 2011.08.31 |
(Mango64 & Android) Wireless Tools 활용법(iwconfig,iwlist) (0) | 2011.08.24 |
[안드로이드] adb로 sqlite3 사용하기 (0) | 2011.08.17 |
안드로이드 "ADB" 유틸리티 설치 및 명령어 사용방법 (0) | 2011.08.15 |
[안드로이드] 멀티쓰레드에서의 성능 향상 (0) | 2011.08.12 |
[안드로이드] byte[] -> bitmap, bitmap -> byte[] 변환 (0) | 2011.08.10 |