rockie's android porting guide(2)——add usb wifi to your system
編譯android作業系統(2)——新增wifi支援
rockie cheng
now,zd1211b無線網絡卡已可使用wpa_supplicant連線無線網路,下一步要讓android能夠識別無線網絡卡。
android預設使用wifi.c載入無線網絡卡驅動模組,如果直接編譯進核心需要做一定修改。
btw:需要核心支援wifi和dhcp
(1)build/target/board/idea6410/boardconfig.mk
add# wifi related defines
board_wpa_supplicant_driver := wext
(2)external\wpa_supplicant\.config
# config_no_wpa=y
config_os=unix
config_ieee8021x_eapol=y
config_eap_md5=y
config_eap_mschapv2=y
config_eap_tls=y
config_eap_peap=y
config_eap_ttls=y
config_eap_gtc=y
config_eap_otp=y
config_eap_sim=y
config_eap_aka=y
config_eap_psk=y
config_eap_sake=y
config_eap_gpsk=y
config_eap_pax=y
config_eap_leap=y
config_pkcs12=y
config_smartcard=y
config_wireless_extension=y
config_ctrl_iface=y
config_driver_wext=y
it seems there is a problem with driver_wext.c in eclar,so i got one from cupcake.
(3)hardware/libhardware_legacy/wifi/wifi.c
將驅動直接編譯進核心
int wifi_load_driver()
int wifi_unload_driver()
{int count = 20; /* wait at most 10 seconds for completion */
loge("wifi driver unloaded by rockie!");
return 0;
注意這個定義static const char iface_dir = "/data/system/wpa_supplicant";
(4)編譯整個android系統,確認編譯完bin目錄中含有wpa_supplicant、wpa_cli
(5)修改init.rc檔案
addmkdir /data/misc/wifi 0770 system system
mkdir /data/misc/wifi/sockets 0770 system system
mkdir /data/system/wpa_supplicant 0770 system system
chmod 0660 /data/misc/wifi/wpa_supplicant.conf
add at the end
service wpa_supplicant /system/bin/wpa_supplicant -dwext -iwlan0 -d -c
/data/misc/wifi/wpa_supplicant.conf
# user wifi
# group wifi system
socket wpa_eth0 dgram 0660 wifi system
disabled
oneshot
service dhcpcd /system/bin/dhcpcd -f /system/etc/dhcpcd/dhcpcd.conf -d wlan0
disabled
oneshot
on property:init.svc.wpa_supplicant=stopped
stop dhcpcd
(6)新增system/etc/wifi/wpa_supplicant.conf
update_config=1
ctrl_inte***ce=/data/system/wpa_supplicant //這個一定要和iface_dir對應並保證目錄許可權
eapol_version=1
ap_scan=1
fast_reauth=1
(7)/system/etc/dhcpcd/dhcpcd.conf 檔案內容
inte***ce wlan0
option subnet_mask, routers, domain_name_servers
(8)boot and try
存在的問題是無法獲取wifi的訊號強度
android 移植 之二 觸控螢幕
其實,對android移植而言,觸控螢幕的驅動改動不是特別大。這裡只講兩個部分。第一,就是btn touch的新增。在普通的系統中,這個型別的event是可以不加的。意思就是,比如qt2.0,它並不依賴這個事件來判斷是否有拖動的事件,記得qt2裡好像沒有拖動的概念。而android中系統是根據這個事...
Oracle要點之二 SQLPLUS
1.更改當前登陸使用者密碼 password 2.預設sqlplus編輯器 包括unix windows 在glogin.sql加入以下行 define editor c program files ultraedit uedit32.exe unix solairs define editor v...
移植NFC驅動到android系統
1 進入kernel目錄,替換driver層檔案 kernel drivers nfc pn544.c kernel include linux nfc pn544.h 更新nfc目錄下得makefile喝config 2 將firmware複製到device rockchip rk3066下 3 ...