MY-SAMA5 Linux-3.18 RTL8188EU 开发指导

明远智睿MY-SAMA5 Linux-3.18 RTL8188EU 开发指导

 

1  准备源码

1.1  下载源码包

在网盘下载 rtl8188EUS_linux_v4.3.0.9_15178.20150907.tar.xz

 

1.2  解压源码包

1.2.1  创建工作目录

这里我们创建 ~/my-demo/exclude_src 目录,并在该目录下工作。
$ mkdir ~/my-demo/exclude_src -p

 

1.2.2  复制源码包到工作目录

将下载的源码包复制到 ~/my-demo/exclude_src 。
这一步自己采取相应方式完成。

 

1.2.3  解压源码

进入源码目录

$ cd ~/my-demo/exclude_src

解压

$ tar xf rtl8188EUS_linux_v4.3.0.9_15178.20150907.tar.xz

 

2 编译模块

2.1  检查配置

说明:模块编译存在两个依赖关系,交叉编译编译链和内核,并且需要在指定路径。

使编译配置文件生效

$ source ~/my-sama5/03_tools/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf.config

检查内核源码路径

$ ls ~/my-sama5/02_source/linux-at91-linux4sam_4.7
如果内核源码存在并且路径正确会看到内核源码目录的内容。
如果命令的执行结果异常,需要按照《MY-SAMA5 L318 编译手册》重新编译一次内核。

 

2.2  编译

进入驱动代码目录

$ cd rtl8188EUS_linux_v4.3.0.9_15178.20150907/

执行编译命令

$ make

 

2.3  目标文件

查看目标文件信息

$ file *.ko
执行 file 命令可以看到编译出来的模块的信息,类似如下:
8188eu.ko: ELF 32-bit LSB relocatable, ARM, version 1 (SYSV), BuildID[sha1]=0x1a3bbb865d785effc8acfebf9e2c8faf066b3fbf, not stripped
8188eu.ko 即编译得到的目标文件

 

3  WIFI测试

见 《MY-SAMA5 Linux-3.18 测试手册》

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
全志R16调通USB接口的WIFI:RTL8188CUv1.0版本.txt 2017/4/5 16:56 开发板:SC3817R OS/SDK:Android4.4.2/ParrotV1.1 测试步骤/请眼中注意:打开WIFI之前必须将 USB接口的WIFI:RTL8188CU插入到USB1中去,否则会死机!!!!切记! 1、(如果SDK没有编译过,请跳过本次执行步骤!!!!) rootroot@cm-System-Product-Name:/home/wwt/rtl8188eu_parrotv1.1$ cd lichee/ rootroot@cm-System-Product-Name:/home/wwt/rtl8188eu_parrotv1.1/lichee$ ./build.sh config Welcome to mkscript setup progress All available chips: 0. sun8iw5p1 Choice: 0 All available platforms: 0. android 1. dragonboard 2. linux 3. tina Choice: 0 All available kernel: 0. linux-3.4 Choice: 0 All available boards: 0. bell-one 1. evb 2. evb-20 3. evb-30 4. evb-rtl8723bs 5. sc3813r Choice: 3 rootroot@cm-System-Product-Name:/home/wwt/rtl8188eu_parrotv1.1/lichee$ cd linux-3.4/ rootroot@cm-System-Product-Name:/home/wwt/rtl8188eu_parrotv1.1/lichee/linux-3.4$ make ARCH=arm menuconfig Device Drivers ---> [*] Network device support ---> [*] Wireless LAN ---> (其它的可以全部关闭的!!!!) <M> Realtek 8188E USB WiFi 2、 Z:\home\wwt\rtl8188eu_parrotv1.1\android\device\softwinner\astar-evb30\BoardConfig.mk 关闭这里: #BOARD_WIFI_VENDOR := broadcom 打开这里: # wifi and bt configuration # 1. Wifi Configuration # 1.1 realtek wifi support # 1.1 realtek wifi configuration BOARD_WIFI_VENDOR := realtek ifeq ($(BOARD_WIFI_VENDOR), realtek) WPA_SUPPLICANT_VERSION := VER_0_8_X BOARD_WPA_SUPPLICANT_DRIVER := NL80211 BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_rtl BOARD_HOSTAPD_DRIVER := NL80211 BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_rtl SW_BOARD_USR_WIFI := rtl8188eu BOARD_WLAN_DEVICE := rtl8188eu #SW_BOARD_USR_WIFI := rtl8189es #BOARD_WLAN_DEVICE := rtl8189es #SW_BOARD_USR_WIFI := rtl8723bs #BOARD_WLAN_DEVICE := rtl8723bs endif 3、 Z:\home\wwt\rtl8188eu_parrotv1.1\android\device\softwinner\astar-evb30\init.sun8i.rc 关闭这里: #insmod /system/vendor/modules/bcm_btlpm.ko ## bluetooth # # UART device # chmod 0660 /dev/ttyS1 # chown bluetooth net_bt_stack /dev/ttyS1 # # # power up/down interface # chmod 0660 /sys/class/rfkill/rfkill0/state # chmod 0660 /sys/class/rfkill/rfkill0/type # chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state # chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type # write /sys/class/rfkill/rfkill0/state 0 # # # bluetooth LPM # chmod 0220 /proc/bluetooth/sleep/lpm # chmod 0220 /proc/bluetooth/sleep/btwrite # chown bluetooth net_bt_stack /proc/bluetooth/sleep/lpm # chown bluetooth net_bt_stack /proc/bluetooth/sleep/btwrite ## 2. broadcom wifi service ## 2.1 broadcom wifi station and softap #service wpa_supplicant /system/bin/wpa_supplicant \ # -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ # -I/system/etc/wifi/wpa_supplicant_overlay.conf \ # -O/data/misc/wifi/sockets \ # -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 # # we will start as root and wpa_supplicant will switch to user wifi # # after setting up the capabilities required for WEXT # # user wifi # # group wifi inet keystore # class main # socket wpa_wlan0 dgram 660 wifi wifi # disabled # oneshot # ## 2.2 broadcom wifi sta p2p concurrent service #service p2p_supplicant /system/bin/wpa_supplicant \ # -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ # -I/system/etc/wifi/wpa_supplicant_overlay.conf \ # -O/data/misc/wifi/sockets -N \ # -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \ # -I/system/etc/wifi/p2p_supplicant_overlay.conf \ # -puse_p2p_group_interface=1 -e/data/misc/wifi/entropy.bin \ # -g@android:wpa_wlan0 # # we will start as root and wpa_supplicant will switch to user wifi # # after setting up the capabilities required for WEXT # # user wifi # # group wifi inet keystore # class main # socket wpa_wlan0 dgram 660 wifi wifi # disabled # oneshot 打开这里: # 1. realtek & eagle wifi service # 1.1 realtek & eagle wifi sta service service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant \ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ -O/data/misc/wifi/sockets \ -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 # we will start as root and wpa_supplicant will switch to user wifi # after setting up the capabilities required for WEXT # user wifi # group wifi inet keystore class main socket wpa_wlan0 dgram 660 wifi wifi disabled oneshot # 1.2 realtek & eagle wifi sta p2p concurrent service service p2p_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant \ -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \ -e/data/misc/wifi/entropy.bin -N \ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ -O/data/misc/wifi/sockets \ -g@android:wpa_wlan0 class main socket wpa_wlan0 dgram 660 wifi wifi disabled oneshot #rtl8189es cob set macaddr #service engsetmacaddr /system/bin/setmacaddr /data/wifimac.txt # class main # oneshot 4、 Z:\home\wwt\rtl8188eu_parrotv1.1\android\device\softwinner\astar-evb30\astar_evb30.mk 关闭这里: # wifi features PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \ frameworks/native/data/etc/android.hardware.wifi.direct.xml:system/etc/permissions/android.hardware.wifi.direct.xml #frameworks/native/data/etc/android.hardware.bluetooth.xml:system/etc/permissions/android.hardware.bluetooth.xml \ #frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml # ap6181/6210/6330 sdio wifi fw and nvram #$(call inherit-product-if-exists, hardware/broadcom/wlan/firmware/ap6181/device-bcm.mk) #$(call inherit-product-if-exists, hardware/broadcom/wlan/firmware/ap6212/device-bcm.mk) #$(call inherit-product-if-exists, hardware/broadcom/wlan/firmware/ap6330/device-bcm.mk) #PRODUCT_PACKAGES += bt_vendor.conf \ # libbt-client-api \ # com.broadcom.bt \ # com.broadcom.bt.xml \ # com.dsi.ant.antradio_library \ # com.dsi.ant.antradio_library.xml \ # AntHalService \ # ANTRadioService PRODUCT_PACKAGES += com.dsi.ant.antradio_library \ com.dsi.ant.antradio_library.xml \ AntHalService \ ANTRadioService #PRODUCT_PACKAGES += Bluetooth 5、 Z:\home\wwt\rtl8188eu_parrotv1.1\android\device\softwinner\astar-evb30\overlay\frameworks\base\core\res\res\values\config.xml 关闭这里: <!-- List of regexpressions describing the interface (if any) that represent tetherable bluetooth interfaces. If the device doesn't want to support tethering over bluetooth this should be empty. --> <!-- default: disable Bluetooth PAN feature --> <string-array translatable="false" name="config_tether_bluetooth_regexs"> <item>"bt-pan"</item> </string-array> Z:\home\wwt\rtl8188eu_parrotv1.1\lichee\tools\pack\chips\sun8iw5p1\configs\evb-30\sys_config.fex 关闭这里: [wakeup_src_para] cpu_en = 0 cpu_freq = 48 ; (cpu:apb:ahb) pll_ratio = 0x111 dram_selfresh_en= 1 dram_freq = 36 wakeup_src_wl = port:PL07<4><default><default><0> ;wakeup_src_bt = port:PL09<4><default><default><0> bb_wake_ap = port:PL02<4><default><default><0> [usbc1] usb_used = 1 usb_drv_vbus_gpio = port:PD12<1><0><default><0> usb_restrict_gpio = usb_host_init_state = 0 usb_restric_flag = 0 usb_regulator_io = "nocare" usb_regulator_vol = 0 usb_not_suspend = 0 [rf_para] module_num = 3 module_power1 = "axp22_dldo1" module_power1_vol = 3300000 module_power2 = "axp22_dldo2" module_power2_vol = 3300000 module_power3 = "axp22_aldo1" module_power3_vol = 3300000 power_switch = chip_en = lpo_use_apclk = "losc_out" [bt_para] bt_used = 0 ;bt_uart_id = 1 ;bt_rst_n = port:PL08<1><default><default><0> ;bt_wake = port:PL10<1><default><default><0> ;bt_host_wake = port:PL09<4><default><default><0> ;bt_host_wake_invert = 0
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值