打造最快的raspberry pi系统,含汉化和arduino1.6 IDK安装!
本帖最后由 billlovecg 于 2016-6-2 15:12 编辑本人厌倦了raspbian系统的龟速,即使是在raspberry pi 2这块版上也一度让人不爽,还好有大神在Ubuntu 14.10 / Linaro 15.01基础上弄出了个ARMv7版的系统,在pi 2上跑从此腰不酸腿不疼,速度完胜raspbian。废话不多说,好东西马上和大家分享,先看图:
1。 准备好最新的raspberry pi 2, 一张mini sd卡(最好8G上,可以安装些好软件^_^),然后到下面链接下载系统img文件,当然还有arduino1.6的两个deb安装包,都一起下载下来,等下装,以后就可以抛弃pc在pi上随时随地玩arduino了,哇咔咔~~~~
链接: http://pan.baidu.com/s/1c0B5tKG 密码: h97r
2. 将下载下来的系统解压出img文件安装到你的sd卡上,至于怎么安装网上已有好多教程,我就不多说了,或者加入我的GEEK疯人院q群560919280,里面可以找到pc的Mac的linux的安装教程。
3. 系统安装好后,放入pi2, 接上显示器键盘鼠标和网线,接上电源。。。。。顺利的话见到4颗树莓后进入系统命令行模式,没错,只是命令行系统,要酷炫快的UI界面,当然少不了lxde了,短小精悍,操作类似windows。下面随我一起安装吧,很简单,只要一条命令:
sudo apt-get install lxde
4. 过些时间安装完后输入命令重启系统:
sudo reboot
5. 重启后就可以自动跳到酷炫的登陆界面了,现在还是英文界面,等下可以汉化。默认账户是linaro,密码也是linaro,当然这些都可以更改的,安全起见建议改掉它。ok,点击默认账户linaro输入密码进入系统,当当~~好干净的界面,立马给它换上一张喜欢的桌面,并把工具栏移到顶部,垃圾桶移到右下角,舒服多了,喜欢这种布局,哇咔咔~~~~:
6. 接下来汉化工作,先找出命令行工具,点击左上角图标弹出菜单列表,选择图片,再选择LXTerminal弹出命令行窗口。汉化当然少不了中文字体,在这里极力推荐microhei字体,字体圆润性感漂亮,网上很多教程用的都是zenhei,难看死了,请原谅我对美的追求,哇咔
咔~~~~
好了,在命令行输入如下命令安装子体:
sudo apt-get install ttf-wqy-microhei
sudo apt-get install language-pack-zh-hans
安装完后重启系统
sudo reboot
重启后进入登录界面,在左下角language里选择中文语言,然后登入系统,当当~~打开菜单看看是不是汉化了,字体是不是很性感,打开浏览器看网页中文字体体会更深。
7. 有了中文系统当然少不了中文输入法,在这里推荐装fcitx输入法,而fcitx我选择装五笔拼音混合,安装过程就两条命令:
先装fcitx:
sudo apt-get install fcitx
然后装五笔拼音:
sudo apt-get install fcitx-table-wbpy
装完后就可以用了!
8. 接下来就是装arduino1.6 IDE了,此前通过sudo apt-get install arduino安装的都是1.01老掉牙的版本,现在装1.6会有点折腾,但你值得拥有!废话少说,安装过程如下:
首先打开软件源列表, 这里我们用强大的vi编辑器,不清楚的跟着操作就可以了,大牛可以无视:
sudo vi /etc/apt/sources.list
打开列表后,这里我要简单说一下vi, vi有编辑和命令两种模式,按键盘左上角"esc"键可以进入命令模式,按键盘字母“i”键可以进入编辑模式。现在请进入编辑模式,按键盘方向键移光标到最后一行末尾回车另起新一行,然后复制下面两行:
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
deb http://archive.raspbian.org/raspbian jessie main contrib non-free rpi
在刚才新起一行那里鼠标右击粘贴,然后按键盘"esc"键进入命令模式,按" shift + : "组合建出现":"两点,然后输入"wq"命令回车,"wq"命令是保存并退出的意思。
紧接着输入如下命令创建一个preferences文件,
sudo vi /etc/apt/preferences
并用刚才的方法将如下内容粘贴进去保存退出:
Package: *
Pin: release n=wheezy
Pin-Priority: 900
Package: *
Pin: release n=jessie
Pin-Priority: 300
Package: *
Pin: release o=Raspbian
Pin-Priority: -10
然后输入如下命令更新软件源:
sudo apt-get update
更新完后接下来就可以安装arduino了, 上面更新的软件源包含最新的gcc-avr等,首先装gcc-avr:
sudo apt-get -t jessie install gcc-avr
然后装需要用到的库文件:
sudo apt-get -t jessie install avrdude avr-libc libjssc-java libastylej-jni libcommons-exec-java libcommons-httpclient-java libcommons-logging-java libjmdns-java libjna-java libjsch-java
最后安装随系统一起下载下来的那两个arduino安装包:
sudo dpkg -i arduino-core_1.6.0_all.deb arduino_1.6.0_all.deb
这里的安装可能会久一点,耐心等待,安装完之后要做些相关设置,如下:
创建一文件夹:
sudo mkdir /usr/share/arduino/hardware/tools/avr/etc/
然后将相关配置文件链接过去:
sudo ln -s /etc/avrdude.conf /usr/share/arduino/hardware/tools/avr/etc/avrdude.conf
至此,如果顺利的话,arduino1.6 IDE就全部安装完了,你可以直接在命令行输入arduino或通过系统菜单进入arduino了。
可以通过usb将你的arduino接到pi里,在ide里选好板子和端口,编写好你的控制程序就可以烧录到你的arduino跑起来了!以后就可以带着pi和arduino到处飞了,只要有显示器或电视就行,哇咔咔~~~~
在安装过程中有任何疑问想法可以留言,相互学习,也可以加入我的GEEK疯人院q群560919280,大家一起疯,哇咔咔~~~
ps:下一回讲在pi里玩经典游戏,数千款游戏等着你玩,哇咔咔~~ 这周刚入Pi2,感谢楼主分享 幻生幻灭 发表于 2015-3-25 14:35 static/image/common/back.gif
这周刚入Pi2,感谢楼主分享
不客气~~~:lol 帮顶,学习学习 启动多长时间? 期待下一回啊,经典游戏很吸引人哇~ :lol 好东西,刚入了pi2。果断有用。 对了,如果我是无显示器安装要肿么弄 suoma 发表于 2015-3-25 16:50 static/image/common/back.gif
启动多长时间?
系统启动很快吖,不到10秒 cnkids 发表于 2015-3-25 21:51 static/image/common/back.gif
对了,如果我是无显示器安装要肿么弄
无显示安装可以通过ssh来弄 本帖最后由 guo989 于 2015-3-26 14:29 编辑
重启后进入登录界面,在左下角language里选择中文语言,然后登入系统,当当~~打开菜单看看是不是汉化了,字体是不是很性感,打开浏览器看网页中文字体体会更深。
从这一步开始,没有中文让显示选项,只有默认与更多选项,点更多没反应。进入英文系统后安装输入法,再往后就都不成功了。。。。:加源运行后部分源错误,安装GCC找不到包。
login as: linaro
[email protected]'s password:
Welcome to Ubuntu 14.10 (GNU/Linux 3.18.5-v7+ armv7l)
* Documentation:http://www.linaro.org
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
linaro@linaro-developer:~$ sudo apt-get install fcitx-table-wbpy
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
fcitx-pinyin fcitx-table
Suggested packages:
fcitx-table-all
The following NEW packages will be installed:
fcitx-pinyin fcitx-table fcitx-table-wbpy
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 3725 kB of archives.
After this operation, 18.3 MB of additional disk space will be used.
Do you want to continue? y
Get:1 http://ports.ubuntu.com/ubuntu-ports/ utopic/universe fcitx-pinyin armhf 1 :4.2.8.5-1
Get:2 http://ports.ubuntu.com/ubuntu-ports/ utopic/universe fcitx-table armhf 1: 4.2.8.5-1
Get:3 http://ports.ubuntu.com/ubuntu-ports/ utopic/universe fcitx-table-wbpy arm hf 1:4.2.8.5-1
Fetched 3725 kB in 15s (234 kB/s)
Selecting previously unselected package fcitx-pinyin.
(Reading database ... 54358 files and directories currently installed.)
Preparing to unpack .../fcitx-pinyin_1%3a4.2.8.5-1_armhf.deb ...
Unpacking fcitx-pinyin (1:4.2.8.5-1) ...
Selecting previously unselected package fcitx-table.
Preparing to unpack .../fcitx-table_1%3a4.2.8.5-1_armhf.deb ...
Unpacking fcitx-table (1:4.2.8.5-1) ...
Selecting previously unselected package fcitx-table-wbpy.
Preparing to unpack .../fcitx-table-wbpy_1%3a4.2.8.5-1_armhf.deb ...
Unpacking fcitx-table-wbpy (1:4.2.8.5-1) ...
Setting up fcitx-pinyin (1:4.2.8.5-1) ...
Setting up fcitx-table (1:4.2.8.5-1) ...
Setting up fcitx-table-wbpy (1:4.2.8.5-1) ...
linaro@linaro-developer:~$ sudo reboot
Broadcast message from linaro@linaro-developer
(/dev/pts/1) at 5:59 ...
The system is going down for reboot NOW!
linaro@linaro-developer:~$
login as: linaro
[email protected]'s password:
Welcome to Ubuntu 14.10 (GNU/Linux 3.18.5-v7+ armv7l)
* Documentation:http://www.linaro.org
Last login: Thu Mar 26 05:46:43 2015 from 192.168.1.12
linaro@linaro-developer:~$ sudo vi /etc/apt/sources.list
linaro@linaro-developer:~$sudo vi /etc/apt/preferences
linaro@linaro-developer:~$ sudo apt-get update
Ign http://ports.ubuntu.com utopic InRelease
Get:1 http://repo.linaro.org utopic InRelease
Get:2 http://mirrordirector.raspbian.org jessie InRelease
Get:3 http://archive.raspbian.org jessie InRelease
Ign http://ppa.launchpad.net utopic InRelease
Hit http://ports.ubuntu.com utopic Release.gpg
Get:4 http://repo.linaro.org utopic/main Sources
Ign http://mirrordirector.raspbian.org jessie InRelease
Ign http://archive.raspbian.org jessie InRelease
Ign http://ppa.launchpad.net utopic InRelease
Hit http://ports.ubuntu.com utopic Release
Get:5 http://repo.linaro.org utopic/main armhf Packages
Get:6 http://ppa.launchpad.net utopic Release.gpg
Hit http://ports.ubuntu.com utopic/main Sources
Get:7 http://ppa.launchpad.net utopic Release.gpg
Hit http://ports.ubuntu.com utopic/universe Sources
Get:8 http://ppa.launchpad.net utopic Release
Hit http://ports.ubuntu.com utopic/main armhf Packages
Ign http://repo.linaro.org utopic/main Translation-en
Hit http://ports.ubuntu.com utopic/universe armhf Packages
Get:9 http://ppa.launchpad.net utopic Release
Hit http://ports.ubuntu.com utopic/main Translation-en
Hit http://ports.ubuntu.com utopic/universe Translation-en
Get:10 http://ppa.launchpad.net utopic/main Sources
Get:11 http://mirrordirector.raspbian.org jessie/main armhf Packages
Get:12 http://archive.raspbian.org jessie/main armhf Packages
Get:13 http://ppa.launchpad.net utopic/main armhf Packages
Get:14 http://ppa.launchpad.net utopic/main/debug armhf Packages
Get:15 http://ppa.launchpad.net utopic/main Translation-en
Get:16 http://ppa.launchpad.net utopic/main Sources
Get:17 http://ppa.launchpad.net utopic/main armhf Packages
Get:18 http://ppa.launchpad.net utopic/main Translation-en
Get:19 http://mirrordirector.raspbian.org jessie/contrib armhf Packages
Get:20 http://mirrordirector.raspbian.org jessie/non-free armhf Packages
Get:21 http://mirrordirector.raspbian.org jessie/rpi armhf Packages
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en
Ign http://mirrordirector.raspbian.org jessie/main Translation-en
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en
Get:22 http://archive.raspbian.org jessie/contrib armhf Packages
Get:23 http://archive.raspbian.org jessie/non-free armhf Packages
Get:24 http://archive.raspbian.org jessie/rpi armhf Packages
Ign http://archive.raspbian.org jessie/contrib Translation-en
Ign http://archive.raspbian.org jessie/main Translation-en
Ign http://archive.raspbian.org jessie/non-free Translation-en
Ign http://archive.raspbian.org jessie/rpi Translation-en
Fetched 18.3 MB in 2min 17s (133 kB/s)
Reading package lists... Done
W: GPG error: http://mirrordirector.raspbian.org jessie InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9165938D90FDDD2E
W: GPG error: http://archive.raspbian.org jessie InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9165938D90FDDD2E
linaro@linaro-developer:~$ sudo apt-get upgrade
Reading package lists... Done
E: Invalid record in the preferences file /etc/apt/preferences, no Package header
linaro@linaro-developer:~$ sudo apt-get -t jessie install gcc-avr
Reading package lists... Done
E: Invalid record in the preferences file /etc/apt/preferences, no Package header
linaro@linaro-developer:~$ sudo vi /etc/apt/sources.list
linaro@linaro-developer:~$ sudo vi /etc/apt/preferences
linaro@linaro-developer:~$ sudo apt-get update
Hit http://repo.linaro.org utopic InRelease
Get:1 http://mirrordirector.raspbian.org jessie InRelease
Ign http://ports.ubuntu.com utopic InRelease
Ign http://ppa.launchpad.net utopic InRelease
Ign http://archive.raspbian.org jessie InRelease
Ign http://mirrordirector.raspbian.org jessie InRelease
Hit http://repo.linaro.org utopic/main Sources
Hit http://ports.ubuntu.com utopic Release.gpg
Ign http://ppa.launchpad.net utopic InRelease
Ign http://mirrordirector.raspbian.org jessie/main armhf Packages/DiffIndex
Hit http://repo.linaro.org utopic/main armhf Packages
Hit http://ports.ubuntu.com utopic Release
Hit http://ppa.launchpad.net utopic Release.gpg
Err http://archive.raspbian.org jessie Release.gpg
Connection failed
Ign http://mirrordirector.raspbian.org jessie/contrib armhf Packages/DiffIndex
Hit http://ppa.launchpad.net utopic Release.gpg
Hit http://ports.ubuntu.com utopic/main Sources
Ign http://mirrordirector.raspbian.org jessie/non-free armhf Packages/DiffIndex
Hit http://ppa.launchpad.net utopic Release
Ign http://archive.raspbian.org jessie Release
Hit http://ports.ubuntu.com utopic/universe Sources
Ign http://mirrordirector.raspbian.org jessie/rpi armhf Packages/DiffIndex
Hit http://ppa.launchpad.net utopic Release
Hit http://ports.ubuntu.com utopic/main armhf Packages
Hit http://ppa.launchpad.net utopic/main Sources
Ign http://repo.linaro.org utopic/main Translation-en
Ign http://archive.raspbian.org jessie/main armhf Packages/DiffIndex
Hit http://ports.ubuntu.com utopic/universe armhf Packages
Hit http://ppa.launchpad.net utopic/main armhf Packages
Hit http://ports.ubuntu.com utopic/main Translation-en
Hit http://ppa.launchpad.net utopic/main/debug armhf Packages
Ign http://archive.raspbian.org jessie/contrib armhf Packages/DiffIndex
Hit http://ports.ubuntu.com utopic/universe Translation-en
Hit http://ppa.launchpad.net utopic/main Translation-en
Hit http://ppa.launchpad.net utopic/main Sources
Ign http://archive.raspbian.org jessie/non-free armhf Packages/DiffIndex
Hit http://ppa.launchpad.net utopic/main armhf Packages
Hit http://ppa.launchpad.net utopic/main Translation-en
Ign http://archive.raspbian.org jessie/rpi armhf Packages/DiffIndex
Hit http://mirrordirector.raspbian.org jessie/main armhf Packages
Hit http://mirrordirector.raspbian.org jessie/contrib armhf Packages
Hit http://mirrordirector.raspbian.org jessie/non-free armhf Packages
Hit http://mirrordirector.raspbian.org jessie/rpi armhf Packages
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en
Ign http://mirrordirector.raspbian.org jessie/main Translation-en
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en
Err http://archive.raspbian.org jessie/contrib Translation-en
Connection failed
Err http://archive.raspbian.org jessie/main Translation-en
Connection failed
Err http://archive.raspbian.org jessie/non-free Translation-en
Connection failed
Err http://archive.raspbian.org jessie/rpi Translation-en
Connection failed
Err http://archive.raspbian.org jessie/main armhf Packages
Connection failed
Err http://archive.raspbian.org jessie/contrib armhf Packages
Connection failed
Err http://archive.raspbian.org jessie/non-free armhf Packages
Connection failed
Err http://archive.raspbian.org jessie/rpi armhf Packages
Connection failed
Fetched 14.9 kB in 39s (378 B/s)
W: GPG error: http://mirrordirector.raspbian.org jessie InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9165938D90FDDD2E
W: Failed to fetch http://archive.raspbian.org/raspbian/dists/jessie/Release.gpgConnection failed
W: Failed to fetch http://archive.raspbian.org/raspbian/dists/jessie/contrib/i18n/Translation-enConnection failed
W: Failed to fetch http://archive.raspbian.org/raspbian/dists/jessie/main/i18n/Translation-enConnection failed
W: Failed to fetch http://archive.raspbian.org/raspbian/dists/jessie/non-free/i18n/Translation-enConnection failed
W: Failed to fetch http://archive.raspbian.org/raspbian/dists/jessie/rpi/i18n/Translation-enConnection failed
W: Failed to fetch http://archive.raspbian.org/raspbian/dists/jessie/main/binary-armhf/PackagesConnection failed
W: Failed to fetch http://archive.raspbian.org/raspbian/dists/jessie/contrib/binary-armhf/PackagesConnection failed
W: Failed to fetch http://archive.raspbian.org/raspbian/dists/jessie/non-free/binary-armhf/PackagesConnection failed
W: Failed to fetch http://archive.raspbian.org/raspbian/dists/jessie/rpi/binary-armhf/PackagesConnection failed
E: Some index files failed to download. They have been ignored, or old ones used instead.
linaro@linaro-developer:~$ sudo apt-get -t jessie install gcc-avr
Reading package lists... Done
E: Invalid record in the preferences file /etc/apt/preferences, no Package header
linaro@linaro-developer:~$ sudo dpkg -i arduino-core_1.6.0_all.deb arduino_1.6.0_all.deb
dpkg: error processing archive arduino-core_1.6.0_all.deb (--install):
cannot access archive: No such file or directory
dpkg: error processing archive arduino_1.6.0_all.deb (--install):
cannot access archive: No such file or directory
Errors were encountered while processing:
arduino-core_1.6.0_all.deb
arduino_1.6.0_all.deb
linaro@linaro-developer:~$ ls
DesktopDocumentsDownloadsMusicPicturesPublicTemplatesVideos
linaro@linaro-developer:~$ df -h
Filesystem SizeUsed Avail Use% Mounted on
/dev/mmcblk0p22.9G1.6G1.2G58% /
none 4.0K 04.0K 0% /sys/fs/cgroup
devtmpfs 369M4.0K369M 1% /dev
none 75M312K 75M 1% /run
none 5.0M4.0K5.0M 1% /run/lock
none 373M 0373M 0% /run/shm
none 100M 0100M 0% /run/user
/dev/mmcblk0p1 56M 27M 30M48% /boot
linaro@linaro-developer:~$ Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en
Connection failed
Err http://archive.raspbian.org jessie/non-free Translation-en
Connection failed
Err http://archive.raspbian.org jessie/rpi Translation-en
Connection failed
Err http://archive.raspbian.org jessie/main armhf Packages
Connection failed
Err http://archive.raspbian.org jessie/contrib armhf Packages
-bash: Ign: command not found
Connection failed
Err http://archive.raspbian.org jessie/non-free armhf Packages
linaro@linaro-developer:~$ Err http://archive.raspbian.org jessie/contrib Translation-en
-bash: Err: command not found
linaro@linaro-developer:~$ Connection failed
-bash: Connection: command not found
linaro@linaro-developer:~$ Err http://archive.raspbian.org jessie/main Translation-en
-bash: Err: command not found
linaro@linaro-developer:~$ Connection failed
-bash: Connection: command not found
linaro@linaro-developer:~$ Err http://archive.raspbian.org jessie/non-free Translation-en
-bash: Err: command not found
linaro@linaro-developer:~$ Connection failed
-bash: Connection: command not found
linaro@linaro-developer:~$ Err http://archive.raspbian.org jessie/rpi Translation-en
-bash: Err: command not found
linaro@linaro-developer:~$ Connection failed
-bash: Connection: command not found
linaro@linaro-developer:~$ Err http://archive.raspbian.org jessie/main armhf Packages
-bash: Err: command not found
linaro@linaro-developer:~$ Connection failed
-bash: Connection: command not found
linaro@linaro-developer:~$ Err http://archive.raspbian.org jessie/contrib armhf Packages
-bash: Err: command not found
linaro@linaro-developer:~$ Connection failed
-bash: Connection: command not found
linaro@linaro-developer:~$ Err http://archive.raspbian.org jessie/non-free armhf Packages
-bash: Err: command not found
linaro@linaro-developer:~$ Connection failed
-bash: Connection: command not found
linaro@linaro-developer:~$ Err http://archive.raspbian.org jessie/rpi armhf Packages
-bash: Err: command not found
linaro@linaro-developer:~$ Connection failed
-bash: Connection: command not found
linaro@linaro-developer:~$ Fetched 14.9 kB in 39s (378 B/s)
-bash: syntax error near unexpected token `('
linaro@linaro-developer:~$ W: GPG error: http://mirrordirector.raspbian.org jessie InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9165938D90FDDD2E
> W: Failed to fetch http://archive.raspbian.org/raspbian/dists/jessie/Release.gpgConnection failed
>
guo989 发表于 2015-3-26 14:26 static/image/common/back.gif
重启后进入登录界面,在左下角language里选择中文语言,然后登入系统,当当~~打开菜单看看是不是汉化了, ...
截些图上来看看情况 billlovecg 发表于 2015-3-26 16:52 static/image/common/back.gif
截些图上来看看情况
安装完中文字体后重启无中文选项。 终于安装成功。:lol前面问题是没有安装中文包,在安装字库后安装中文包,指令:sudo apt-get install language-pack-zh-hans
后面在安装arduino IDE时出现问题,安装包不可用。用:sudo apt-get -f install 强行安装解决。
再次感谢楼主协助解决疑问难题。
此系统运行速度的确比官方系统运行快速。可当做轻便桌面版使用。
页:
[1]