Matrix - USB WiFi

From FriendlyELEC WiKi
Revision as of 10:55, 9 March 2016 by Yftan (Talk | contribs) (下载linux-firmware)

Jump to: navigation, search

查看中文

1 Introduction

  • Note: the following method applies to NanoPi M2 too。

NanoPi 2 Fire使用的固件跟NanoPi 2通用,为了不跟NanoPi 2的SD WiFi产生冲突,内核缺省不编译USB WiFi。如果需要给NanoPi 2 Fire使用USB WiFi,可单独把USB WiFi编译进内核。
由于市面上USB WiFi型号多达上百种,如果把全部USB WiFi驱动选上不太现实,所以这里只介绍一种的方法,其他USB WiFi型号 方法一样,可参看此处自行编译支持。

  • 示例USB WiFi芯片:RT3070;
  • 无线标准: - IEEE 802.11b/g/n;
  • 操作系统:Debian;
  • 开始之前,需要先根据NanoPi 2 Fire的wiki:NanoPi_2_Fire,把启动卡做好。

2 Download Kernel Source Code

Please download the NanoPi 2 Fire's kernel source code:

git clone https://github.com/friendlyarm/linux-3.4.y.git
cd linux-3.4.y
git checkout nanopi2-lollipop-mr1

The NanoPi 2 Fire's kernel source code lies in the "nanopi2-lollipop-mr1" branch

3 Add USB WiFi in Menuconfig

Add the WIFI support in the kernel and compile

touch .scmversion
make nanopi2_linux_defconfig
make menuconfig
  [*] Networking support  -->                                 
      -*- Wireless  -->
          [*] Generic IEEE 802.11 Networking Stack (mac80211) 
  Device Drivers  -->
      [*] Network device support  -->                     
          [*] Wireless LAN  -->                                  
              [*] Ralink driver support  -->
                  [*] Ralink rt27xx/rt28xx/rt30xx (USB) support                  
                  [*]   rt2800usb - Include support for rt33xx devices
                  [*]   rt2800usb - Include support for rt35xx devices
make uImage

After your compilation succeeds a uImage will be generated in the "arch/arm/boot/uImage" directory. You can use it to replace the existing uImage.hdmi.

sync

If you want to generate a kernel for LCD you can do it this way:

touch .scmversion
make menuconfig
  Device Drivers -->
    Graphics support -->
      Nexell Graphics -->
        [*] LCD
        [ ] HDMI
mak uImage

After your compilation succeeds a uImage will be generated for LCD. You can use it to replace the existing uImage.

4 Download linux-firmware

Insert your SD card to the board, connect the board to the internet and run the following commands to install RT3070's firmware:

apt-get update
apt-get install firmware-ralink

If your USB WiFi is not based on RT3070 you may try installing all the firmwares:

apt-get install firmware-*

After your compilation succeeds plug a USB WiFi and you can play with it now