關於我

我的相片

在此提供一些有關你的資訊,以便其他人確認你是他們要找的Fai。

2009/02/27

Loongson cross compile toolchain

To help compiling programs for Loongson CPU on my many x86 boxes, I need a cross compile toolchain.
In gentoo, it can be done by using crossdev program, first "emerge crossdev" and then "crossdev -t mips64el-unknown-linux-gnu --g 4.4.0_pre9999 --l 2.9_p20081201-r2 --k 2.6.27-r2"
This will build a cross compile toolchain on x86/amd64 boxes for cross compiling Loongson box (with the help of distcc). Problem occurs in the building of glibc, as the toolchain is built in the order:
binutils -> kernel-headers -> glibc -> gcc
But at the stage when it is going to compile glibc, it requires a compiler which supports the target architecture, it is not a problem if we just make for existing platforms, but for Loongson, it requires a latest gcc, which is not there yet.

Workaround is to skip some steps and rearrange the order of making, as described here.
http://forums.gentoo.org/viewtopic-p-5147128.html?sid=99c56c7a5b05b2bb66a08bbdbf548a46#5147128

Finally I got a distcc node with cross compiler for Loongson, running as a guest system under RHEL 5.3 :-)

2009/02/23

攞你命三千

今天看到 GLS 的 Marketing gift, 令我想起周星馳的“攞你命三千”。



2009/02/20

Eric Kwok's Leet Collection

星期三下班經過唱片店,買了 Eric Kwok 的 Leet Collection,全部都是他這些年來的作曲/作詞的精選歌曲。
不過到今天還沒時間去聽一下,周末才慢慢欣賞吧。

2009/02/16

Reminder: how to reset oracle application server password

Reset the oc4jadmin password using the following procedure while you are logged in as the user who installed the Oracle Application Server instance:

1. Stop OC4J and the Application Server Control.
$ORACLE_HOME/opmn/bin/opmnctl stopall

2. Locate and open the following file in a text editor:
$ORACLE_HOME/j2ee/home/config/system-jazn-data.xml

3. Locate the line that defines the credentials property for the oc4jadmin user.
jazn.com
.
.
.
oc4jadmin
OC4J Administrator
OC4J Administrator
{903}4L50lHJWIFGwLgHXTub7eYK9e0AnWLUH

4. Replace the existing encrypted password with the new password.
Be sure to prefix the password with an exclamation point (!). For example:
!mynewpassword123

2009/02/14

My loongson box using KVM

With the new KVM, I can directly use my Loongson box to be a power saving router and desktop!



2009/02/11

Street Fighter IV

20年前的作品 - Street Fighter,是九十年代最流行的遊戲之一,在各個平台都出現過(包括紅白機!)今日終於推出正式的第三集了,這樣經典的遊戲當然要買啦。
下班後回到屯門在 K&K 買了,等候期間一直有人來買,真是受歡迎!

$410




還有月曆附送


第一頁已經是二月了(因為遊戲在二月推出,真貼心)

2009/02/08

Renewing SSL certificates

As my home server's SSL certificates are going to expire soon, I need to renew them.
But it has been over one year since the certificates are created, I've forgotten how to make them, so I've done some research, to be record, here are the steps:
1. Generating RSA private key
openssl genrsa -des3 -out server.key 1024

2. Making certificate request
openssl req -new -key server.key -out server.csr
3. Go to CACert.org to generate the certificate, using the server.csr file.
4. Or self sign using openssl command
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
Then a certificate file is generated.

To use the certificate in Apache:
SSLCertificateFile /etc/apache2/ssl/server.crt
SSLCertificateKeyFile /etc/apache2/ssl/server.pem


To use the certificate in Postfix:
smtpd_tls_CAfile = /etc/ssl/postfix/cacert.pem
smtpd_tls_cert_file=/etc/ssl/postfix/home.cert
smtpd_tls_key_file=/etc/ssl/postfix/home.pem

To use the certificate in Courier IMAP:
Make a server.key, with contents from server.crt and server.pem combined, like:
-----BEGIN CERTIFICATE-----
[encoded data]
-----END CERTIFICATE-----
-----BEGIN RSA PRIVATE KEY-----
[encoded data]
-----END RSA PRIVATE KEY-----
Then configure in imapd-ssl
TLS_CERTFILE=/etc/courier-imap/imapd.crt

2009/02/05

ATEN KVM CS-62U

因為家中的電腦有點多,但是不想買幾部顯示器和插幾套的鍵盤滑鼠,所以打算買一套 KVM,看到公司用 ATEN 的效果不錯,下班就去看看,結果買了一套十分不錯的 ATEN CS-62U。





以往用 KVM,螢幕一般都會有變色,有陰影的情況,現在的 KVM 質素好多了!
不過,當然價錢都貴很多。

2009/02/03

熱血的<赤壁>

今晚去了看<赤壁2之決戰天下>,沒有看第一集,不過因為這個故事很熟悉,而且上一集也還沒開始,所以也都看的明白。電影的感覺很“熱血”,很“無雙”,戰場真的很像光榮系列的遊戲...

我喜歡的是孫權最後的一句:我們大家都輸了。
對啊,戰爭從來都沒有所謂勝敗,大家都沒有得著。