Archive for February, 2009

Lost in Yellow

Friday, February 27th, 2009

I deeply lost in this song “Yellow”. I think this is the most beautiful and powerful love song I ever heard. Someone said : “Yellow” in this song is a term that can mean cowardly or afraid. Yes, I do think so. I remember the feeling when I am in love with her: All stars were shining for her, and “love” for me was Yellow. But I think “Yellow” can also present the feeling of happiness, warmth and strong, when a man is deeply in love.
This song makes me feel complete and brave about my future.” Behind me is infinite power. Before me is endless possibility. Around me is boundless opportunity. Why should I fear? “-Mac Anderson. Be strong boy!

Look at the stars
Look how they shine for you
And everything you do
Yeah, they were all yellow

I came along
I wrote a song for you
And all the things you do
And it was called “Yellow”

So then I took my turn
Oh what a thing to have done
And it was all “Yellow”

Your skin
Oh yeah, your skin and bones
Turn on into something beautiful
And you know
You know I love you so
You know I love you so

I swam across
I jumped across for you
Oh what a thing to do
‘Cause you were all “Yellow”

I drew a line
I drew a line for you
Oh what a thing to do
And it was all “Yellow”

Your skin
Oh yeah your skin and bones
Turn on into something beautiful
And you know
For you I’d bleed myself dry
For you I’d bleed myself dry

It’s true, look how they shine for you
Look how they shine for you
Look how they shine for
Look how they shine for you
Look how they shine for you
Look how they shine

Look at the stars
Look how they shine for you
And all the things that you do

linux-2.6.8.1在edb9302上的移植

Sunday, February 15th, 2009

本文将描述linux-2.6.8.1在edb9302上的移植的过程。分析在移植过程中遇到的问题,提供解决方法和思路。我的主机系统是Ubuntu Linux 8.10(2.6.27-7-generic),其它系统环境也应该可以。特殊问题可以在这里讨论。

所需资源:
cirrus-arm-linux-2.0.8-full.tar.bz2 :Cirrus Logic公司提供的针对linux-2.6.8.1内核的套件。包括了制作redboot zImage Jffs2文件系统所需要的所有工具,使用起来也十分方便。提示:./tarballs/linux-2.6.8.1.tar.bz2 (内核源码)./patches/linux-2.6.8.1-crus2.0.8 (cirrus的内核patch)。./edb9302/Makefile ./edb9302/build.sh ./buildrules 这三个文件详细描述了整个制作过程,建议详细阅读。如果遇到问题,这是最好的切入点。

arm-elf-gcc-3.2.1-full.tar.bz2 : 3.2.1-elf Cirrus提供的交叉编译工具。
arm-linux-gcc-3.4.3-1.0.1.tar.bz2 :3.4(arm-linux-gcc) Cirrus提供的交叉编译工具。

提示:以上资源均来自arm.cirrus.com. 教育网路用户可以在此下载:Development on Embedded System/Jamp II Mini/sdk.

环境配置:

  • 1.交叉编译工具安装:

将arm-elf-gcc-3.2.1-full.tar.bz2 arm-linux-gcc-3.4.3-1.0.1.tar.bz2 存放在主机根目录下面,执行解压命令(需要sudo权限)。之后会产生两个目录:/usr/local/arm/3.4 和/usr/local/arm/3.2.1-elf ,编译工具就安装在这两个目录下。需要将编译工具添加到系统路径:
$ export PATH=/usr/local/arm/3.4/bin:/usr/local/arm/3.2.1-elf/bin:$PATH
此时,$ echo $PATH 就可以查看系统的路径了。为了不用每次启动时都要手动设置,可以在/ect/environment 中修改PATH。

  • 2.将sh连接到bash:

$ sudo rm -f /bin/sh
$ sudo ln -s /bin/bash /bin/sh
如果不做这一步ubuntu下编译时可能会遇见问题,原因是makefile中的脚本需要bash的支持。Ubuntu的sh默认是连接到dash…可以看看这个讨论:http://tinyurl.com/af6rc6

编译内核:
将cirrus-arm-linux-2.0.8-full.tar.bz2解压到不需要root权限的目录,比如我的是 /work。可以查看一下/work/cirrus-arm-linux-2.0.8/ 的内容。

buildrules docs edb9302A edb9315 opie-base
buildrules.redboot download edb9307 edb9315A patches
configs edb9301 edb9307A linux-2.6.8.1 tarballs
debian-inst edb9302 edb9312 Makefile tools

buildrules:是进行所有编译操作的核心文件,规定了制作redboot.bin zImage root.jffs2 ramdisk.jz 的所有规则。
docs(目录): 是整个支持包的帮助文档。$ firefox /docs/index.html 一下,你会找到很多想知道的内容。尤其是12. USING THE BOARD PERIPHERALS描述了定制内核的细节,需要仔细的看一下。
edb9302(目录): 存放的是制作9302的make脚本。其中images里面存放了制作好的redboot.bin zImage root.jffs2 ramdisk.jz 以及 TFTPSRV.EXE(Tftp下载工具。)
patches(目录):编译时所用到的补丁库。
tarballs (目录):编译时所用的工具,包括内核源码。

制作过程(redboot.bin root.jffs2 ramdisk.jz 的制作不在这里说明。如果不需要特别定制,可以直接使用工具包自带的镜像文件。):
# compile linux zImage
make linuxconfig
make linux
提示:如果编译过程中遇见问题可以查看tail /edb9302/edb9303.log的内容,找寻问题的所在。查看edb9303.log文件也有利于理解整个编译步骤。编译成功后,会在images里找到zImage文件。以及内核代码:/.do_not_edit/linux-2.6.8.1(隐藏)也就是LDD3所提的configured and built kernel tree。这个对驱动开发十分重要。可以作为内核源码直接引用。

下载与配置:
这个过程我是在windows下进行的(通过配置linux的Tftp服务也可行)。整个下载过程和要注意的地方,在参考文章[1]中有详细的说明。具体过程是1. Download redboot.bin到目标板. 2.配置redboot(启动脚本和IP设置). 3. 利用redboot & TFTP现在内核镜像zImage和文件系统root.jffs2。具体我就不详细叙述,说明两点:
1. redboot的启动脚本配置:
fis load zImage
exec -c “root=/dev/mtdblock1 rootfstype=jffs2 console=ttyAM”
2. 将镜像文件下载至flash的redboot命令:
load -r -v -b 0×800000 root.jffs2
fis create -b 0×800000 -l 0xa00000 jffs2
load -r -v -b 0×80000 zImage
fis create -b 0×80000 -l 0×200000 zImage

提示:此时重启目标系统就可以正常运行了,但是会出现flash错误提示,建议的在目标板Linux系统启动后将 / 目录下的.mp3文件删除。然后重启就正常了,系统启动信息

参考文章:
[1]:Cirrus EP9302: 从RedBoot到Linux
[2]:Development on Embedded System/Jamp II Mini/User manual
[3]:Cirrus-arm-linux-2.0.8/docs/index.html
[4]:Using MMC/SD card with Olimex CS-E9302

使用mobbler

Wednesday, February 11th, 2009

mobbler是基于S60智能手机平台的last.fm的客户端软件。有两个主要功能:
1: 可以使用mobbler收听last.fm的在线音乐(当然流量费是要自己掏腰包的,没有使用过)。
2: 还可以用于向个人帐户提交用手机播放音乐的情况。

我个人是last.fm的忠实用户。一则,是希望通过last.fm认识更多共同音乐爱好的朋友,相互交流。二则,想系统的统计一下自己听歌曲的情况,看看自己在特定的时间都听了些什么。现在手机听音乐对我而言已经很经常了。所以,对mobbler的第二个功能很期待。

mobbler面向的是S60 3rd edition and 5th edition的智能手机平台。安装起来很方便,在下载页面下载mobbler_s60_0_3_4.sisx文件保存到手机中安装就可以了。使用起来也很方面,第一次使用的时候需要在设置选项中设置last.fm的帐户。运行(后台)mobbler,然后播放音乐。mobbler就会自动记录你播放的曲目。

mobbler的运行模式有两种:离线模式和在线模式。离线模式下mobbler会将当前播放的歌曲的信息加入等待队列,在你选择在线模式的时候mobbler会将队列的歌曲信息上载到你的last.fm帐户。上载时由于只是上传歌曲播放时间/歌曲名称/歌手名字等信息,所以Gprs的使用量很小,10首歌曲也才几k的流量。如果处于在线模式下,mobbler会将当前播放的歌曲信息时时记录到你的last.fm帐户,信息量也不大。我手机的型号是Nokia6120c,mobbler使用很稳定。

mobbler的last.fm用户组: Mobbler Users.(可以看出mobbler的使用者不多,但是用户反馈还是很好的)。
mobbler的主页: Mobbler Page.(软件在更新中)。