Difference between revisions of "Matrix - USB WiFi"

From FriendlyELEC WiKi
Jump to: navigation, search
Line 1: Line 1:
 
[[Matrix - USB WiFi/zh|查看中文]]
 
[[Matrix - USB WiFi/zh|查看中文]]
  
==介绍==
+
==Introduction==
* 注明:此方法同样适用于NanoPi M2。
+
* 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编译进内核。<br>
 
NanoPi 2 Fire使用的固件跟NanoPi 2通用,为了不跟NanoPi 2的SD WiFi产生冲突,内核缺省不编译USB WiFi。如果需要给NanoPi 2 Fire使用USB WiFi,可单独把USB WiFi编译进内核。<br>
 
由于市面上USB WiFi型号多达上百种,如果把全部USB WiFi驱动选上不太现实,所以这里只介绍一种的方法,其他USB WiFi型号 方法一样,可参看此处自行编译支持。
 
由于市面上USB WiFi型号多达上百种,如果把全部USB WiFi驱动选上不太现实,所以这里只介绍一种的方法,其他USB WiFi型号 方法一样,可参看此处自行编译支持。
Line 11: Line 11:
 
* 开始之前,需要先根据NanoPi 2 Fire的wiki:[[NanoPi_2_Fire/zh|NanoPi_2_Fire]],把启动卡做好。
 
* 开始之前,需要先根据NanoPi 2 Fire的wiki:[[NanoPi_2_Fire/zh|NanoPi_2_Fire]],把启动卡做好。
  
==下载内核源代码==
+
==Download Kernel Source Code==
  
根据维基教程把开发环境搭建好后,下载NanoPi 2 Fire的内核源代码:<br>
+
Please download the NanoPi 2 Fire's kernel source code:<br>
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
git clone https://github.com/friendlyarm/linux-3.4.y.git
 
git clone https://github.com/friendlyarm/linux-3.4.y.git
Line 19: Line 19:
 
git checkout nanopi2-lollipop-mr1
 
git checkout nanopi2-lollipop-mr1
 
</syntaxhighlight>
 
</syntaxhighlight>
NanoPi 2 Fire的内核所属的分支是nanopi2-lollipop-mr1,在开始编译前先切换分支。<br>
+
The NanoPi 2 Fire's kernel source code lies in the "nanopi2-lollipop-mr1" branch<br>
  
==增加USB WiFi支持==
+
==Add USB WiFi in Menuconfig==
修改配置内核配置,增加USB WiFi支持并编译:
+
Add the WIFI support in the kernel and compile
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
touch .scmversion
 
touch .scmversion
Line 39: Line 39:
 
make uImage
 
make uImage
 
</syntaxhighlight>
 
</syntaxhighlight>
编译成功结束后,新生成的内核烧写文件为 arch/arm/boot/uImage,此内核支持HDMI 720p输出,用于替换掉SD卡boot分区下的uImage.hdmi,拷贝完之后,执行sync命令确保拷贝成功。<br>
+
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.<br>
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
sync
 
sync

Revision as of 10:50, 9 March 2016

查看中文

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

如果要编译支持LCD显示的内核,则需要在此基础上修改内核配置:

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

启用LCD,同时取消HDMI,然后退出并保存配置,编译后即可获得支持LCD显示的uImage,用于替换SD卡boot分区下的uImage。

4 下载linux-firmware

将SD卡插入开发板,并接上网线,然后上电,执行以下步骤安装RT3070的固件:

apt-get update
apt-get install firmware-ralink

如果你使用的USB WiFi不是RT3070,你可以尝试安装所有固件即可:

apt-get install firmware-*

安装成功后,接上USB WiFi,板子即能识别到USB WiFi。