2008年10月31日星期五
Busybox移植
我使用的是Busybox 1.7.0
编译器使用的是arm-linux-gcc 3.4.1。
编译Busybox有很多选项,但是以下的几步是必须要做的,剩下的选项自己看着进行勾选。
首先修改Makefile在175行和176行,本来是
ARCH ?= $(SUBARCH)
CROSS_COMPILE ?=
修改成
ARCH ?= arm
CROSS_COMPILE ?= arm-linux-
然后执行make menuconfig 进入Busybox Settings,然后进入Installation Options,然后勾选
[*] Don't use /usr
然后在Linux Module Utilities配置项中,因为我使用linux2.6内核,所以我取消
[*] Support version 2.2.x to 2.4.x Linux kernels选项,让这个选项变成这样
[ ] Support version 2.2.x to 2.4.x Linux kernels
在Miscellaneous Utilities配置项中,取消[*] taskset 的选中状态,让它变成这样
[ ] taskset
因为我使用glibc库,如果想编译成静态的,那么需要在Busybox Settings选项中的Build Options子选项中选择使用静态链接,然后
把applet目录下applet.c文件中如下的一堆注释掉就可以开始编译了
#if ENABLE_STATIC && defined(__GLIBC__) && !defined(__UCLIBC__)
#warning Static linking against glibc produces buggy executables
#warning (glibc does not cope well with ld --gc-sections).
#warning See sources.redhat.com/bugzilla/show_bug.cgi?id=3400
#warning Note that glibc is unsuitable for static linking anyway.
#warning If you still want to do it, remove -Wl,--gc-sections
#warning from top-level Makefile and remove this warning.
#error Aborting compilation.
#endif
然后进行其他的配置,保存配置后,执行make和make install两条命令就可以在_install目录下得到需要的东西了。
2008年10月30日星期四
miniGUI编译小记
首先是安装qvfb了,因为我用的ubuntu,所以,简单,sudo apt-get install qt3-dev-tools-embedded 就好了,接下来要编译miniGUI。
参考网络文章:http://blog.iyi.cn/hily/archives/2006/09/miniguii386.html,下载了那几个包,这篇文章写的也玄乎,这里会出错哪里会出错的。果不如其然,make一下一堆的错误,奇奇怪怪,其中一个是 keyboard.h:43: error: 说是缺少')'还是什么的,晕,改了半天都没用,后来去网上找半天,找到这一篇:http://www.lyore.cn/blog/read-205.html,不过我觉得他的解决办法是不是也很麻烦,我直接把那些个ushort定义了 typedef unsigned short ushort; 就好了。还有一个错误是说什么重复定义还是什么的,开始我用gcc 4.2进行编译的时候我的解决办法是把那个.c文件中的那个结构体定义删除了,不过后来我还是换用gcc 3.4进行编译,这个错误变成一个警告了。后来编译例子的时候,又出错,“libmingui.so: unreference to function 'pthread_kill_other_threads_np'”错误,这还是minigui代码线程库使用问题,解决办法是在minigui解压路径下,使用"grep -r pthread_kill_other_threads_np *"查找所有包含该函数的调用,然后注释掉。最后重新编译即可。
编译这东西真是累啊,也不知道那个作者是怎么编译成功的……
其实原因就是因为编译器的原因了,gcc的开发人员不知道怎么回事,总得搞个向后兼容才对呀-_-!
(本来这篇文章应该7月16号贴上来的,因为那天的网络原因,所以把文章保存与一文本文档中,今天被我不小心翻出来所以就贴上来了)
2008年10月27日星期一
2008年10月16日星期四
接到HR的电话了
我很高兴,想一下就让全世界知道。我马上打电话给了爸爸妈妈,还有亲戚,让他们一起来分享这份喜悦。
我觉得我找到工作又和周围的人不一样,我早就规划好我毕业后是工作的了。而有些人是想考研,有些人无所谓,他们可能等到毕业那天再说。但是我不一样,我很急切,我想早点工作,我想早点锻炼,我想早点拿工资,呵呵
先写到这里吧,吃饭了回来,继续想想有什么要写的。:)
2008年10月4日星期六
如何移动VMware虚拟机
Preparing a Workstation 5 Virtual Machine for a Move
1. Shut down the guest operating system and power off the virtual machine. If the virtual machine is suspended, resume it, then shut down the guest operating system.
2. Do one of the following:
Otherwise, you need to have a way of moving the virtual disk (.vmdk) files from the virtual machine's directory to the new host. You could move them to a shared network directory, for example, or burn them to CD-ROMs if they are not too large.
Once you know how you are going to move the virtual machine, go to Moving a Workstation 5 Virtual Machine to a New Host.
If you stored any files in directories other than the virtual machine directory, be sure to move them into a directory of the same name and same position relative to the location of the virtual machine.
Start VMware Workstation and open the new virtual machine you just created. Choose File > Open, then browse to the virtual machine's configuration (.vmx) file.
还有移动后网卡不能用的问题,参考这个
如果把vmware安装后的所有文件(vmx等)拷贝到另外一台主机,那么使用同样的vmware station可以继续使用已经安装的系统而不必重新安装。但是有一点要注意,就是网卡的问题。当拷贝后第一次启动,vmware会提示此系统是否是copy过来的,如果是那么就会为虚拟系统的网卡重新分配一个mac地址,可以通过查看vmx文件知道mac的详细地址。
在debian linux虚拟系统中网卡的mac地址在 /etc/udev/rules.d/z25_persistent-net.rules中,只要把eth0或者对应需要的网卡标识对应到新的MAC地址就可以。同时需要修改/etc/network/interfaces中的IP地址,不然在同一个局域网中会产生IP冲突。修改完毕后重新启动就可以了。
应该有办法不重新启动,但是还没有找解决方案,可能通过/proc可以避免重启吧。
My ECG Device (9)
我用QQ远程协助连接上我同学的电脑,然后在里面打开我的虚拟机,然后在里面添加了一句话,从新编译,接着把那个编译生成的文件通过邮箱发到我这边来。
上面的过程说起来简单,我其实是吐血了一个下午!首先速度很慢,我打一个字,20秒后才有反应,我真佩服我的耐心了……然后还有我要设置NFS什么的,因为是在别人的电脑上,一切都得设置,超级郁闷啊。然后是我有一点疏忽了,我直接在里面编程是没用的,因为我的源代码是GB2312编码的,而linux采用的UTF-8编码,第一次发送回来的文件我放入开发板运行,直接是一堆乱码,搞得我没郁闷死,要知道这样搞一次回来花我多少精力啊……没办法,我只有从我这边再编程一次然后把源代码发送回去,没想到这次发送回来的编译结果又吐血:一点反应都没有!后来查清楚是因为我发送了一个错误版本的源代码过去,幸好用gedit编辑的文件会产生一个后面加~符号的备份文件,于是我在我同学那边把那个备份文件发送回来,编辑后发送回去再编译,然后再发送回来,这次终于成功了。
昨天下午我快没累死:(
winter in my heart
[audio: http://bbs.ynnubs.net/music/080929/winter%20im%20my%20heart.mp3 ]
winter has come冬天已经来了
farewell to the sun太阳离得好远
it's getting colder every single day一天比一天冷
you are not here你不在这里
can't stand you're not near不能忍受你不在身边
I'll wait for you forever and I pray我会等待并为你祈祷
My Fantasy makes believe that you're with me我仿佛相信我们还在一起
I have winter in my heart冬天在我心里
cause I miss you more than words can say因为我如此想念你以至无法言语
when nights are long and lonely without you没有你的晚上是漫长和孤独的
I have winter in my heart冬天在我心里
count the hours every single day每一天都在数着时间
that lonesome time is too sad to be true那种幽寂是那样的真实那样伤感
got winter in my heart就像冬天在我心里
snow falling down雪一直下
and you're not around你不再回来
I'm all alone in that white wonderland我孤独的待在那白色的妙境里
taking a walk漫步
there's no one to talk没有一个人和我说话
we used to be together hand in hand我们过去经常是手牵手在一起
my fantasy makes me believe thar you're with me我仿佛相信我们还在一起
I have winter in my heart冬天在我心里
cause I miss you more than words can say因为我如此想念你以至无法言语
when nights are long and lonely without you没有你的晚上是漫长和孤独的
I have winter in my heart冬天在我心里
count the hours every single day每一天都在数着时间
that lonesome time is too sad to be true那种幽寂是那样的真实那样伤感
got winter in my heart就像冬天在我心里
I have winter in my heart冬天在我心里
cause I miss you more than words can say因为我如此想念你以至无法言语
when nights are long and lonely without you没有你的晚上是漫长和孤独的
I have winter in my heart冬天在我心里
count the hours every single day每一天都在数着时间
that lonesome time is too sad to be true那种幽寂是那样的真实那样伤感
winter in my heart就像冬天在我心里