Showing posts from 2007

Some progress on Loongson

The Qt-3.3.8-r4 linking problem is solved. The problem is caused by a bug in binutils which has already been fixed . I have already put an live ebuild for binutils in my loongson overlay . Loongson already got binutils' support. Please check the links below: 1. 2. Loongson's gcc support which is also developed by codesourcery is coming on the way, maybe in the next couple of month. Gcc is "in Stage 3 at the moment, which essentially amounts to regression fixes only, so the patches can't be committed yet". They will submit the patch to gcc when gcc comes to stage 1 again. In the meantime, we (some audacious guys from's forum) have made our own gcc patch, which is already available on my overlay . Honestly, I don't think our patch would be as elegant as codesourcery's. After all, they make a living by making such patches. But we

Be aware that both cscope and make honor $SOURCEDIRS

Emerging media-sound/cdparanoia failed lately on my box when I was running "sudo emerge...". The error was that an archive file was missing. However, I didn't find any bug report related to that on bug.g.o. So, I decided to take a look myself. I found that if I emerged it using root user, then everything was ok. So, I suspected this might have something to do with my environment setting, coz I don't reset env for users in wheel group(so that I can "USE=... sudo emerge"). I ran ebuild unpack/install/compile/install separately using normal user and root to determine which stage caused the difference. Finally, I found the difference happened when "make"ing in the paranoia directory. An target called "lib" defines the rule to build that archive file. The lib is not a real file, however it is not labeled as PHONY. Apparently, the target is not run. But why? I straced make as normal user. I found something strange. The strange thing was mak

the myths about stardict-3.0.1's text-to-speech feature

stardict-3 is now available via gentoo-china overlay . (I wish I could pass ebuild quiz soon and become stardict's maintainer in gentoo...) stardict-3 has got tts feature. It could use festival or espeak to play an arbitrary sequence of characters. There are two ways to use this feature. One way is via tts plugin, one for each tts engine. In fact, tts plugin does more than that - it could set the voice of its corresponding tts engine as well. The other way is to specify the command to play yourself, and there are two options which you can choose from, "echo %s | festival --tts" and "espeak %s". My experience is the first way has priority over the latter one. My suggestion is to use the latter one. Because tts plugin's functionality is redundant. You can choose tts engine's voices anyway. And you can use tts engine without them. Moreover, the festival plugin will segfault the program[1]. So, IMHO, the tts plugins are dispensable. So in my stardict-3.0.1-r

failed to build qt-3.3.8-r4 on loongson

Haven't solve it yet. I have already tried to add -mxgot to CFLAGS and CXXFLAGS. But it didn't work for me. Some useful link:

Fixed a bug in xml2po The condition to trigger the bug is that opening tag or the content of the tag contains non-ascii chars. e.g: <title>Quotes are for weak people, strong people have their own opinions - Dawid Węgliński (cla)</title> <body> <figure link="/images/gwn/20070917_cla.jpg" short="cla" caption="Dawid Węgliński, aka cla"/> The symptom is: Stack trace: Traceback (most recent call last): File "", line 856, in ? doSerialize(doc) File "", line 589, in doSerialize outtxt += doSerialize(child) File "", line 583, in doSerialize (starttag, content, endtag, translation) = processElementTag(node, repl, 1) File "", line 525, in processElementTag translation = translation.replace(' ' % (i), replacement) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 635: ordinal not in

official Simplified Chinese doc translation team lead

I have passed doc quiz, :) Now I can commit docs direclty. The following is what neysx sent to me. -- Zhang Le wrote: > Hi, neysx! > > Please find my quiz answer and fix-me.xml in the attachment. Not perfect, but good enough :) You're now in charge of / doc/zh_cn / Cheers, -- / Xavier Neys \_ Gentoo Documentation Project / /\

Pulseaudio-0.96 on MIPS

Pulseaudio depends on libatomic_ops. However, libatomic_ops don't have support for mips. I've created a patch for mips, though only work on 32bit userland. Get it here . Pulseaudio now compiled and installed on my loongson box. Can't use it to play though. The following is some detailed info, if you are interested in. My setup is to use alsa's pulse plugin. I tried aplay, for example: $ aplay /usr/share/sounds/alsa/Front_Right.wav aplay: pulsecore/mutex-posix.c:75: pa_mutex_lock: Assertion `_r == 0' failed. Aborted Before this assertion failed, aplay is stuck on a futex system call. connect(7, {sa_family=AF_FILE, path="/var/run/pulse/native"}, 110) = 0 send(6, "W", 1, MSG_NOSIGNAL) = -1 ENOTSOCK (Socket operation on non-socket) write(6, "W", 1) = 1 gettimeofday({1187375795, 973686}, NULL) = 0 write(6, "W", 1) = 1 futex(0x45dd1c, FUTEX_WAIT, 1, NULL

Chinese docs committed

Thanks to neysx! Take a look: I have just submitted /doc/zh_cn/{index,metadoc}.xml Two problems have been discovered since I wrote the stardict 3.0.0's ebuild. One is that stardict 3.0.0 needs gconf-2.m4 file in the m4 dir in order to run eautoreconf successfully. Because stardict can disable gnome support, and as a result user may not have gconf installed. The other problem is related to newest speech-tools. This one is stardict 3.0.0's dependency. you can find details here:

I have written an ebuild for stardict-3.0.0

layman -a gentoo-china to get it, or view it online: I wrote two patches which could make it compile when --disable-gnome-support. Stardict 3.0.0 supports text-to-speech engine festival. It requires the latest version of festival and speech-tools. So I wrote ebuilds for them. They are also in gentoo-china overlay now. I haven't become an ebuild dev yet, so I can just put them there. I will submit to bugs.g.o later. I have reported relevant issues to You can find it here.

Simplified Chinese Gentoo Handbook all finished!

Synced with English version. Take a look: Progress: BTW, this website is powered by my loongson machine, ;)

More on mldonkey and loongson

My little patch to mldonkey's Makefile donesn't satisfy mldonkey developer. I didn't come up with a better solution. So I resorted to modify mldonkey's ebuild. Maybe not so elegant, but it works, at least for me. I added the following snippet to src_install(): EXE="mlnet mld_hash get_range copysources make_torrent subconv" if [ -f mlnet.byte ]; then for i in $EXE; do mv $i.byte $i done fi dobin $EXE || die "dobin failed" The ebuild could found here: This overlay is independent from the one on, although the latter was actually registered by me. Because I can't access's svn repository, probably due to network problem. So I just maintain this overlay locally, using git. To get it, run: git-clone BTW, I have just registered a domain name: I will make it theportal site

Mldonkey can work on Loongson

In short, ocaml doesn't have native code compiler for mips linux, but it can compile byte code which is also an ELF executable. The only difference is that bytecode runs slower than native code. But there is a little problem with mldoney's Makefile. I will try to make a patch to solve the problem. PS: maybe i misunderstood something. I found that mlnet.byte can't run on its own, it needs bytecode file. PPS: I found the mlnet.byte i have installed into /usr/bin is not the right one. PPPS: it is the right one, but gentoo stripped it, haha, now it works, finally! The following is a conversation happened on #mldonkey @ freenode (r0bertz) what is the difference between mlnet and mlnet.byte * lb001_ has quit (Remote closed the connection) * lb001_ (i=irc@gateway/tor/x-f2c1251672831851) has joined #mldonkey (jave) r0bertz: mlnet.byte is byte compiled (jave) you will normaly use plain ml

Misunderstanding of free in free software

I bought a digital product magazine this afternoon. It is called e-zone. It is issue 464, released on July 05 2007. This magazine is the No.1 computer/digital product magazine in Hong Kong. There is an article talked about GPLv3 in this issue. However, they translate "free software foundation" as "免费软件基金会"(gratis software foundation). This is an unacceptable mistake. Free here means freedom, not gratis. I've already send them an email. I hope they can fix it immediately.

my patch to strace was accepted This is a mips related patch. I made this patch when I porting Gentoo to loongson. -- Zhang Le, Robert

How to use trads.rb to manage translations and generate a Lead Translator's page gotta read this this will help me to generate a beautiful page showing the status of translation. Our current status page is beautiful too, but it is missing some functions, e.g. the diff between the latest translated en doc and the latest en doc. The script in the above mentioned doc could do this. Wonderful! The result could be seen at However, this script only works with gorg. That means is no longer a suitable place to hold the status page (which is known as progress.xml currently)

RMS: Why Upgrade to GPL Version 3

What does a Linux newbie need to know to successfully install Gentoo?

According to Ted - What is GNU? - What are the main parts of an operating system and what does each part do? - What is a GNU/Linux distribution? - What is VMware? - What is a .iso file? - What does the ifconfig program do? - What does the ping command do? - What is a file? - What is a filesystem? - What is a hierarchal filesystem? - What is a directory? - What does the cd command do? - What does the pwd command do? - What does the ls command do? - What does the -l option do when passed to the ls command? - What is a symbolic link? - In an ls long listing, how does one know which entries are files, directories and links? - What is the purpose of the /mnt directory? - What is a path? - What is a path separator? - What is contained in the /bin directory? - What does the "more" command do? - What does a "pipe" do and what is its symbol? - What does the -a option do when passed to the ls command? - What is the purpose o


首先,说明一下我准备把 加入 gentoo planet。 那样意味着以后r0bertz.blogspot.com上所有的文章都将用英文来写,专注于技术相关的话题。 鉴于我们伟大的防火长城间歇性的屏蔽blogspot,建议使用抓虾、google reader等来订阅这个blog。 zhllg.spaces.msn.com就用来写一些非技术话题,用中文写。 给zhlly说声抱歉,zhllg.livejournal.com我要回来也没有怎么好好利用。不过我还没有归还的打算。问题的关键在于,我不想让别人误解我转投了fedora core的阵营,;) 刚刚写了个脚本来更新handbook翻译进度表 如果发现英文版有了新版本,就更新表格中英文版的版本和日期,并且把进度改成W,完成期限置空 我的xml技术了解不是很深,这样处理xml,似乎很不专业 就当抛砖引玉了 getdate() { grep Header $1 | egrep -o '200[0-9]/[0-9]{2}/[0-9]{2}' } getver() { grep Header $1 | egrep -o 'v [0-9]+\.[0-9]+' } PREFIX=/home/zhangle/gentoo/xml/htdocs/ for i in `grep -o '/doc/en/handbook/.*\.xml' progress.xml` do olddate=$(grep -A 1 $i progress.xml | egrep -o 200[0-9]/[0-9]\{2\}/[0-9]\{2\}) newdate=$(getdate $PREFIX$i) if [[ $olddate != $newdate ]]; then j=${i//\//\\\/} sed -i -e " /$j/ { N N s#$i.*\n <ti>200[0-9]/[0-9]\{2\}/[0-9]\{2\}#$i\">$(getver $PREFIX$i)</ur


终于我跻身Gentoo开发者的行列了 首先有一件要宣布的事是,我改nick了 r0bertz 来到香港后,我的英文名一直叫Robert,原因是叫罗伯特的球星很多 Z就是Zhang的第一个字母 改的原因是 zhllg 不好发音 我的@gentoo.org的邮箱就是r0bertz 等到6个月后,我就可以成mentor了,也就是导师,就可以直接带更多同胞进gentoo了,;) Gentoo是什么? The Gentoo Linux operating system ( pronounced /ˈdʒɛntu/ ) is a Linux distribution named after the Gentoo penguin . It is designed to be modular , portable , easy to maintain, flexible, and optimized for the user's machine. All tools and utilities are built from source code .


翻译了有不少时间了,第一次 具体说了什么,就不透露了 他其实也是有些不了解情况 不过事件本身说明一个问题 那就是很多中国的技术领域的英文"高手"从不看翻译的东西 之前包括我自己也是这样 原因在于:觉得翻译的东西靠不住 我参与翻译gentoo文档,目的之一就是想改变人们的这一印象,创出牌子来 让人们知道gentoo的中文文档是有质量保证的 不光准确翻译出意思,而且力求通顺流畅,"像"中文文章 当然和很多开源项目一样,最终要达到目的需要很多人的参与,包括译者的初始成果、读者的反馈和维护者迅速的反应。 最重要的还是初始成果,虽然难免错误,但一定要给读者以信心。这正是我们正在做的。


我今天偶然发现了针对龙芯的mplayer源代码 我之前提到过如果没有打龙芯补丁的mplayer播放一些文件时会出现音话不同步,除非降低分辨率 我也在lemote论坛上向龙梦的人要过补丁 不过没有回音,可能照看那个版面的人不多 我现在在家里,龙芯盒子没带回来 等我回去再试一试

感谢龙梦 因为在移植Gentoo到龙芯方面的努力,得到了龙梦组织的贡献评比的一等奖。 这意味着,我手上这台龙芯盒子就相当于赠送给我的了,以后对于龙梦的新产品还有优先购买权。 感谢龙梦,这是对我过去一个多月所做的事情的肯定! 当然这还仅仅是开始。 对于MIPS我还是新手,要学习的还有很多。 Gentoo loongson overlay我还会继续维护。 BTW:今天我做了个cgi页面,可实时查看我的龙芯盒子的系统信息: 还有Acevery贡献了一篇锐捷认证上网的HOWTO:锐捷认证

Gentoo 2006.1 x86/amd64手册全部完成 进度表:



这个系列讲座将讲解一些Linux发行版和BSD的包管理器的特点和使用方法 现在定下来的有3个 分别是NetBSD,OpenBSD和Gentoo 其中Gentoo portage将由我讲解 时间最早在5月初


我昨天才知道这个is-a-geek.org域名是www.dyndns.com的动态域名服务提供的。 所以我迫不及待的注册了一个。 这台机器是我的龙芯盒子(loongson box),里面内容是gentoo手册的镜像,简体中文版(预览版) What is a geek? A geek is an individual who is fascinated by knowledge and imagination, usually electronic or virtual in nature. -- from

LWN quote of the week

But being a subsystem maintainer requires that you trust contributors to some degree, and you just can't trust contributors when you're a perfectionist. This means that the maintainer should be less of a perfectionist than the contributors, otherwise he/she ends up doing everything by him/herself. -- Jean Delvare "Ends up doing everything by him/herself"!


继续进行…… 下面是其他架构文档的翻译 任务认领中 我知道现在各个语言的文档都在翻译2007.0对应的文档 不过毕竟我们已经开始了2006.1的,现在还没完,理应先完成它 握有po这个武器,不用担心努力白费


要说两句,不说会憋出问题的。 首先,和Gentoo Weekly Newsletter翻译一样,Gentoo文档的翻译也还在继续。不过我最近捣鼓龙芯比较多,GWN和文档上花的时间不是很多。 目前文档翻译的过程是这样,我分配,然后翻译团队成员翻译,完了交给我,再交给审校人员审校。最后发表前,我还会再看一遍。每一篇文档,我都会做最后的把关,清除所有可能残留的错误。 有些错误甚至是语义上的错误。这是确实存在的,是令我比较郁闷的地方。所以每篇文章在我没看过一遍之前,我不敢就这么直接放到网上。而这会花很多时间。所以事实上有一些已经完成审校的文档积压在我这里,还没有发布。我的错,之后我会给文档更多一点时间。 之前的翻译模式有一个问题是不够透明,最好都发到gentoo-china邮件列表里。 就事论事,举个例子: The <c>video</c> statement controls framebuffer display options. It needs to be given the framebuffer driver (<c>vesafb</c> for 2.6 kernels, or <c>vesa</c> for 2.4 kernels) followed by the control statements you wish to enable. 审校后的文章里这句话译为: <c>video</c>声明用来控制framebuffer的显示参数。在你想启用的控制声明后必须给予framebuffer驱动(2.6内核使用<c>vesafa</c>,2.4使用<c>vesa</c>)。 这第二句完全没有表达出原文的意思,而且vesafb误写为了vesafa。当然人非圣贤,马有失蹄,但是遇到后面这种比较低级的失误,还是令人比较郁闷。我改动后,如下: <c>video</c>参数用来控制framebuffer的显示参数。此参数的内容形式是首先给出framebuffer驱动的名称(2.6内核使用<c>vesafb</c>,2.4使用<c>vesa</c>),后面跟着的

loongson patch against linux 2.6.21-rc5

Foxsen(Zhang Fuxin, 张福新) has released a patch against linux 2.6.21-rc5. I have tried it today. It works well so far. My gentoo on loongson still have two minor problems, related to audio and video playback respectively. First of all, please be aware that none of these programs I used to play audio and video has any loongson specific patch. loongson has implemented its own multimedia instructions. So theoretically if properly patched, the performance will be better. On the audio side, audacious doesn't perform well when the frequency is low, while mplayer works fine. Maybe it's because they use difference libraries. On the video side, when mplayer plays some mpeg2 or divx video, video will fall behind audio, especially when the video's resolution is high. Last but not least, I heard some devs talked about loongson's profile on #gentoo-mips. It is widely accepted that it is not necessary to have a specific profile for loongson. Well, I am not insisting that we should have

loongson specific profile

If loongson finally were officially supported by gentoo, it must have its own profile. Currently, it uses cobalt's profile. Of course, one has to do some dirty hacks to make it usable with loongson. For example, cheat portage to make it think colo is already installed. Loongson box uses pmon as bios and bootloader, doesn't use colo which is cobalt's bootloader. Recently, I have read PMS draft. For me, it is quite informative. I've learned some internals about our package manager, specifically I've learned something about profile which i don't know before. Then I applied those knowledge into reality. I created a loongson specific profile in loongson overlay and used it. The main trick here is to write absolute path of parent directory into PARENT file, instead of "..". And it turned out to work well.

Loongson got license from MIPS Technologies How exciting!!!

Loongson Gentoo stage 4

I have uploaded a stage4 to, under the directory of Gentoo. FEATURES include but not limited to: 1. nptl pthread library, the debian shipped with box uses Linuxthreads pthread library. 2. complete KDE 3.5.5 3. 4 kernels, 32bit/64bit, with/without kgdb 4. partial mirror of, include half-translated Simplifid Chinese handbook 5. firefox, mplayer, audacious... I used binutils-2.17 when compiling firefox, USE flag of binutils is "multislot -multitarget nls -test -vanilla" This mplayer doesn't contain any loongson specific patch, but it works.

Gentoo 2007.0 livecd will have Simplified Chinese interface

The relevant thread on Gentoo China google group


想法是把盒子改造成下载器兼播放器,盒子有tvout,直接接电视上放 我的笔记本就不需要拿来拿去了,也不用进windows了 mldonkey的好处是,我在笔记本点连接,就可以直接调用盒子上的mldonkey来下载 不过要移植ocaml ocaml是一种编程语言 目前只支持IRIX和n32 ABI 现在龙芯还只能运行于Linux,Linux上的应用程序主要还是用o32 ABI 参考Redhatter曾经说过的: The problem with n32 though, is that few applications actually handle this case well. Debugging tools like strace and gdb are not coded to handle this... KDE works sort-of, but is broken in several key areas. Gnome is totally useless on n32. 两个解决方案,一个是multilib,一个是移植到o32 ABI。似乎都不太容易。 如果multilib,如spb所说的: you'll need your userland CHOST set to mips64 instead of mips, a gcc and binutils capable of handling all the binary formats you want to use, and appropriate system libraries for all the ABIs 不过Redhatter又说过: The optimal solution would be multilib, however the necessary code for Portage has not been written. Architectures like AMD64 work because of shear ugly kludges ... the actual multilib case isn't handled at all. 如果要移植,至少需要做两件事(可能还有其他的,我还没有发现) 一是增加一个汇编文件mipsel.s(SGI的mips是

KDE on loongson


Redhatter has released mips1(little endian) stages They should work on loongson, however i haven't tried it yet. I will soon release a stage4 for loongson, including KDE. Stay tuned.

representative of the Gentoo community

Remember, the moment you participate in a public discussion on the Gentoo fora, you have made yourself a representative of the Gentoo community. Every gentoo user/dev should read this:


比如 某人举这个例子想来证明自己的一些行为是正确的,显然是找错了论据

Gentoo Etiquette Policy

Re: [RFC]possible improvements to --with-sysroot

On 3/6/07, Daniel Jacobowitz <> wrote: > On Tue, Mar 06, 2007 at 02:05:06AM +0800, Zhang Le wrote: > > I have used "strace -f" to check where linker looked for -lqt-mt. From > > what I have observed, it seems that ld didn't use > > $SYSROOT/etc/ > > Well, it's supposed to, so I suggest you check what's happened in ld. I found a clue which may lead to a neat solution to this problem. And this has something to do with gcc, so I still posted it here. First of all, $SYSROOT/etc/ solution maybe an overkill, so I think we can ignore it for now. The finding is if ld is invoked with --sysroot option and if the dir specified by -L has a leading "=", for example: --sysroot=/usr/mipsel-unknown-linux-gnu -L=/usr/qt/3/lib -L/usr/lib -lqt-mt Then when ld will looking for in /usr/mipsel-unknown-linux-gnu/usr/qt/3/lib, instead of /usr/qt/3/lib. Thus problem solved. So I am wondering if ther

videos from fosdem

FOSDEM means Free and Open source Software Developers' European Meeting

Daniel has left again

This is what he said: Gentoo is only going to be fun and productive again if we: 1) maintain a courteous and professional atmosphere 2) focus on good, transparent project management and collaboration 3) deliver cool technologies to Gentoo users AND IN THAT ORDER ONLY, which is the only order that works long-term. It makes no sense to try to do this in reverse order. It does not work. 3 requires 2 and 2 requires 1. Right now these three pillars are being treated as mutually exclusive goals which is absolutely ridiculous and wrong, where we accept failure in point 1 in the hope of achieving 3.

重新开始玩synergy 要分享键盘鼠标的机器是server,执行synergys 没有键盘鼠标的是client,执行synergyc serverip 我的配置文件 $ cat /etc/synergy.conf # sample synergy configuration file # # comments begin with the # character and continue to the end of # line. comments may appear anywhere the syntax permits. section: screens # three hosts named: moe, larry, and curly loongson: adriano: end section: links loongson: down = adriano adriano: up = loongson end section: options switchDelay = 500 end


Distcc is working. Howerver, I didn't get it working at the beginning. Because I am curious about what messages distccd's pass between themselves. So I fired up wireshark, then I go to sleep. As you would expect, eventually wireshark occupied all free space on /tmp which is also used by distcc to produce object files. And as a consequence, distcc failed. Originally, the distcc run with "--log-level critical", so it sent nothing to syslog. By using this command, you can see what distcc is doing in real time: distccd --verbose --log-stderr --daemon --user distcc --allow --no-detach

I will give up cross compiling KDE

Two posts related to this decision: I will try distcc.

some ideas about DEPEND/RDEPEND

(zhllg) Is it possible that a runtime dependency is not a build time dependency? or could a package be built without some package, but require it in order to run? (igli) yes (zhllg) igli, any example? (igli) not necessarily required at run time; in any case eg an app that runs a cmd (igli) might not need to be built against the other app (zhllg) oh that is true (igli) synfig has run time deps for i think jpeg and stuff (igli) need to work on ebuild.. :( (zhllg) igli, what about the runtime dependency is a library (igli) usu if it's a dep against a lib, it's compile time (marienz) both. (igli) depends on whether it looks for the .h files (marienz) normally both. (igli) oh sorry, yes runtime as well of course (igli) as lib needed on system when app is running :) doh! (zhllg) then IMHO maybe in that case just specify the dependency in RDEPEND is enough, what do you think? (marienz) you normally need the lib present at build time or the link will fail. (zhllg) yes (igli) yup (igli)

[RFC]possible improvements to --with-sysroot

The following suggestion is based on my understanding of --with-sysroot, if there were any error, please correct me. To my understanding, currently if cross-compile tool chain (including gcc) is configured with --with-sysroot when installing them, then when cross compiling, ld will look for libraries in $SYSROOT/usr/lib and $SYSROOT/usr/local/lib. Wouldn't it be great that we go one step further that we let ld look for libraries in the dir listed in $SYSROOT/etc/, if this file ever exits? Of course for each entry in $SYSROOT/etc/, we prefix $SYSROOT to it. Comments are welcomed. Thanks! -- Zhang Le, Robert This is an email I have posted to gcc mailing list.

emerging KDE on loongson

I have got DRI working in Gentoo on loongson. mesa/libdrm/kernel/xorg-server/xf86-video-ati need to be patched in order to achieve this. I have set up a loongson overlay, including the necessary patches. Get it here:

kgdb and 64bit loongson kernel

The kernel crashed at last. But it didn't drop into gdb. I have set up a breakpoint at panic(), so it is not a panic. My speculation proved wrong, and I have no idea what went wrong here. I will give up for the time being. Gotta read some books and help to make the 32bit loongson port stable.

gorg on loongson box

I have successfully run gorg on my loongson box. Find more info about gorg here: more info about loongson here:


最近在玩kgdb 似乎人们对于kgdb的热情不高 现在sf.net上cvs里的kgdb只能打在2.6.17内核上 目前的龙芯用的是2.6.18.1,好在要改动的地方不是很多,也不难 kgdb管理补丁用的是quilt,稍微看看man就明白了,用起来很方便 其实vanilla里也有一个kgdb选项,但实际上似乎是不能用的,连个断点都设置不了 之前我编的内核有两个问题,一个是网络传输速度慢,scp的时候经常断,如果用debian,速度恒定保持在2.x M/s,一个是字符界面在显示器上显示不出,显示器报告超出范围,debian里正常。我之前用的是从dev.lemote.com里checkout出来的内核代码里面自带的配置文件,稍做了改动。后来我用了debian的/proc/config.gz,就好了。可是我对比两个config也没看出有什么差异可以导致这两个问题。目前还是一个谜。 最后玩kgdb光靠串口来控制还是不行,现在continue之后,gdb里显示到free多少多少memory之后,就没有任何信息了,但是在显示器上可以看到实际上已经成功启动了。 kgdb真的很爽,如果想让目标机器的内核停止运行,并等待被开发机器上的gdb连接和控制,只需要在开发机器上执行 echo -e "\003" > /dev/ttyS1

gentoo's mips toolchain

Gentoo's mips64el toolchain(created by 'crossdev') support n32 by default. However, I want o32. Good news is I don't need mips64el, instead I need mipsel. Thanks to spbecker for pointing it out to me. I think mips64 here is the name of processor architecture. Apparently loongson doesn't belong to that category.

按音序排序的utf8和gb18030 locale 下载后,解压缩 cd locale-pinyin-0.1 make sudo cp zh_CN.hacked /usr/share/i18n/locales/zh_CN sudo cp iso14651_t1.pinyin /usr/share/i18n/locales/ locale-gen 修改/etc/env.d/xxi18n,如果LANG不是zh_CN.utf8,一定要单独设定LC_COLLATE  $ cat /etc/env.d/100i18n LANGUAGE=en_US LC_CTYPE=zh_CN.utf8 LC_COLLATE=zh_CN.utf8 LANG=en_US.utf8

the difference between GB18030 charmap of redhat's glibc and that of GNU's glibc

GB18030 charmap of redhat's glibc is different from that of GNU's glibc. I don't know exactly what this difference means to users. But I wonder why this difference exists. Get the former at Get the latter at I've created a diff which could be get here:

be careful when you are on #paludis

In my opinion, a good community should treat new comers well. But some people think otherwise. (zhllg) i think many people like the idea installation could resume automatically when failure occur, is it possible with paludis? (mlangc) zhllg:  mlangc maskd masterdriverz maxauthority midnite__ mzli  mlangc maskd masterdriverz maxauthority midnite__ mzli (zhllg) mlangc, i've seen that actually, just wonder why, is it difficult to implement technically? (mlangc) i don't think so; as far as i know it is not implemented by __design__ - but you should better ask someone that actually works on paludis; i'm a simple user myself (rbrown`) zhllg: er no. Too unreliable, too flaky and far too widely abused; (zlin) zhllg: wouldn't it be much better to fix the packages that cause it to fail in the first place... (zhllg) zlin, yeah, from a developer's perspective * dleverto

Interest and Open source

One of the great things about open source software is, of course, the fact that anyone can participate, so the pool of resources is limited not by an annual hiring budget, but by interest in the project. That means you can have any number of developers, but it also means that one person may be involved in several areas if he or she finds them interesting.


知道原因了 handbook-x86.xml本身没有问题 不过有一个它指向的文件,里面缺了个</p> 而且使用了非utf-8编码 ... 怪我之前没说 检查语法错误,可以用 xmllint -valid -noout filename.xml


什么是gorg? 首先是,我终于可以运行独立的gorg服务器了。 neysx给了我一个提示: TW, you do not need to use the stand-alone web server, but if you want to, it seems something changed in webrick (ruby's www server) and the default bound address ( ) does not work anymore. Edit www.rb and add the :BindAddress param: s = :BindAddress => " ", :AccessLog=>access_log, :Logger => $Log, :Port => $Config["port"], :CGIPathEnv => ENV["GORG_CONF"]) 其次,我发现 http://localhost/doc/en/handbook/2006.1/handbook-x86.xml?part=1&chap=5 这样的连接打不开,也就是后面带&chap=5的 后来发现和libxml2和libxslt的版本有关,分别降到2.6.26和1.1.17,就行了 但问题根源应该在于一些xsl不够规范 现在,还剩一个问题 http://localhost/doc/zh_cn/handbook/2006.1/handbook-x86.xml 这个文件打不开 但是除了x86以外的其他handbook,都没有问题 把它放到上级目录也没有问题 错误的提示是sections tag不全,但这个文件里又没有sections这个tag


If your mp3's id3 tag conforms to id3v2.4, which means probably you have disabled chardet, then pay attention to your fallback encoding setting, leave it alone, don't set it. trust me!

the default brower of xchat 2.8

The logic to find default brower is changed from xchat 2.6.8 to 2.8. The 2.8 xchat will call xdg-open to open brower, in KDE, xdg-open will call konqueror unless you have set KDE's default brower to others. I like firefox, and older version of xchat used to call firefox for me. So I set KDE's default brower in kcontrol: KDE components-> Component chooser -> Web brower.


alpha(audacious-1.3.0-alpha1)的东西就放到~x86里 upstream maintainer和ebuild maintainer为同一个人看来是有些问题…… 而且本来好好的东西偏偏要胡乱改 这个audacious/strings.c文件里,本来str_to_utf8()函数里的顺序是对的 也就是先判断是否已经为utf8,如果是,则马上返回。 结果现在先做的不是这个判断,结果,已经是utf8的还要再转码,就成了乱码……

regexec(3)'s usage:Match Results with Subexpressions An example program: #include <stdio.h> #include <sys/types.h> #include <regex.h> /* 取子串的函数 */ static char* substr(const char*str,                 unsigned start, unsigned end) {         unsigned n = end - start;         static char stbuf[256];         strncpy(stbuf, str + start, n);         stbuf[n] = 0;         return stbuf; } /* 主程序 */ int main(int argc, char** argv) {         int x, z, lno = 0, cflags = REG_EXTENDED;         char ebuf[128], lbuf[256];         regex_t reg;         regmatch_t pm[10];         const size_t nmatch = 10;         /* 编译正则表达式*/         z = regcomp(&reg, "(reg|regular)[ ]?(ex|expression)", cflags);         /* 逐行处理输入的数据 */         while(fgets(lbuf, sizeof(lbuf), stdin))         {                 ++lno;                 if ((z = strlen(lbuf)) > 0 && lbuf[z-1]                                 == '\n')            


sed -i -e  ' #找到有下面这段字的行 /在这段时间内被修正或解决的bug/ { #读入下面一行 N #如果下面一行以</ul>开头 /\n<\/ul>/ { #就替换一下 s/在这段时间内被修正或解决的bug/bug在这段时间被标记为重复/ } }' *