码迷,mamicode.com
首页 > 其他好文 > 详细

rk3288 usb无线网卡支持 8188eu

时间:2019-08-16 19:05:44      阅读:323      评论:0      收藏:0      [点我收藏+]

标签:blog   security   tps   inux   pil   show   pre   else   power   

第一部分是kernel

内核配置参考rk文档,把device driver 下wireless相关的先勾选上。

编译到buildin有问题,识别不到,所以打算编译成ko

cd  kernel/drivers/net/wireless/rockchip_wlan/rtl8188eu

make -C /home/lzm/workspace/rk3288/zy_n10/kernel/  M=`pwd` modules

得到8188eu.ko

lsusb,看vid pid,是存在的

看初始化函数,发现被注释,修改打开

第二部分,android打开Settings配置

commit e0394d5bb67a76fedbbbdca3f9cba39fbdd9c576
Author: songyoulin <songyoulin@star-net.cn>
Date:   Tue Oct 17 16:25:15 2017 +0800

    provide EthernetSettings interface

packages/apps/Settings/AndroidManifest.xml                            | 9 ++++-----
  packages/apps/Settings/src/com/android/settings/Settings.java         | 1 +
  packages/apps/Settings/src/com/android/settings/SettingsActivity.java | 1 +


commit 17dad10a1276a568e2952741a9a188d0bd6ced19
Author: youchangning <youchangning@star-net.cn>
Date:   Tue Nov 15 09:35:39 2016 +0800

    hide settings

device/rockchip/rk3288/system.prop                                    |  2 +-
  packages/apps/Settings/src/com/android/settings/SettingsActivity.java | 16 ++++++++++++++++

--- a/packages/apps/Settings/src/com/android/settings/SettingsActivity.java
+++ b/packages/apps/Settings/src/com/android/settings/SettingsActivity.java
@@ -1224,6 +1224,10 @@ public class SettingsActivity extends Activity
                             || Utils.isMonkeyRunning()) {
                         removeTile = true;
                     }
+
+                    if (!showDev) {
+                        removeTile = true;
+                    }
                 } else if (id == R.id.nfc_payment_settings) {
                     if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_NFC)) {
                         removeTile = true;
@@ -1260,6 +1264,18 @@ public class SettingsActivity extends Activity
                      if (!"box".equals(SystemProperties.get("ro.target.product", "tablet"))){
                          removeTile = true;
                      }
+                } else if ((id == R.id.power_save_settings) ||
+                           (id == R.id.location_settings) ||
+                           (id == R.id.account_settings) ||
+                           (id == R.id.security_settings) ||
+                           (id == R.id.accessibility_settings) ||
+                           (id == R.id.language_settings) ||
+                           (id == R.id.display_settings) ||
+                           (id == R.id.notification_settings) ||
+                           (id == R.id.date_time_settings)) {
+                    if (!showDev) {
+                        removeTile = true;
+                    }
                 }
 
                 if (UserHandle.MU_ENABLED && UserHandle.myUserId() != 0

commit 203df58cfb3281b9445b86e302eac883c93e970f

E/WifiService(  456): Invoking mWifiStateMachine.setWifiEnabled
E/WifiStateMachine(  456): setting operational mode to 1
E/RkWifiCtrl(  456): Wifi driver is not ready.
E/RkWifiCtrl(  456): rk_wifi_load_driver:(insmod)
E/RkWifiCtrl(  456): rk_wifi_load_driver: open(/sys/class/rkwifi/driver) for write failed: Permission denied (13)
E/WifiStateMachine(  456): Failed to load driver
E/WifiStateMachine(  456): setSuspendOptimizations: 2 true
E/WifiStateMachine(  456): mSuspendOptNeedsDisabled 0
W/Vibrator(  456): Failed to vibrate; no vibrator service.
E/WifiService(  456): Invoking mWifiStateMachine.setWifiEnabled

rk这个有点坑了。。。

lzm@compilere:~/workspace/rk3288/zy_n10$ grep -rn "rk_wifi_load_driver" *
hardware/libhardware_legacy/include/hardware_legacy/wifi.h:58:int rk_wifi_load_driver(int enable);
hardware/libhardware_legacy/wifi/wifi.c:315:        if (rk_wifi_load_driver(1) < 0)
hardware/libhardware_legacy/wifi/wifi.c:376:        ret = rk_wifi_load_driver(0);
hardware/libhardware_legacy/wifi/rk_wifi_ctrl.c:48:int rk_wifi_load_driver(int enable);
hardware/libhardware_legacy/wifi/rk_wifi_ctrl.c:195:int rk_wifi_load_driver(int enable)
hardware/libhardware_legacy/wifi/rk_wifi_ctrl.c:201:    ALOGE("rk_wifi_load_driver:(%s)", enable? "insmod":"rmmod");
hardware/libhardware_legacy/wifi/rk_wifi_ctrl.c:216:        ALOGE("rk_wifi_load_driver: open(%s) for write failed: %s (%d)",
hardware/libhardware_legacy/wifi/rk_wifi_ctrl.c:224:        ALOGE("rk_wifi_load_driver: write(%s) failed: %s (%d)",

属于hal层,

HAL概述

https://www.cnblogs.com/lcw/p/3335505.html

编译完放置在 /system/lib/

130|root@EMT100T:/sys/class/rkwifi # ls /system/lib/
libhardware.so            libharfbuzz_ng.so         libhwui.so
libhardware_legacy.so     libhevcdec.so

单独编译:

source build/envsetup.sh

lzm@compilere:~/workspace/rk3288/zy_n10$ lunch

You‘re building on Linux

Lunch menu... pick a combo:
     1. rk3288-user
     2. rk3288-userdebug
     3. rk3288_box-userdebug
     4. rk3288-eng
     5. mini_emulator_mips-userdebug
     6. mini_emulator_arm64-userdebug
     7. mini_emulator_x86-userdebug
     8. mini_emulator_x86_64-userdebug
     9. m_e_arm-userdebug
     10. aosp_shamu-userdebug
     11. aosp_flounder-userdebug

Which would you like? [aosp_arm-eng] 2

cd hardware/libhardware_legacy

mm

android源码目录下的build/envsetup.sh文件,描述编译的命令

  • m: Makes from the top of the tree.
  • mm: Builds all of the modules in the current directory.
  • mmm: Builds all of the modules in the supplied directories.

要想使用这些命令,首先需要在android源码根目录执行. build/envsetup.sh 脚本设置环境

m:编译所有的模块
mm:编译当前目录下的模块,当前目录下要有Android.mk文件
mmm:编译指定路径下的模块,指定路径下要有Android.mk文件

下面举个例子说明,假设我要编译android下的\hardware\libhardware_legacy\power模块,当前目录为源码根目录,方法如下:

1、. build/envsetup.sh
2、mmm hardware/libhardware_legacy/power/

或者 :

1、. build/envsetup.sh
2、cd hardware/libhardware_legacy/power/
3、mm

adb shell am start com.android.settings/com.android.settings.Settings

130|root@EMT100T:/ # logcat -s RkWifiCtrl
--------- beginning of main
--------- beginning of system
D/RkWifiCtrl(  439): check_wifi_preload: Wifi driver is not preload when bootup, load when open wifi.
E/RkWifiCtrl(  439): rk_wifi_load_driver:(rmmod)
E/RkWifiCtrl(  439): Wifi driver is not ready.
D/RkWifiCtrl(  439): check_wifi_preload: Wifi driver is not preload when bootup, load when open wifi.
E/RkWifiCtrl(  439): Wifi driver is not ready.
E/RkWifiCtrl(  439): rk_wifi_load_driver:(insmod)
E/RkWifiCtrl(  439): Wifi driver is not ready.
E/RkWifiCtrl(  439): Wifi driver is not ready.
E/RkWifiCtrl(  439): Wifi driver is not ready.
E/RkWifiCtrl(  439): Wifi driver is not ready.
E/RkWifiCtrl(  439): Wifi driver is not ready.
E/RkWifiCtrl(  439): Wifi driver is not ready.
E/RkWifiCtrl(  439): Wifi driver is not ready.

rk3288 usb无线网卡支持 8188eu

标签:blog   security   tps   inux   pil   show   pre   else   power   

原文地址:https://www.cnblogs.com/cute/p/11365521.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!