<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://www.itecfun.com/extern.php?action=feed&amp;tid=22&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[个人知识管理站 / 树莓派开发系列教程1——树莓派介绍]]></title>
		<link>http://www.itecfun.com/viewtopic.php?id=22</link>
		<description><![CDATA[树莓派开发系列教程1——树莓派介绍 最近发表的帖子。]]></description>
		<lastBuildDate>Thu, 29 Jan 2015 01:36:17 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: 树莓派开发系列教程1——树莓派介绍]]></title>
			<link>http://www.itecfun.com/viewtopic.php?pid=35#p35</link>
			<description><![CDATA[<p><span style="color: red"><strong>树莓派开发系列教程10——树莓派spi液晶屏支持(fbtft)</strong></span></p><p> </p><p><span style="color: red"><strong> 树莓派官方支持av及HDMI输出，板子上预留了一个csi接口的液晶显示屏，但是一直没有相应的模组出现。在很多应用场合我们需要一些小型的液晶屏显示一些基本的信息，所以小屏驱动很是必要。</strong></span></p><p><span style="color: red"><strong>&#160; &#160; 在github上有一个开源工程：notro/fbtft，完整的实现了framebuffer驱动，让树莓派完美支持tft液晶，下面对移植过程进行一个简单说明 </strong></span></p><p><span style="color: red"><strong>&#160; &#160; <br />&#160; &#160; 一、官网地址</strong></span></p><p><strong>工程首页：https://github.com/notro</strong></p><p><strong>fbtft源码：https://github.com/notro/fbtft</strong></p><p><strong>编译好的固件（基于3.12.25+）:https://github.com/notro/rpi-firmware</strong></p><p><strong>使用说明(wiki)：https://github.com/notro/fbtft/wiki</strong></p><p><span style="color: red"><strong> 二、使用编译好的固件(3.12.25+)</strong></span></p><p>环境：树莓派</p><p><a href="https://github.com/notro/rpi-firmware" rel="nofollow">https://github.com/notro/rpi-firmware</a></p><p><span style="color: blue"><strong> 1、打开SPI</strong></span><br />树莓派默认spi是关掉的，我们需要打开<br />sudo vi /etc/modprobe.d/raspi-blacklist.conf<br />把下面这句话前面的#号删掉<br />blacklist spi-bcm2708</p><p><span style="color: blue"><strong> 2、下载：</strong></span></p><p>1)以模块的形式编译进内核（需要手动或脚本加载模块）3.12.25+（<span style="color: rec"><strong>试验成功</strong></span>）<br />sudo REPO_URI=https://github.com/notro/rpi-firmware rpi-update</p><p>2)直接编译进内核（<span style="color: rec"><strong>笔者没有试验</strong></span>）<br />sudo REPO_URI=https://github.com/notro/rpi-firmware BRANCH=builtin rpi-update</p><p>3)以模块的形式编译进内核（<span style="color: rec"><strong>需要手动或脚本加载模块，最新版本，笔者试过启动不起来，不知道哪出问题</strong></span>）</p><p>sudo REPO_URI=https://github.com/notro/rpi-firmware BRANCH=latest rpi-update</p><p>4)直接下载压缩包，手动安装（<span style="color: rec"><strong>适合树莓派不能联网的时候</strong></span>）</p><p><a href="http://tronnes.org/downloads/2014-06-20-wheezy-raspbian-2014-07-25-fbtft-master-firmware.zip" rel="nofollow">http://tronnes.org/downloads/2014-06-20 … rmware.zip</a></p><p><span style="color: blue"><strong>3、配置 </strong></span></p><p><span style="color: blue"><strong>1)手动加载模块：</strong></span><br />sudo modprobe fbtft_device name=adafruit22</p><p>&#160; &#160; name后面的名字，要跟相应的液晶驱动芯片移植<br />&#160; &#160; 笔者使用的液晶芯片为：<span style="color: rec"><strong>fb_ra8875，所以这里写的是：er_tftm050_2</strong></span><br />&#160; &#160; 其它芯片请查阅：https://github.com/notro/fbtft/blob/master/fbtft_device.c 文件</p><p>正常会提示以下信息</p><p>fbtft_device:&#160; SPI devices registered:<br />&#160; &#160;fbtft_device:&#160; &#160; &#160; spidev spi0.0 500kHz 8 bits mode=0x00<br />&#160; &#160;fbtft_device:&#160; &#160; &#160; spidev spi0.1 500kHz 8 bits mode=0x00<br />&#160; &#160;fbtft_device:&#160; &#039;fb&#039; Platform devices registered:<br />&#160; &#160;fbtft_device:&#160; &#160; &#160; bcm2708_fb id=-1 pdata? no<br />&#160; &#160;fbtft_device: Deleting spi0.0<br />&#160; &#160;fbtft_device:&#160; GPIOS used by &#039;adafruit22&#039;:<br />&#160; &#160;fbtft_device:&#160; &#160; &#039;reset&#039; = GPIO25<br />&#160; &#160;fbtft_device:&#160; &#160; &#039;led&#039; = GPIO23<br />&#160; &#160;fbtft_device:&#160; SPI devices registered:<br />&#160; &#160;fbtft_device:&#160; &#160; &#160; spidev spi0.1 500kHz 8 bits mode=0x00<br />&#160; &#160;fbtft_device:&#160; &#160; &#160; fb_hx8340bn spi0.0 32000kHz 8 bits mode=0x00<br />&#160; &#160;graphics fb1: fb_hx8340bn frame buffer, 176x220, 75 KiB video memory, 16 KiB buffer memory, fps=20, spi0.0 at 32 MHz</p><p><span style="color: rec"><strong>在/dev/目录下出现: /dev/fb1设备</strong></span></p><p><span style="color: blue"><strong>2）自动加载模块</strong></span><br />sudo vi&#160; /etc/modules<br />加入以下语句，既可以在启动时自动加载模块</p><p>spi-bcm2708<br />fbtft_device name=er_tftm050_2&#160; speed=28000000 fps=25 verbose=0<br />红色部分根据实际情况调整，可能出现花屏现象</p><p><span style="color: blue"><strong>4、使用（官方给出的方法，笔者测试不成功）</strong></span></p><p><span style="color: blue"><strong>1)手动启动x11和控制台到新的液晶屏</strong></span><br />X Windows显示在fb1上：<br />$FRAMEBUFFER=/dev/fb1 startx</p><p>Console显示在fb1上：&#160; <br />$con2fbmap 1 1</p><p><span style="color: blue"><strong>2)自动登陆x11</strong></span></p><p>sudo vi /etc/inittab<br />&#160; &#160; #1:2345:respawn:/sbin/getty --noclear 38400 tty1<br />&#160; &#160; 1:2345:respawn:/bin/login -f pi tty1 &lt;/dev/tty1 &gt;/dev/tty1 2&gt;&amp;1</p><p>sudo vi /etc/rc.local<br />&#160; &#160; su -l pi -c &quot;env FRAMEBUFFER=/dev/fb1 startx &amp;&quot;</p><p><span style="color: blue"><strong>5、使用（笔者使用这个测试通过）</strong></span></p><p><span style="color: blue"><strong>1)将fb0上的内容直接拷贝到fb1上,fb0和fb1同步</strong></span></p><p><strong><a href="https://github.com/notro/fbtft/wiki/Framebuffer-use#framebuffer-mirroring" rel="nofollow">https://github.com/notro/fbtft/wiki/Fra … -mirroring</a></strong></p><p>$git clone <a href="https://github.com/tasanakorn/rpi-fbcp" rel="nofollow">https://github.com/tasanakorn/rpi-fbcp</a><br />$cd rpi-fbcp/<br />$mkdir build<br />$cd build/<br />$cmake ..<br />$make<br />$sudo install fbcp /usr/local/bin/fbcp</p><p><span style="color: blue"><strong><br />启动：fbcp &amp;<br />关闭fbcp：killall fbcp</strong></span></p><p><span style="color: blue"><strong>2)启动时使用fb1</strong></span></p><p>$sudo apt-get install xserver-xorg-video-fbdev</p><p>$sudo vi /usr/share/X11/xorg.conf.d/99-fbdev.conf<br />加入以下语句：<br />Section &quot;Device&quot;&#160; <br />&#160; Identifier &quot;myfb&quot;<br />&#160; Driver &quot;fbdev&quot;<br />&#160; Option &quot;fbdev&quot; &quot;/dev/fb1&quot;<br />EndSection</p><p><span style="color: blue"><strong><br />启动：startx</strong></span></p><p><span style="color: blue"><strong>测试：</strong></span><br />apt-get -y install fbi<br />fbi -d /dev/fb1 -T 1 -noverbose -a test.jpg</p><p><span style="color: red"><strong>三、由内核及源码编译</strong></span><br /><span style="color: blue"><strong>1、下载、编译内核源码：<br />请见</strong></span>《<span style="color: red"><strong>树莓派开发系列教程8——树莓派内核编译与固件升级》</strong></span></p><p><span style="color: blue"><strong>2、下载、编译fbtft源码</strong></span><br />$cd linux(<span style="color: blue"><strong>进入下载好的内核源码目录</strong></span>)<br />$cd drivers/video<br />$git clone <a href="https://github.com/notro/fbtft.git（" rel="nofollow">https://github.com/notro/fbtft.git（</a><span style="color: blue"><strong>下载fbtft源码，也可以在别的地方下载好，拷贝过来）<br />&#160; &#160;修改内核源码的Kconfig及Makefine</strong></span><br />&#160; Add to drivers/video/Kconfig:&#160; &#160;source &quot;drivers/video/fbtft/Kconfig&quot;<br />&#160; Add to drivers/video/Makefile:&#160; obj-y += fbtft/<br />$make menuconfig(在配置界面加入所选用液晶的驱动支持)</p><div class="codebox"><pre><code>[plain] view plaincopy
 Device Drivers  ---&gt;   
 Graphics support  ---&gt;   
&lt;M&gt; Support for small TFT LCD display modules  ---&gt;  
  
&lt;M&gt;   FB driver for the HX8353D LCD Controller  
&lt;M&gt;   FB driver for the ILI9320 LCD Controller                                                 
&lt;M&gt;   FB driver for the ILI9325 LCD Controller                                   
&lt;M&gt;   FB driver for the ILI9340 LCD Controller                                     
&lt;M&gt;   FB driver for the ILI9341 LCD Controller                              
&lt; &gt;     FB driver for the ILI9481 LCD Controller                                             
&lt;M&gt;   FB driver for the ILI9486 LCD Controller                                         
&lt;M&gt;   FB driver for the PCD8544 LCD Controller                                       
&lt;M&gt;   FB driver for the RA8875 LCD Controller  </code></pre></div><p>$make<br />请见《树莓派开发系列教程8——树莓派内核编译与固件升级》</p>]]></description>
			<author><![CDATA[dummy@example.com (xuyg)]]></author>
			<pubDate>Thu, 29 Jan 2015 01:36:17 +0000</pubDate>
			<guid>http://www.itecfun.com/viewtopic.php?pid=35#p35</guid>
		</item>
		<item>
			<title><![CDATA[Re: 树莓派开发系列教程1——树莓派介绍]]></title>
			<link>http://www.itecfun.com/viewtopic.php?pid=34#p34</link>
			<description><![CDATA[<p><span style="color: red"><strong>树莓派开发系列教程9——树莓派GPIO控制</strong></span></p><p> </p><p><span style="color: red"><strong>一、常用开源工程简介</strong></span><br />树莓派内核中已经编译自带了gpio的驱动，我们常通过一些第三方写好的库函数来完成具体的操作，比较常见的操作库函数有：<br /><span style="color: blue"><strong>1、python GPIO</strong></span><br />&#160; &#160; 【开发语言】——python<br />&#160; &#160; 【简单介绍】——树莓派官方资料中推荐且容易上手。python GPIO是一个小型的python库，可以帮助用户完成raspberry相关IO口操作，但是python GPIO库还没有支持SPI、I2C或者1-wire等总线接口。<br />&#160; &#160; 【官方网站】—— <a href="https://code.google.com/p/raspberry-gpio-python/" rel="nofollow">https://code.google.com/p/raspberry-gpio-python/</a></p><p><span style="color: blue"><strong>2、wiringPi</strong></span><br />&#160; &#160; 【开发语言】——C语言<br />&#160; &#160; 【简单介绍】——wiringPi适合那些具有C语言基础，在接触树莓派之前已经接触过单片机或者嵌入式开发的人群。wiringPi的API函数和arduino非常相似，这也使得它广受欢迎。作者给出了大量的说明和示例代码，这些示例代码也包括UART设备，I2C设备和SPI设备等。<br />&#160; &#160; 【官方网站】——<a href="http://wiringpi.com/" rel="nofollow">http://wiringpi.com/</a></p><p><span style="color: blue"><strong>3、BCM2835 C Library</strong></span><br />&#160; &#160; 【开发语言】——C语言<br />&#160; &#160; 【简单介绍】BCM2835 C Library可以理解为使用C语言实现的相关底层驱动，BCM2835 C Library的驱动库包括GPIO、SPI和UART等，可以通过学习BCM2835 C Library熟悉BCM2835相关的寄存器操作。如果有机会开发树莓派上的linux驱动，或自主开发python或PHP扩展驱动，可以从BCM2835 C Library找到不少的“灵感”。<br />&#160; &#160; 【官方网站】——<a href="http://www.airspayce.com/mikem/bcm2835/" rel="nofollow">http://www.airspayce.com/mikem/bcm2835/</a></p><p><span style="color: red"><strong>二、树莓派GPIO编号方式</strong></span><br /><span style="color: blue"><strong>1、功能物理引脚：</strong></span><br />从左到右，从上到下：左边基数，右边偶数：1-40<br /><span style="color: blue"><strong>2、BCM:</strong></span><br />编号侧重CPU寄存器，根据BCM2835的GPIO寄存器编号。<br /><span style="color: blue"><strong>3、wpi：</strong></span><br />&#160; 编号侧重实现逻辑，把扩展GPIO端口从0开始编号，这种编号方便编程。正如图3 WiringPi一栏。<br /><span class="postimg"><img src="http://www.itecfun.com/img/tec/rpi/20140926150759750.jpg" alt="20140926150759750.jpg" /></span></p><p><span style="color: red"><strong>三、python GPIO</strong></span><br /><span style="color: blue"><strong>1、先安装python-dev，输入以下指令。</strong></span><br />&#160; sudo apt-get install python-dev</p><p><span style="color: blue"><strong>2、安装RPi.GPIO，依次输入以下指令。</strong></span><br />1)下载：$ wget <a href="http://raspberry-gpio-python.googlecode.com/files/RPi.GPIO-0.5.3a.tar.gz" rel="nofollow">http://raspberry-gpio-python.googlecode … .3a.tar.gz</a><br />2)解压缩：$ tar xvzf RPi.GPIO-0.5.3a.tar.gz<br />3)进入解压之后的目录 ：$ cd RPi.GPIO-0.5.3a<br />4)启动安装 ：$ sudo python setup.py install</p><p><span style="color: blue"><strong>3、例子：</strong></span><br />[python] view plaincopy在CODE上查看代码片派生到我的代码片</p><div class="codebox"><pre><code># -*- coding: utf-8 -*-    
 import RPi.GPIO as GPIO    
 import time    
 # BOARD编号方式，基于插座引脚编号    
 GPIO.setmode(GPIO.BOARD)    
 # 输出模式    
 GPIO.setup(11, GPIO.OUT)    
     
 while True:    
     GPIO.output(11, GPIO.HIGH)    
     time.sleep(1)    
     GPIO.output(11, GPIO.LOW)    
     time.sleep(1)   </code></pre></div><p><span style="color: blue"><strong>4、执行：</strong></span><br />sudo python led.py</p><p><span style="color: blue"><strong>5、说明：</strong></span><br />1)GPIO.setmode(GPIO.BOARD)，采用插座引脚编号方式。<br />2)由于采用插座引脚编号方式，此处的11脚相当于BCM2835寄存器编号方式的引脚11。</p><p><span style="color: red"><strong>四、python GPIO</strong></span><br /><span style="color: blue"><strong>1、说明：</strong></span><br />&#160; &#160; WiringPi是应用于树莓派平台的GPIO控制库函数，WiringPi遵守GUN Lv3。wiringPi使用C或者C++开发并且可以被其他语言包转，例如python、ruby或者PHP等。<br />&#160; &#160; wiringPi包括一套gpio控制命令，使用gpio命令可以控制树莓派GPIO管脚。用户可以利用gpio命令通过shell脚本控制或查询GPIO管脚。wiringPi是可以扩展的，可以利用wiringPi的内部模块扩展模拟量输入芯片，可以使用MCP23x17/MCP23x08（I2C 或者SPI）扩展GPIO接口。另外可通过树莓派上的串口和Atmega（例如arduino等）扩展更多的GPIO功能。另外，用户可以自己编写扩展模块并把自定义的扩展模块集成到wiringPi中。WiringPi支持模拟量的读取和设置功能，不过在树莓派上并没有模拟量设备。但是使用WiringPi中的软件模块却可以轻松地应用AD或DA芯片。</p><p><span style="color: blue"><strong>2.wiringPi安装</strong></span></p><p><strong>1)方案A——使用GIT工具</strong><br />通过GIT获得wiringPi的源代码<br />git clone git://git.drogon.net/wiringPi<br />cd wiringPi<br />./build<br />build脚本会帮助你编译和安装wiringPi</p><p><strong>2)方案B——直接下载</strong><br />我们可以在https://git.drogon.net/?p=wiringPi;a=summary网站上直接下载最新版本编译使用<br />tar xfz wiringPi-xx.tar.gz<br />cd wiringPi-xx<br />./build</p><p><span style="color: blue"><strong>3、测试：</strong></span><br />wiringPi包括一套gpio命令，使用gpio命令可以控制树莓派上的各种接口，通过以下指令可以测试wiringPi是否安装成功。<br /><strong>$gpio -v<br />$gpio readall<br /></strong><br />即可出现上面的io图</p><p><span style="color: blue"><strong>4、例子：</strong></span><br />[cpp] view plaincopy在CODE上查看代码片派生到我的代码片</p><div class="codebox"><pre><code>#include &lt;wiringPi.h&gt;    
int main(void)    
{    
  wiringPiSetup() ;    
  pinMode (0, OUTPUT) ;    
  for(;;)     
  {    
    digitalWrite(0, HIGH) ; delay (500) ;    
    digitalWrite(0,  LOW) ; delay (500) ;    
  }    
}   </code></pre></div><p><span style="color: blue"><strong>5、编译运行：</strong></span><br />在树莓派上:<br />gcc -Wall -o test test.c -lwiringPi <br />sudo ./test</p><p>在虚拟机中：<br />am-linux-gcc -Wall -o test test.c -lwiringPi <br />sudo ./test</p><p><span style="color: blue"><strong>6、注意事项：</strong></span><br />1）IO的编号方式略有不同，采用wiring编码方式。<br />2）-lwiringPi表示动态加载wiringPi共享库。</p><p><span style="color: red"><strong>五、BCM2835 C Library</strong></span></p><p><span style="color: blue"><strong>1、下载</strong></span>:$ wget <a href="http://www.airspayce.com/mikem/bcm2835/bcm2835-1.35.tar.gz" rel="nofollow">http://www.airspayce.com/mikem/bcm2835/ … .35.tar.gz</a><br /><span style="color: blue"><strong>2、解压缩</strong></span>:$tar xvzf bcm2835-1.35.tar.gz<br /><span style="color: blue"><strong>3、进入压缩之后的目录:</strong></span>$cd bcm2835-1.35<br /><span style="color: blue"><strong>4、 配置:</strong></span>$./configure<br /><span style="color: blue"><strong>5、从源代码生成安装包:</strong></span>$make<br /><span style="color: blue"><strong>6、执行检查:</strong></span>$sudo make check<br /><span style="color: blue"><strong>7、安装 bcm2835库:</strong></span>$sudo make install</p><p><span style="color: blue"><strong>8、例子</strong></span><br />[cpp] view plaincopy在CODE上查看代码片派生到我的代码片</p><div class="codebox"><pre><code>#include &lt;bcm2835.h&gt;    
    
// P1插座第11脚    
#define PIN RPI_GPIO_P1_11    
    
int main(int argc, char **argv)    
{    
  if (!bcm2835_init())    
  return 1;    
    
  // 输出方式    
  bcm2835_gpio_fsel(PIN, BCM2835_GPIO_FSEL_OUTP);    
    
  while (1)    
  {    
    bcm2835_gpio_write(PIN, HIGH);    
    bcm2835_delay(100);    
        
    bcm2835_gpio_write(PIN, LOW);    
    bcm2835_delay(100);    
  }    
  bcm2835_close();    
  return 0;    
}   </code></pre></div><p><span style="color: blue"><strong>9、注意事项：</strong></span><br />1）IO的编号方式略有不同，采用wiring编码方式。<br />2）-lwiringPi表示动态加载wiringPi共享库。</p><p><span style="color: red"><strong>六、文章参考以下链接</strong></span></p><p><strong><a href="http://elinux.org/RPi_Low-level_peripherals" rel="nofollow">http://elinux.org/RPi_Low-level_peripherals</a></strong><br /><strong><a href="http://blog.csdn.net/xukai871105/article/details/23115627" rel="nofollow">http://blog.csdn.net/xukai871105/articl … s/23115627</a></strong></p>]]></description>
			<author><![CDATA[dummy@example.com (xuyg)]]></author>
			<pubDate>Thu, 29 Jan 2015 01:26:09 +0000</pubDate>
			<guid>http://www.itecfun.com/viewtopic.php?pid=34#p34</guid>
		</item>
		<item>
			<title><![CDATA[Re: 树莓派开发系列教程1——树莓派介绍]]></title>
			<link>http://www.itecfun.com/viewtopic.php?pid=33#p33</link>
			<description><![CDATA[<p><span style="color: red"><strong>树莓派开发系列教程8——树莓派内核编译与固件升级</strong></span></p><p><span style="color: blue"><strong><br />前面我们已经使用官方给的镜像搭建好了树莓派的开发环境，可以说已经可以上手应用了，但是如果官方提供的内核有些功能不能满足我们的需要或者需要对内核进行部分裁剪，那么就需要对树莓派的内核进行裁剪，这里我们教一下大家如何更新树莓派内核</strong></span></p><p><span style="color: red"><strong>1、获取升级所需源码</strong></span></p><p><span style="color: blue"><strong>1)下载地址：</strong></span><br />官方网址：https://github.com/raspberrypi<br />上面列出了树莓派所有的开源软件：<br />1.<span style="color: blue"><strong>firmware:树莓派的交叉编译好的二进制内核、模块、库、bootloader</strong></span><br />2.<span style="color: blue"><strong>linux:内核源码</strong></span><br />3.<span style="color: blue"><strong>tools:编译内核和其他源码所需的工具——交叉编译器等</strong></span><br /><strong>我们只需要以上三个文件即可，下面的工程可以了解一下</strong><br />1.<strong>documentation</strong>:树莓派离线帮助文档，教你如何使用、部署树莓派（树莓派官方使用教程）<br />2.<strong>userland</strong>：arm端用户空间的一些应用库的源码——vc视频硬浮点、EGL、mmal、openVG等<br />3.<strong>hats：Hardware Attached on Top</strong>，树莓派 B+型板子的扩展板资料<br />4.<strong>maynard</strong>：一个gtk写成的桌面环境<br />5.<strong>scratch</strong>：一个简易、可视化编程环境<br />6.<strong>noobs</strong>:一个树莓派镜像管理工具，他可以让你在一个树莓派上部署多个镜像<br />7.<strong>weston</strong>：一个应用程序<br />8.<strong>target_fs</strong>：树莓派最小文件系统，使用busybox制作<br />9.<strong>quake3</strong>：雷神之锤3有线开发源码firmwareb<br /><span style="color: blue"><strong>2)下载方法：</strong></span><br /><strong>a、网页直接下载：</strong><br /><span class="postimg"><img src="http://www.itecfun.com/img/tec/rpi/20140905111626593.jpg" alt="20140905111626593.jpg" /></span></p><p><strong><br />点到所需要下载的工程，左上角选版本，右方有一个download ZIP按钮可直接下载（笔者下载完成后，在linux中解压提示出错，windows又非常慢切内核建议不要在windows环境解压，所以笔者不建议使用这种办法）</strong></p><p><strong>b、使用git下载<br />$ mkdir raspeberrypi_src<br />$ cd raspberrypi_src<br />$ git clone git://github.com/raspberrypi/firmware.git<br />$ git clone git://github.com/raspberrypi/linux.git<br />$ git clone git://github.com/raspberrypi/tools.git<br /></strong><br />会得到三个文件夹：<br /><span style="color: blue"><strong>firmware linux tools</strong></span></p><p><span style="color: red"><strong>2、编译、提取内核及其模块</strong></span></p><p><span style="color: blue"><strong>1)获得内核配置文件</strong></span><br />在运行的树莓派中运行：<br /><strong>$ls /proc/</strong><br />可看到一个叫config.gz的文件，他是当前的树莓派配置选项记录文件，我们将他拷出，放入我们的内核源码目录树下</p><p><strong>$cp /proc/config /home/pi</strong><br />我们这里使用前面交过的samba拷出并拷入内核源码目录下，不熟悉的人可参考前面文章</p><p>在linux内核源码下执行：<br /><strong>$zcat config.gz &gt; .config</strong><br /><span class="postimg"><img src="http://www.itecfun.com/img/tec/rpi/20140905112808348.jpg" alt="20140905112808348.jpg" /></span></p><br /><p><span style="color: blue"><strong>2)配置、编译内核<br />a、修改内核源码makefile ARCH类型和编译器路径</strong></span><br /><strong>$vi Makefile +195</strong><br />找到以上类似代码，改为如图所示<br /><span class="postimg"><img src="http://www.itecfun.com/img/tec/rpi/20140905113120182.jpg" alt="20140905113120182.jpg" /></span></p><p><span style="color: blue"><strong>b、查看、修改配置选项</strong></span><br /><strong>$make menuconfig</strong><br />可出现以下界面<br /><span class="postimg"><img src="http://www.itecfun.com/img/tec/rpi/20140905113600280.jpg" alt="20140905113600280.jpg" /></span></p><p><strong>如果不做修改，直接选中exit即可（注意使用键盘操作）</strong></p><p><span style="color: blue"><strong>c、编译内核镜像</strong></span><br /><strong>$make</strong><br />在arch/arm/boot目录下可以看到一个叫zImage的文件，就是我们新的内核</p><p>但是树莓派需要另外一种格式的镜像，需要进行处理一下，执行以下命令<br /><strong>$cd tools/mkimage</strong></p><p><strong>$./imagetool-uncompressed.py ../../linux/arch/arm/boot/zImage</strong><br />即可在当前文件夹下看到一个叫：kernel.img的文件，就是我们需要的新内核了</p><p><span style="color: blue"><strong>d、提取modules</strong></span><br />上一步其实不但编译出来了内核的源码，一些模块文件也编译出来了，这里我们提取一下<br /><strong><br />$cd raspberrypi_src<br />$mkdir modules<br />$cd linux<br />$ make modules_install INSTALL_MOD_PATH=../modules</strong><br />即可在modules得到我们需要的模块文件</p><p><span style="color: red"><strong>2、升级RPi的kernel、Firmware、lib</strong></span><br />将SD卡拔下插在电脑上（可使用读卡器）<br /><span style="color: blue"><strong>1)升级内核</strong></span><br />将新编好的内核拷入SD卡，改名为：kernel_new.img<br />打开boot目录下<br />找到config.txt文件，加入：kernel=kernel_new.img这一行</p><p><span style="color: blue"><strong>2）升级boot</strong></span><br />将firmware/boot/目录下 以下文件拷入SD卡boot目录：fbootcode.bin fixup.dat fixup_cd.dat start.elf</p><p><span style="color: blue"><strong>3)更新vc库及内核modules</strong></span><br />将第3步d步中编译出来的modules/lib/modules拷入树莓派文件系统/lib下</p>]]></description>
			<author><![CDATA[dummy@example.com (xuyg)]]></author>
			<pubDate>Thu, 29 Jan 2015 01:11:03 +0000</pubDate>
			<guid>http://www.itecfun.com/viewtopic.php?pid=33#p33</guid>
		</item>
		<item>
			<title><![CDATA[Re: 树莓派开发系列教程1——树莓派介绍]]></title>
			<link>http://www.itecfun.com/viewtopic.php?pid=32#p32</link>
			<description><![CDATA[<p><span style="color: red"><strong>树莓派开发系列教程7——树莓派做web服务器(nginx、Apache)</strong></span></p><br /><p><span style="color: blue"><strong>一想到Linux Web服务器，我们首先想到的是：</strong></span><br /><span style="color: red"><strong>Apache + MySql + Php．</strong></span><br /><strong>Apache:</strong>是世界使用排名第一的Web服务器软件。<br />可以运行在几乎所有广泛使用的计算机平台上，由于其跨平台和安全性被广泛使用，是最流行的Web服务器端软件.<br /><strong>MySQL</strong>:是一个关系型数据库管理系统，由瑞典MySQL AB公司开发。是最流行的关系型数据库管理系统，在WEB应用方面MySQL是最好的RDBMS(关系数据库管理系统)应用软件之一。<br /><strong>PHP</strong>:（外文名: Hypertext Preprocessor，中文名：“超文本预处理器”）是一种通用开源脚本语言。语法吸收了C语言、Java和Perl的特点，易于学习，使用广泛，主要适用于Web开发领域。</p><p><span style="color: blue"><strong>树莓派可以安装这个LAMP系列，但Apache 和 MySql对于树莓派这个小小的机器，太重了，主要是消耗内存多＼速度慢＼占用磁盘大(约200M吧)，所可以选择安装一个轻量级的Web服务器：</strong></span><br /><span style="color: red"><strong>nginx + php + sqlite</strong></span><br /><strong>nginx</strong>:是个轻量级的Web服务器，是一款轻量级的Web 服务器/反向代理服务器及电子邮件（IMAP/POP3）代理服务器,上nginx的并发能力确实在同类型的网页服务器中表现较好。<br /><strong>SQLite</strong>:<br />是一款轻型的数据库，是遵守ACID的关系型数据库管理系统，它的设计目标是嵌入式的，而且目前已经在很多嵌入式产品中使用了它，它占用资源非常的低，在嵌入式设备中，可能只需要几百K的内存就够了。<br /><span style="color: red"><strong>Apache + MySql + Php．</strong></span><br /><span style="color: blue"><strong>1、安装Apache</strong></span><br />Apache可以用下面的命令来安装<br />sudo apt-get install apache2<br />Apache默认路径是/var/www/<br />其配置文件路径为： /etc/apache2/<br />可以通过：sudo vi /etc/apache2/ports.conf修改监听端口号<br />重启服务生效：sudo service apache2 restart</p><p><span style="color: blue"><strong>2、安装mysql</strong></span><br />sudo apt-get install mysql-server<br />安装过程中，会出现一个提示符让你输入一个密码。<br />这个密码是mysql root用户的密码。</p><p><span style="color: blue"><strong>3、安装PHP</strong></span><br />输入下面的命令，就可以安装PHP 5,以及PHP访问mysql数据库所需要的库。<br />sudo apt-get install php5<br />sudo apt-get install php5-mysql</p><p><span style="color: blue"><strong>4、测试</strong></span><br />安装完成后，可以在浏览器中输入你路由器的IP或域名，就可以访问你的网站了。<br />你应该能看到一个页面显示“It works”，但是没有其它内容。<br />创建一个/var/www/index.php</p><div class="codebox"><pre><code>[php] view plaincopy
&lt;?php  
  print &lt;&lt;&lt; EOT  
&lt;!doctype html&gt;  
&lt;html lang=&quot;en&quot;&gt;  
&lt;head&gt;  
&lt;meta charset=&quot;UTF-8&quot;&gt;  
&lt;title&gt;Test successful&lt;/title&gt;  
&lt;/head&gt;  
&lt;body&gt;  
&lt;h1&gt;Test successful&lt;/h1&gt;  
&lt;p&gt;Congratulations.&lt;/p&gt;  
&lt;p&gt;Your webserver and PHP are working.&lt;/p&gt;  
&lt;/body&gt;  
&lt;/html&gt;  
EOT;  
  
?&gt;  </code></pre></div><br /><p><span style="color: red"><strong>二、nginx + php + sqlite</strong></span><br /><span style="color: blue"><strong>1、安装nginx&#160; web服务器 (约6MB)</strong></span><br />sudo apt-get install nginx</p><p><span style="color: blue"><strong>2、启动nginx</strong></span><br />sudo /etc/init.d/nginx start<br />nginx的www根目录默认在 /usr/share/nginx/www中</p><p><span style="color: blue"><strong>3、修改nginx的配置文件</strong></span><br />sudo vi /etc/nginx/sites-available/default</p><p><span style="color: blue"><strong>1)以下几个选项注意一下：</strong></span><br />listen&#160; &#160;8080;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;## listen for ipv4; this line is default and implied<br />//监听的端口号，如果与其它软件冲突，可以在这里更改<br />root /usr/share/nginx/www;<br />//nginx 默认路径html所在路径<br />index index.html index.htm index.php;<br />//nginx默认寻找的网页类型，我们可以增加一个index.php</p><p><span style="color: blue"><strong>2)PHP脚本支持（不设这几项PHP脚本无法识别）</strong></span><br />找到php的定义段，将这些行的注释去掉 ，修改后内容如下<br />location ~ .php$ {<br /> fastcgi_pass unix:/var/run/php5-fpm.sock;<br /> fastcgi_index index.php;<br /> include fastcgi_params;<br />}</p><p>php段中有一些其它定义，不要去动它，比如：<br />#&#160; &#160; &#160; fastcgi_split_path_info ...<br />#&#160; &#160; &#160; fastcgi_pass 127.0.0.1:9000<br /><span style="color: blue"><strong>4)安装php和sqlite(约3MB)</strong></span><br />sudo apt-get install php5-fpm php5-sqlite</p><p><span style="color: blue"><strong>5)重新加载nginx的配置</strong></span><br />sudo /etc/init.d/nginx reload</p><p><span style="color: blue"><strong>6)测试html</strong></span><br />通过主机的IE访问树莓派，可以看到主页(表示Web服务器已正常启动)</p><p><span style="color: blue"><strong>7)测试php</strong></span><br />在树莓派中生成一php文件<br />sudo vi /usr/share/nginx/www/index.php<br />在文件中输入以下内容<br />[php] view plaincopy在CODE上查看代码片派生到我的代码片</p><div class="codebox"><pre><code>&lt;?php  
  print &lt;&lt;&lt; EOT  
&lt;!doctype html&gt;  
&lt;html lang=&quot;en&quot;&gt;  
&lt;head&gt;  
&lt;meta charset=&quot;UTF-8&quot;&gt;  
&lt;title&gt;Test successful&lt;/title&gt;  
&lt;/head&gt;  
&lt;body&gt;  
&lt;h1&gt;Test successful&lt;/h1&gt;  
&lt;p&gt;Congratulations.&lt;/p&gt;  
&lt;p&gt;Your webserver and PHP are working.&lt;/p&gt;  
&lt;/body&gt;  
&lt;/html&gt;  
EOT;  
  
?&gt;  </code></pre></div><p>存盘退出</p><p>IE访问一下这一页，说明php也是OK的</p>]]></description>
			<author><![CDATA[dummy@example.com (xuyg)]]></author>
			<pubDate>Thu, 29 Jan 2015 00:58:23 +0000</pubDate>
			<guid>http://www.itecfun.com/viewtopic.php?pid=32#p32</guid>
		</item>
		<item>
			<title><![CDATA[Re: 树莓派开发系列教程1——树莓派介绍]]></title>
			<link>http://www.itecfun.com/viewtopic.php?pid=30#p30</link>
			<description><![CDATA[<p><span style="color: red"><strong>树莓派开发系列教程6——树莓派做wifi热点 </strong></span></p><p><span style="color: blue"><strong>原理：Pi使用有线连入网络，然后接USB无线网卡作为热点，提供Wifi接入。</strong></span></p><p><span style="color: red"><strong>1、USB无线网卡驱动</strong></span><br />如果接上USB无线网卡，使用ifconfig命令，能直接看到wlan0，那么恭喜你，可以直接跳过这一步。<br />如果没有请查询一下树莓派支持的USB无线网卡型号，可参考以下网址：<br /><a href="http://elinux.org/RPi_VerifiedPeripherals#USB_Wi-Fi_Adapters" rel="nofollow">http://elinux.org/RPi_VerifiedPeriphera … i_Adapters</a></p><p><span style="color: red"><strong>2、修改wlan0为静态IP</strong></span><br /><span style="color: blue"><strong>相当于设置路由器lan口IP,即我们访问路由器通常使用的:192.168.1.1<br />sudo vim /etc/network/interfaces </strong></span><br />把原来关于wlan0的注释掉：（可能跟这个不一样，跟wlan0有关的注释掉即可）<br />#auto wlan0<br />#iface wlan0 inet dhcp<br />#wpa-ssid &quot;360WiFi-li&quot;<br />#wpa-psk &quot;xiaolizi&quot;<br />添加下面的：<br />iface wlan0 inet static<br />address 192.168.0.1<br />netmask 255.255.255.0<br />gateway 192.168.0.1<br /><span style="color: blue"><strong>完成之后需要重启</strong></span><br /><span style="color: red"><strong>3、安装hostapd</strong></span><br /><span style="color: blue"><strong>官方的hostapd不支持8188CUS，后面需要重新卸载安装新的 <br />笔者测试貌似这里必须先装旧的，然后后面卸了装新的，否则也不能用</strong></span><br />sudo apt-get install hostapd<br /><span style="color: blue"><strong>1）编辑hostapd 默认配置文件：</strong></span><br />sudo vim /etc/default/hostapd<br />找到#DAEMON_CONF= &quot;&quot;，修改为：<br />DAEMON_CONF=&quot;/etc/hostapd/hostapd.conf&quot;<br /><span style="color: blue"><strong>2）然后编辑：sudo vim /etc/hostapd/hostapd.conf</strong></span><br />增加以下代码：</p><div class="codebox"><pre><code>[ruby] view plaincopy
# Basic configuration  
  
interface=wlan0  
ssid=raspberrywifi  
channel=1  
#bridge=br0  
  
# WPA and WPA2 configuration  
  
macaddr_acl=0  
auth_algs=1  
ignore_broadcast_ssid=0  
wpa=3  
wpa_passphrase=12345678  
wpa_key_mgmt=WPA-PSK  
wpa_pairwise=TKIP  
rsn_pairwise=CCMP  
  
# Hardware configuration  
  
driver=rtl871xdrv  
ieee80211n=1  
hw_mode=g  
device_name=RTL8192CU  
manufacturer=Realtek  </code></pre></div><p>修改wifi名和密码<br />ssid=raspberrywifi<br />wpa_passphrase=12345678<br /><span style="color: blue"><strong>3）保存退出，然后重启服务：</strong></span><br />sudo service hostapd restart<br />或者执行以下命令生效<br />sudo hostapd -dd /etc/hostapd/hostapd.conf<br /><span style="color: blue"><strong>4）如果你使用的网卡提示一下信息</strong></span><br />Configuration file: /etc/hostapd/hostapd.conf<br />nl80211: &#039;nl80211&#039; generic netlink not found<br />Failed to initialize driver &#039;nl80211&#039;<br />rmdir[ctrl_interface]: No such file or directory<br />那么，还是要使用第三方的hostapd。</p><p><span style="color: red"><strong>4、安装新的hostapd</strong></span><br /><span style="color: blue"><strong>1)删除原来的hostapd（笔者测试，不卸载貌似也行）</strong></span><br />sudo apt-get autoremove hostapd<br /><span style="color: blue"><strong>2)下载第三方驱动并安装</strong></span><br />wget <a href="https://github.com/jenssegers/RTL8188-hostapd/archive/v1.1.tar.gz" rel="nofollow">https://github.com/jenssegers/RTL8188-h … 1.1.tar.gz</a><br />tar -zxvf v1.1.tar.gz<br /><span style="color: blue"><strong>3)编译：</strong></span><br />cd RTL8188-hostapd-1.1/hostapd<br />sudo make<br />sudo make install<br /><span style="color: blue"><strong>4)然后再重启服务，应该提示成功：</strong></span><br />$ sudo service hostapd restart<br />[ ok ] Stopping advanced IEEE 802.11 management: hostapd.<br />[ ok ] Starting advanced IEEE 802.11 management: hostapd.<br /><span style="color: blue"><strong>5)将hostapd加入开机自启动</strong></span><br />sudo service hostapd start<br />sudo update-rc.d hostapd enable</p><p><span style="color: blue"><strong>笔者这里提示的还是失败，但是重启后网络确实建立成功，用手机可以搜到这个网络</strong></span></p><p><span style="color: red"><strong>5、安装DHCP服务</strong></span><br />以上步骤建立起了wifi热点，但是无法自动获取ip，需要以下步骤<br />sudo apt-get install udhcpd<br /><span style="color: blue"><strong>1)编辑配置文件：</strong></span><br />sudo vim /etc/udhcpd.conf //修改以下信息，start和end是重点，注意跟第一步的静态ip在一个网段<br />start 192.168.0.20<br />end 192.168.0.200<br />interface wlan0<br /><span style="color: blue"><strong>2)接下来编辑/etc/default/udhcpd并且将下面这行注释掉，以使DHCP Server正常工作：</strong></span><br />#DHCPD_ENABLED=&quot;no&quot;<br /><span style="color: blue"><strong>3)启动dhcp服务器</strong></span><br />sudo service udhcpd start<br />sudo update-rc.d udhcpd enable<br />经过此步手机已经可以接入wifi网络，并且自动获取ip</p><p><span style="color: red"><strong>6、配置路由转发</strong></span><br />理论上是经过这一步，手机可以通过共享树莓派的无线网络上网了，但是笔者一直没有成功<br /><span style="color: blue"><strong>1)设置路由映射规则</strong></span><br />sudo iptables -F<br />sudo iptables -X<br />sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE<br />sudo iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT<br />sudo iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT<br />sudo bash -c iptables-save &gt; /etc/iptables.up.rules<br /><span style="color: blue"><strong>2)编辑：sudo vim /etc/network/if-pre-up.d/iptables</strong></span><br />添加下面两行代码：<br />#!/bin/bash<br />/sbin/iptables-restore &lt; /etc/iptables.up.rules<br />保存退出，然后修改iptables权限：<br />sudo chmod 755 /etc/network/if-pre-up.d/iptables<br /><span style="color: blue"><strong>4)开起内核转发：</strong></span><br />sudo vim /etc/sysctl.conf<br />&#160; 找到下面两行：<br />#Uncomment the next line to enable packet forwarding for IPv4<br />#net.ipv4.ip_forward=1<br />把net.ipv4.ip_forward 前面的#去掉，保存退出。<br />&#160; 然后:sudo sysctl -p</p><p><span style="color: red"><strong>7、其它问题</strong></span><br />最近经常发现无线网卡配置的DHCP不能发挥作用，经过排查发现给无线网卡指定的静态IP失败了，也就是说无线网卡没有IP导致DHCP无法工作，将/etc/default/ifplugd的内容修改配置如下：<br />INTERFACES=&quot;eth0&quot;<br />HOTPLUG_INTERFACES=&quot;eth0&quot;<br />ARGS=&quot;-q -f -u0 -d10 -w -I&quot;<br />SUSPEND_ACTION=&quot;stop&quot;</p>]]></description>
			<author><![CDATA[dummy@example.com (xuyg)]]></author>
			<pubDate>Wed, 28 Jan 2015 10:21:46 +0000</pubDate>
			<guid>http://www.itecfun.com/viewtopic.php?pid=30#p30</guid>
		</item>
		<item>
			<title><![CDATA[Re: 树莓派开发系列教程1——树莓派介绍]]></title>
			<link>http://www.itecfun.com/viewtopic.php?pid=29#p29</link>
			<description><![CDATA[<p><strong>树莓派开发系列教程5——树莓派常用软件及服务(vi、远程桌面、ssh、samba、u盘)</strong></p><p><span style="color: red"><strong>1、更新vim</strong></span><br />树莓派自带的vim不是很好用，比如默认不支持小键盘及方向键等，我们可以更新一下<br />sudo apt-get install vim</p><p><span style="color: red"><strong>2、使用远程桌面</strong></span><br />通过windows自带的远程桌面软件，可以远程访问树莓派桌面应用<br />sudo apt-get install xrdp<br /><span class="postimg"><img src="http://www.itecfun.com/img/tec/rpi/20140825114856311.jpg" alt="20140825114856311.jpg" /></span><br /><span class="postimg"><img src="http://www.itecfun.com/img/tec/rpi/20140825114902286.jpg" alt="20140825114902286.jpg" /></span><br /><span class="postimg"><img src="http://www.itecfun.com/img/tec/rpi/20140825114915281.jpg" alt="20140825114915281.jpg" /></span></p><p><span style="color: red"><strong>3、ssh</strong></span><br />ssh服务默认已经安装完毕<br />只需要安装一个ssh客户端即可，笔者推荐xshell4.0(Xmanage4.0的一个组件)<br />host填入:开发板ip即可<br />用户名、密码同串口登陆一致（默认：pi、raspberry）<br /><span class="postimg"><img src="http://www.itecfun.com/img/tec/rpi/20140825115812062.jpg" alt="20140825115812062.jpg" /></span></p><br /><p><span style="color: red"><strong>4、使用samba</strong></span><br />通过samba服务，可以自由、访问修改树莓派家目录下的文件、代码</p><p><span style="color: blue"><strong>1)首先安装 samba：</strong></span><br />sudo apt-get install samba samba-common-bin</p><p><span style="color: blue"><strong>2)然后修改配置文件：</strong></span><br />sudo vi /etc/samba/smb.conf</p><p>下面的配置是让用户可以访问自己的 home 目录。<br />a)开启用户认证，找到“##### Authentication #####”，将“#&#160; security = user ”的井号去掉。<br />b)配置用户可以读写自己的 home 目录，在“[homes]”节中，把 “read only = yes” 改为 “read only = no” <br />c)找到browseable=no改为yes 否则等会访问时此文件夹会隐藏</p><p><span style="color: blue"><strong>3)重启samba服务：</strong></span><br />sudo /etc/init.d/samba restart</p><p><span style="color: blue"><strong>4)把系统默认用户pi添加到samba ：</strong></span><br />sudo smbpasswd -a pi<br />会提示你输入密码：建议跟串口登陆的密码一致，防止密码太多弄混了</p><p><span style="color: blue"><strong>5)windows访问</strong></span><br />任意打开一个文件浏览器，输入ip地址:\\172.20.223.91\pi<br />现在就可以从其它机器上访问 pi 这个用户的 home 目录了。<br /><span class="postimg"><img src="http://www.itecfun.com/img/tec/rpi/20140825120506415.jpg" alt="20140825120506415.jpg" /></span></p><br /><p><span style="color: red"><strong>5、挂载U盘</strong></span><br />当需要大容量外接存储设备时，可使用U盘挂载<br />通常我们在 /mnt 或 /media 目录下新建一个目录作为挂载点。比如：</p><p>sudo mkdir /mnt/udisk</p><p><span style="color: blue"><strong>1)手动挂挂载：</strong></span><br />挂载命令：<br />sudo mount -o uid=pi,gid=pi /dev/sda1 /mnt/udisk</p><p>用完之后卸载<br />sudo umount /mnt/1GB_USB_flash</p><p>注意：<br />sda1 是取决于你的实际情况，a表示第一个硬盘，1表示第一个分区。<br />FAT 格式U盘 mount 本身就能支持，但如果你的U盘或移动硬盘使用的是 exFAT 格式，mount 会说不支持。没关系，安装 exfat-fuse 软件之后 mount 就支持了。<br />sudo apt-get install exfat-fuse</p><p><span style="color: blue"><strong>2)开机挂载：</strong></span><br />如果想开机自动挂载，而不是每次手工执行，可以编辑 /etc/fstab 文件。在末尾添加一行：<br />/dev/sda1 /mnt/udisk vfat rw,defaults 0 0<br />每次开机就会自动挂载</p><p><span style="color: blue"><strong>3)热插挂载<br />需要希望想电脑一样，插上自动识别挂载在某一目录下，拔下自动umount，请按一下操作<br />sudo vi /etc/udev/rules.d/10-usbstorage.rules(此文件默认没有，需要新建)<br />赋值以下内容即可，会自动在/mnt/udisk目录下挂载U盘</strong></span></p><div class="codebox"><pre><code>[ruby] view plaincopy
KERNEL!=&quot;sd*&quot;, GOTO=&quot;media_by_label_auto_mount_end&quot;  
SUBSYSTEM!=&quot;block&quot;,GOTO=&quot;media_by_label_auto_mount_end&quot;  
IMPORT{program}=&quot;/sbin/blkid -o udev -p %N&quot;  
ENV{ID_FS_TYPE}==&quot;&quot;, GOTO=&quot;media_by_label_auto_mount_end&quot;  
ENV{ID_FS_LABEL}!=&quot;&quot;, ENV{dir_name}=&quot;%E{ID_FS_LABEL}&quot;  
ENV{ID_FS_LABEL}==&quot;&quot;, ENV{dir_name}=&quot;Untitled-%k&quot;  
ACTION==&quot;add&quot;, ENV{mount_options}=&quot;relatime,sync&quot;  
ACTION==&quot;add&quot;, ENV{ID_FS_TYPE}==&quot;vfat&quot;, ENV{mount_options}=&quot;iocharset=utf8,umaskk  
=000&quot;  
ACTION==&quot;add&quot;, ENV{ID_FS_TYPE}==&quot;ntfs&quot;, ENV{mount_options}=&quot;iocharset=utf8,umaskk  
=000&quot;  
ACTION==&quot;add&quot;, RUN+=&quot;/bin/mkdir -p /mnt/udisk/&quot;, RUN+=&quot;/bin/mount -o $env{mount__  
options} /dev/%k /mnt/udisk/&quot;  
  
ACTION==&quot;remove&quot;, ENV{dir_name}!=&quot;&quot;, RUN+=&quot;/bin/umount -l /mnt/udisk/}&quot;, RUN+=&quot;//  
bin/rmdir /mnt/udisk/&quot;  
LABEL=&quot;media_by_label_auto_mount_end&quot;  </code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (xuyg)]]></author>
			<pubDate>Wed, 28 Jan 2015 10:01:23 +0000</pubDate>
			<guid>http://www.itecfun.com/viewtopic.php?pid=29#p29</guid>
		</item>
		<item>
			<title><![CDATA[Re: 树莓派开发系列教程1——树莓派介绍]]></title>
			<link>http://www.itecfun.com/viewtopic.php?pid=28#p28</link>
			<description><![CDATA[<p><strong>树莓派开发系列教程4——树莓派网络与更新配置（有线、无线）</strong></p><p><span style="color: blue"><strong>莓派的使用无法离开网络，如果没有网络，建议大家洗洗睡吧，没有网路就不要玩树莓派了~</strong></span></p><p><span style="color: red"><strong>1、有线网络：</strong></span><br />&#160; &#160; 1)自动获取IP:树莓派默认有线网卡是使能的，只需将网线插入树莓派网卡，即可自动获得IP(要求在局域网内)<br />&#160; &#160; 2)手动设定IP:如果是电脑与树莓派直连，不能自动获得IP，可以使用：ifconfig eth0 192.168.1.123设定ip(下次重启就没了)<br />&#160; &#160; 3)设置静态IP：如果担心在同网络情况下ip或者不固定，可以讲电脑设置为静态ip，方法如下：<br />&#160; &#160; 在终端中打开一下文件：<br />sudo vi&#160; /etc/network/interfaces(需要学习VI基本操作，树莓派自带的vi不是很好用，请先参考下面文档更新一下vi）<br />auto lo<br />iface lo inet loopback<br /><strong> iface eth0 inet dhcp</strong></p><p>讲以上内容改为：<br />auto lo<br />iface lo inet loopback<br /><strong><br />iface eth0 inet static<br />address 192.168.1.1<br />netmask 255.255.255.0<br />gateway 192.168.1.1 </strong> </p><p><span style="color: blue"><strong>2、无线网络</strong></span><br />&#160; &#160; <strong>有线网络需要受到网线的限制，现在无线网络已经非常的普及，通过一个无线网卡与无线路由器链接起来岂不是更加无拘无束，下面介绍一下无线网络的配置。</strong></p><p><span style="color: blue"><strong>1)无线网卡驱动的确认</strong></span><br />树莓派内置了很多无线网卡的驱动，大家可以在这个网站查找所支持的型号<br /><a href="http://elinux.org/RPi_VerifiedPeripherals#USB_Wi-Fi_Adapters" rel="nofollow">http://elinux.org/RPi_VerifiedPeriphera … i_Adapters</a> <br />笔者手里面有一个:8188CUS(网卡芯片)的验证支持<br /><span style="color: blue"><strong>验证方法：</strong></span><br />将USB无线网卡插入树莓派USB接口（旧版系统会自动重启，新版不会），敲入：<br />$lsusb：<br />lsusb<br />Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.<br />Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.<br />Bus 001 Device 004: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter<br />或者敲入：<br />$ifconfig:<br />wlan0&#160; Link encap:Ethernet&#160; HWaddr 00:0b:81:87:e5:f9&#160; <br />&#160; &#160; &#160; &#160; &#160; UP BROADCAST MULTICAST&#160; MTU:1500&#160; Metric:1<br />&#160; &#160; &#160; &#160; &#160; RX packets:0 errors:0 dropped:3 overruns:0 frame:0<br />&#160; &#160; &#160; &#160; &#160; TX packets:0 errors:0 dropped:0 overruns:0 carrier:0<br />&#160; &#160; &#160; &#160; &#160; collisions:0 txqueuelen:1000 <br />&#160; &#160; &#160; &#160; &#160; RX bytes:0 (0.0 B)&#160; TX bytes:0 (0.0 B)<br />说明树莓派支持你的无线网卡，可进行下一步设置</p><p><span style="color: blue"><strong>2)无线网卡的配置</strong></span><br />使用vi打开以下文件进行修改：<br />auto lo<br />iface lo inet loopback<br />iface eth0 inet dhcp<br /><strong> auto wlan0<br />allow-hotplug wlan0<br />iface wlan0 inet dhcp<br />wpa-ssid &quot;360WiFi&quot;<br />wpa-psk &quot;hellworld&quot;<br />#wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf </strong> <br />重启即可连入:网络名为360WIFI，密码为helloworld的网络，<br />如果想要设置为静态ip，类似有线网卡，修改相应代码即可</p><p><span style="color: blue"><strong>3、更新源测试：</strong></span><br />有线或者无线网络连通过，我们后面对软件更新是，需要首先进行更新列表更新，执行以下命令即可：<br /><span style="color: blue"><strong>sudo apt-get update</strong></span><br />Get:1 <a href="http://raspberrypi.collabora.com" rel="nofollow">http://raspberrypi.collabora.com</a> wheezy Release.gpg [836 B]&#160; &#160; &#160; &#160; &#160; &#160; &#160; <br />Get:2 <a href="http://archive.raspberrypi.org" rel="nofollow">http://archive.raspberrypi.org</a> wheezy Release.gpg [490 B]&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <br />Get:3 <a href="http://raspberrypi.collabora.com" rel="nofollow">http://raspberrypi.collabora.com</a> wheezy Release [7,532 B]&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <br />Get:4 <a href="http://mirrordirector.raspbian.org" rel="nofollow">http://mirrordirector.raspbian.org</a> wheezy Release.gpg [490 B]&#160; &#160; &#160; &#160; &#160; &#160; <br />Get:5 <a href="http://mirrordirector.raspbian.org" rel="nofollow">http://mirrordirector.raspbian.org</a> wheezy Release [14.4 kB]&#160; &#160; &#160; &#160; &#160; &#160; &#160; <br />Get:6 <a href="http://raspberrypi.collabora.com" rel="nofollow">http://raspberrypi.collabora.com</a> wheezy/rpi armhf Packages [2,214 B]&#160; &#160; &#160;<br />Get:7 <a href="http://archive.raspberrypi.org" rel="nofollow">http://archive.raspberrypi.org</a> wheezy Release [7,263 B]&#160; &#160;<br />....<br />Ign <a href="http://mirrordirector.raspbian.org" rel="nofollow">http://mirrordirector.raspbian.org</a> wheezy/rpi Translation-en_GB<br />Ign <a href="http://mirrordirector.raspbian.org" rel="nofollow">http://mirrordirector.raspbian.org</a> wheezy/rpi Translation-en<br />Fetched 6,992 kB in 1min 12s (96.6 kB/s)&#160; &#160; &#160; <br />Reading package lists... Done</p><p><span style="color: blue"><strong>改变更新源：</strong></span><br />笔者测试这个默认的网址还是挺快的，网络上有人建议改变更新源为国内的（我没发现快多少，大家根据自己网络选择）：<br />sudo vi /etc/apt/sources.list<br />将默认的用#号屏蔽，改为<br /><strong><br />deb <a href="http://mirrors.ustc.edu.cn/raspbian/raspbian/" rel="nofollow">http://mirrors.ustc.edu.cn/raspbian/raspbian/</a>&#160; &#160;wheezy main contrib non-free rpi<br />或者<br />deb <a href="http://mirror.nus.edu.sg/raspbian/raspbian" rel="nofollow">http://mirror.nus.edu.sg/raspbian/raspbian</a> wheezy main contrib non-free rpi&#160; &#160;</strong></p><p>或者用以下地址代替上面的地址栏</p><p>中山大学<br />Raspbian <a href="http://mirror.sysu.edu.cn/raspbian/raspbian/" rel="nofollow">http://mirror.sysu.edu.cn/raspbian/raspbian/</a></p><p>中国科学技术大学<br />Raspbian <a href="http://mirrors.ustc.edu.cn/raspbian/raspbian/" rel="nofollow">http://mirrors.ustc.edu.cn/raspbian/raspbian/</a></p><p>清华大学<br />Raspbian <a href="http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/" rel="nofollow">http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/</a></p><p>华中科技大学<br />Raspbian <a href="http://mirrors.hustunique.com/raspbian/raspbian/" rel="nofollow">http://mirrors.hustunique.com/raspbian/raspbian/</a><br />Arch Linux ARM <a href="http://mirrors.hustunique.com/archlinuxarm/" rel="nofollow">http://mirrors.hustunique.com/archlinuxarm/</a><br />大连东软信息学院源（北方用户）<br />Raspbian <a href="http://mirrors.neusoft.edu.cn/raspbian/raspbian" rel="nofollow">http://mirrors.neusoft.edu.cn/raspbian/raspbian</a></p>]]></description>
			<author><![CDATA[dummy@example.com (xuyg)]]></author>
			<pubDate>Wed, 28 Jan 2015 09:50:37 +0000</pubDate>
			<guid>http://www.itecfun.com/viewtopic.php?pid=28#p28</guid>
		</item>
		<item>
			<title><![CDATA[Re: 树莓派开发系列教程1——树莓派介绍]]></title>
			<link>http://www.itecfun.com/viewtopic.php?pid=27#p27</link>
			<description><![CDATA[<p><strong>树莓派开发系列教程3——树莓派rasp-config配置</strong></p><p><span style="color: blue"><strong>经过前面两步我们的树莓派已经正常的工作起来了，但是在真正用它开发之前还需要进行一些列的配置以及软件的安装，这样开发起来才会得心应手，下面我们介绍一下常用的软件和服务</strong></span></p><p><span style="color: red"><strong>1、配置选项：</strong></span><br />&#160; &#160; 树莓派第一次使用的时候需要进行一个简单的配置，在命令行模式下运行以下命令：<br />&#160; &#160; $sudo raspi-config<br />新旧版本的配置界面不太一样，下面列举两种比较常见的：<br /><span style="color: blue"><strong>1)旧版本</strong></span><br /><span class="postimg"><img src="http://img.blog.csdn.net/20140825093006484?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQveGR3MTk4NTgyOQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="Center" /></span><br /><strong>expand_rootfs </strong>–将根分区扩展到整张SD卡（树莓派默认不使用SD卡的全部空间，有一部分保留，建议选中）<br /><strong>overscan</strong>–可以扩充或缩小屏幕（旧版不能自适应屏幕，新版没有这个选项，貌似可以自适应，没仔细研究）<br />configure_keyboard&#160; - 键盘配置界面<br /><strong>change_pass</strong> – 默认的用户名是pi，密码是raspberry，用ssh远程连接或串口登录时要用到这个用户名和密码，这里可以更改密码。<br /><strong>change_locale </strong>– 更改语言设置。在Locales to be generated: 中，选择en_US.UTF-8和zh_CN.UTF-8。在Default locale for the system environment:中，选择en_US.UTF-8（等启动完机器，装完中文字体，再改回zh_CN.UTF-8，否则第一次启动会出现方块）。<br /><strong>change_timezone</strong> –因为树莓派没有内部时钟，是通过网络获取的时间，选择Asia – Shanghai。<br /><strong>memory_split</strong> –配置给桌面显示的显存。<br /><strong>ssh</strong> – 是否激活sshd服务。<br /><strong>boot_behaviour</strong> – 设置启动时启动图形界面，正常肯定是Yes。<br /><span style="color: blue"><strong>2）新版本（比较新的镜像大部分是这个界面，做了不少改变）</strong></span><br /><span class="postimg"><img src="http://img.blog.csdn.net/20140825094150425?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQveGR3MTk4NTgyOQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="Center" /></span><br /><strong>1 Expand Filesystem&#160; 扩展文件系统（同旧版）。</strong><br /><strong>2 Change User Password&#160; 改变默认pi用户的密码，按回车后输入pi用户的新密码。</strong><br /><strong>3 Enable Boot to Desktop/Scratch 启动时进入的环境选择</strong><br />&#160; Console Text console, requiring login(default)<br />&#160; &#160; 启动时进入字符控制台，需要进行登录（默认项）。<br />&#160; Desktop log in as user &#039;pi&#039; at the graphical desktop<br />&#160; &#160; 启动时进入LXDE图形界面的桌面。<br />&#160; Scratch Start the Scratch programming environment upon boot<br />&#160; &#160; 启动时进入Scratch编程环境。<br /><strong>4 Internationalisation Options&#160; 国际化选项，可以更改默认语言</strong><br />&#160; I1 Change Locale<br />&#160; &#160; &#160;语言和区域设置，建议不要改，默认英文就好。想改中文，最好选安装了中文字体再进行这步，安装中文字体的方法：<br />&#160; &#160; &#160;sudo apt-get update<br />&#160; &#160; &#160;sudo apt-get install ttf-wqy-zenhei ttf-wqy-microhei<br />&#160; &#160; &#160;移动到屏幕底部，用空格键选中zh-CN GB2312,zh-CN GB18030,zh-CN UTF-8,然后按回车，然后默认语言选中zh-cn然后回车<br />&#160; I2 Change Timezone<br />&#160; &#160; &#160;设置时区，如果不进行设置，PI的时间就显示不正常。选择Asia（亚洲）再选择Chongqing（重庆）即可。<br />&#160; I3 Change Keyboard Layout<br />&#160; &#160; &#160; 改变键盘布局<br /><strong>5 Enable Camera</strong><br />&#160; &#160; &#160; 启动PI的摄像头模块，如果想启用，选择Enable，禁用选择Disable就行了<br /><strong>6 Add to Rastrack</strong><br />&#160; &#160; &#160; 把你的PI的地理位置添加到一个全世界开启此选项的地图，建议还是不要开了，免得被跟踪。<br /><strong>7 Overclock</strong><br />&#160; None 不超频，运行在700Mhz，核心频率250Mhz，内存频率400Mhz，不增加电压<br />&#160; Modest 适度超频，运行在800Mhz，核心频率250Mhz，内存频率400Mhz，不增加电压<br />&#160; Medium 中度超频，运行在900Mhz，核心频率250Mhz，内存频率450Mhz，增加电压2<br />&#160; High 高度超频，运行在950Mhz，核心频率250Mhz，内存频率450Mhz，增加电压6<br />&#160; Turbo 终极超频，运行在1000Mhz，核心频率500Mhz，内存频率600Mhz，增加电压6<br /><strong>8 Advanced Options&#160; 高级设置</strong><br />&#160; A1 Overscan&#160; &#160;是否让屏幕内容全屏显示<br />&#160; A2 Hostname&#160; &#160;在网上邻居或者路由器能看到的主机名称<br />&#160; A3 Memory Split 内存分配，选择给GPU多少内存<br />&#160; A4 SSH 是否运行SSH登录，建议开户此选项，以后操作PI方便，有网络就行，不用开屏幕了。<br />&#160; A5 SPI 是否默认启动SPI内核驱动，新手就不用管了。<br />&#160; A6 Audio 选择声音默认输出到模拟口还是HDMI口<br />&#160; &#160; 0 Auto 自动选择<br />&#160; &#160; 1 Force 3.5mm (&#039;headphone&#039;) jack强制输出到3.5mm模拟口<br />&#160; &#160; 2 Force HDMI 强制输出到HDMI<br />&#160; A7 Update 把raspi-config这个工具自动升级到最新版本<br /><strong>9 About raspi-config 关于raspi-config的信息。</strong></p><p><span style="color: red"><strong>配置完成后确认会重启系统，选项即可生效</strong></span></p>]]></description>
			<author><![CDATA[dummy@example.com (xuyg)]]></author>
			<pubDate>Wed, 28 Jan 2015 09:43:35 +0000</pubDate>
			<guid>http://www.itecfun.com/viewtopic.php?pid=27#p27</guid>
		</item>
		<item>
			<title><![CDATA[Re: 树莓派开发系列教程1——树莓派介绍]]></title>
			<link>http://www.itecfun.com/viewtopic.php?pid=26#p26</link>
			<description><![CDATA[<p><strong>树莓派开发系列教程2——树莓派上手使用</strong></p><p><span style="color: red"><strong>1、树莓派启动方式及支持的系统：</strong></span><br /><span style="color: blue"><strong>树莓派开发板没有配置板载FLASH，因为它支持SD卡启动，所有我们需要下载相应镜像，并将其烧写在SD上，启动系统即可<br />(这个镜像里包含了我们通常所说的bootloader、kernel、文件系统)</strong></span><br />树莓派由于其开源特性，支持非常多的系统类型（指的文件系统）：<br />Raspbian、Arch Linux ARM、Debian Squeeze、Firefox OS、Gentoo Linux<br />Google Chrome OS、Raspberry Pi Fedora Remix、Slackware ARM<br />QtonPi、Slackware ARM、WebOS、RISC OS、FreeBSD<br />NetBSD、Android 4.0(Ice Cream Sandwich)</p><p>详细介绍请看维基百科：http://zh.wikipedia.org/wiki/%E6%A0%91%E8%8E%93%E6%B4%BE</p><p><span style="color: red"><strong>2、树莓派镜像下载地址</strong></span><br /><a href="http://www.raspberrypi.org/" rel="nofollow">http://www.raspberrypi.org/</a>&#160; <br />官网（速度较慢）<br /><a href="http://pan.baidu.com/share/home?uk=671504480#category/type=0" rel="nofollow">http://pan.baidu.com/share/home?uk=6715 … ory/type=0</a>&#160; <br />树莓派论坛提供的下载地址 （百度网盘速度较快）<br />建议下载：wheezy-raspbian <br />笔者更新时，最新版本为：2014.6.20(B+版建议使用此版本，笔者将旧版烧入B+版中貌似网卡及USB驱动不能识别)</p><p><span style="color: red"><strong>3、镜像烧写:</strong></span><br /><span style="color: blue"><strong>准备：</strong></span><br />1)一张2G以上的SD卡及读卡器，最好是高速卡，推荐Class4以上的卡，卡的速度直接影响树莓派的运行速度<br />&#160; &#160;笔者建议最好4G以上，否则后续开发会使用经常不够用</p><p>2)winXP和win7下安装镜像的工具：Win32DiskImager.zip<br />&#160; &#160;同样在上一步的网址下载</p><p>3)上一步下载好的镜像</p><p><span style="color: blue"><strong>安装：</strong></span><br />1)解压下载的系统压缩文件，得到img镜像文件</p><p>2)将SD使用卡托或者读卡器后，连上电脑</p><p>3)解压并运行win32diskimager工具</p><br /><br /><p>4)在软件中选择img文件，“Device”下选择SD的盘符，然后选择“Write”<br />然后就开始安装系统了，根据你的SD速度，安装过程有快有慢。</p><p>5)安装结束后会弹出完成对话框，说明安装就完成了，如果不成功，请关闭防火墙一类的软件，重新插入SD进行安装<br />&#160; &#160; &#160;请注意安装完，win系统下看到SD只有74MB了，这是正常现象，因为linux下的分区win下是看不到的！</p><p><span style="color: red"><strong>4、开发板供电：</strong></span><br />树莓派开发板有两种供电方式：<br />1)使用micro usb供电：所有android手机的充电线都可以给他供电<br />2)外接电源直接供电：B型（B+型）GPIO 左上角的2、4管角为电源正极，6管角为地</p><br /><br /><br /><p><span style="color: red"><strong>5、树莓派访问方式</strong></span><br /><span style="color: blue"><strong>1)初始启动：</strong></span><br /><span style="color: blue"><strong>a、外接HDMI或者AV显示器，USB鼠标、键盘</strong></span><br />&#160; &#160; 把树莓派当作一个小电脑，可以用外接键盘、鼠标操作树莓派，树莓派启动界面会显示在HDMI或者AV显示器上<br />笔者不太建议这种启动方式——抱着个显示、鼠标键盘太不方便了，而且带HDMI的显示器不好找<br />（虽然可以用HDMI转VGA接在电脑显示器上代替）</p><br /><p><span style="color: blue"><strong>b、使用USB转ttl 串口线通过串口访问树莓派</strong></span><br />&#160; &#160; &#160;树莓派默认支持串口启动，我们只需要一根：usb转ttl线（淘宝上很多，10几块钱一根）连接树莓派与电脑，即可通过串口控制调试树莓派（电脑上使用超级终端或者其它串口调试工具，笔者建议使用Xshell4.0）<br />&#160; &#160; &#160;树莓派串口连接口请见下图中所示</p><br /><p>在终端中会显示类似启动信息，如下：<br />中间会提示输出用户名和密码：<br /><span style="color: blue"><strong>默认用户名：pi</strong></span><br /><span style="color: blue"><strong>默认密码：raspberry</strong></span><br />octopi login: pi<br />Password: <br />Last login: Fri Jun 20 09:32:38 UTC 2014 on ttyAMA0<br />Linux octopi 3.12.22+ #691 PREEMPT Wed Jun 18 18:29:58 BST 2014 armv6l</p><p>The programs included with the Debian GNU/Linux system are free software;<br />the exact distribution terms for each program are described in the<br />individual files in /usr/share/doc/*/copyright.</p><p>Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent<br />permitted by applicable law.</p><p>NOTICE: the software on this Raspberry Pi has not been fully configured. Please run &#039;sudo raspi-config&#039;<br />pi@octopi:~$ </p><p><span style="color: blue"><strong>2)其它访问方式：</strong></span><br /><span style="color: blue"><strong>SSH：</strong></span><br />由于树莓派只有一个串口，当我们开发中需要占用这个串口或者我们希望进行远程开发（通过一个根网线或无线连接到树莓派）<br />可以借助Linux系统特有的一种服务SSH来完成（请见后面的文章）<br /><span style="color: blue"><strong>VNC：</strong></span><br />VNC是linux下面常用的远程桌面，用它可以在windows或者unix主机上方便的通过网络操作远程主机而不需要一个额外的显示器，非常实用（请见后面的文章）<br /><span style="color: blue"><strong>远程桌面：</strong></span><br />远程桌面是windows自带的一个远程桌面登陆系统，很好用（请见后面的文章）</p><p>以上三种方式都是通过网络对树莓派进行控制，可以说只要知道了树莓派的ip地址，一切控制so easy</p>]]></description>
			<author><![CDATA[dummy@example.com (xuyg)]]></author>
			<pubDate>Wed, 28 Jan 2015 09:36:43 +0000</pubDate>
			<guid>http://www.itecfun.com/viewtopic.php?pid=26#p26</guid>
		</item>
		<item>
			<title><![CDATA[Re: 树莓派开发系列教程1——树莓派介绍]]></title>
			<link>http://www.itecfun.com/viewtopic.php?pid=25#p25</link>
			<description><![CDATA[<p>源地址：http://blog.csdn.net/xdw1985829/article/details/38779437</p>]]></description>
			<author><![CDATA[dummy@example.com (xuyg)]]></author>
			<pubDate>Wed, 28 Jan 2015 09:26:32 +0000</pubDate>
			<guid>http://www.itecfun.com/viewtopic.php?pid=25#p25</guid>
		</item>
		<item>
			<title><![CDATA[树莓派开发系列教程1——树莓派介绍]]></title>
			<link>http://www.itecfun.com/viewtopic.php?pid=24#p24</link>
			<description><![CDATA[<p><span style="color: red"><strong>1、树莓派是什么？</strong></span><br />&#160; &#160; &#160; &#160; Raspberry Pi(中文名为“树莓派”,简写为RPi，或者RasPi/RPi)是为学生计算机编程教育而设计，只有信用卡 大小的卡片式电脑，其系统基于Linux。<br />&#160; &#160; &#160; &#160; 树莓派由注册于英国的慈善组织“Raspberry Pi 基金会”开发，Eben·Upton/埃·厄普顿为项目带头人。2012年3月，英国剑桥大学埃本·阿普顿（Eben Epton）正式发售世界上最小的台式机，又称卡片式电脑，外形只有信用卡大小，却具有电脑的所有基本功能，这就是Raspberry Pi电脑板，中文译名&quot;树莓派&quot;！这一基金会以提升学校计算机科学及相关学科的教育，让计算机变得有趣为宗旨。基金会期望这 一款电脑无论是在发展中国家还是在发达国家，会有更多的其它应用不断被开发出来，并应用到更多领域。</p><p>一句话：树莓派是一个卡片大小的开发板，上面可以运行Linux系统，我们可以用它开发我想要的设备。</p><p><span style="color: red"><strong>2、树莓派的种类</strong></span><br />A型：1个USB、无有线网络接口、功率2.5W,500mA、256MB RAM（基本已经见不到了）<br />B型：2个USB、支持有线网络、功率3.5W，700mA、512MB RAM、26个GPIO(市售还有很多)。<br />B+型：4个USB口、支持有线网络，功耗1W，512M RAM 40个GPIO（2014新出的，推荐使用）<br />购买请在淘宝上搜一下，非常多：200到--300元之间（裸板，不含SD卡、电源）<br /><span class="postimg"><img src="http://img.blog.csdn.net/20140823170101656?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQveGR3MTk4NTgyOQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="Center" /></span><span class="postimg"><img src="http://img.blog.csdn.net/20140823170110484?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQveGR3MTk4NTgyOQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="Center" /></span><span class="postimg"><img src="http://img.blog.csdn.net/20140823170247379?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQveGR3MTk4NTgyOQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="Center" /></span></p><p><span style="color: red"><strong>3、树莓派参数：</strong></span><br />B型：<br />处理器&#160; &#160; <br />BroadcomBCM2835（CPU，GPU，DSP和SDRAM，USB）<br />CPU<br />ARM1176JZF-S核心（ARM11系列）700MHz<br />GPU<br />Broadcom VideoCrore IV，OpenGL ES 2.0,1080p 30 h.264/MPEG-4 AVC高清解码器<br />内存<br />512MByte<br />USB 2.0<br />2（支持USB hub扩展）<br />影像输出<br />Composite RCA（PAL &amp; NTSC），HDMI（rev 1.3 &amp; 1.4），raw LCD Panels via DSI 14 HDMI resolution from 640x350 to 1920x1200 plus various PAL andNTSC standards<br />音源输出<br />3.5mm插孔，HDMI<br />板载存储<br />SD/MMC/SDIO卡插槽<br />网络接口<br />10/100以太网接口<br />外设<br />8xGPIO、UART、I2C、带两个选择的SPI总线，+3.3V，+5V，ground（负极）<br />额定功率<br />700mA（3.5W）<br />电源输入<br />5V / 通过MicroUSB或GPIO头<br />总体尺寸<br />85.60 x 53.98 mm（3.370 x 2.125 in）<br />操作系统<br />Debian GNU/linux，Fedora，Arch Linux ARM，RISC OS, XBMC</p><p>B+改进<br />• 更多的GPIO：B+将通用输入输出引脚增加到了40个，而Model B则只有26个；<br />• 更多的USB：B+提供了4个USB端口，对热插拔有着更好的兼容性(Model B只有2个)；<br />• 支持microSD：旧款的SD卡插槽，已经被换成了更漂亮的推入式microSD卡槽；<br />• 更低的功耗：将线性式稳压器换成了开关式，功耗降低了0.5W到1W；<br />• 更好的音频：音频电路部分采用了专用的低噪供电；<br />• 简洁的外形：USB接口被推到了主板的一边，复合视频移到了3.5mm音频口的位置，此外还增加了4个独立的安装孔。</p><p><span style="color: red"><strong>4、树莓派分布图</strong></span><br />B型，B+类似，请自行对比参考<br /><span class="postimg"><img src="http://img.blog.csdn.net/20140823171331281?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQveGR3MTk4NTgyOQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="Center" /></span></p>]]></description>
			<author><![CDATA[dummy@example.com (xuyg)]]></author>
			<pubDate>Wed, 28 Jan 2015 09:25:21 +0000</pubDate>
			<guid>http://www.itecfun.com/viewtopic.php?pid=24#p24</guid>
		</item>
	</channel>
</rss>
