ubuntu 在 R40e 上 還有 Debian 在 Sempron 2600 上

2010年6月25日 星期五

Build UML (User Mode Linux) error : asm/user.h not found

build UML kernel 的時候,出現這個 error:arch/um/sys-i386/user-offsets.c:4:22: 錯誤: asm/user.h:沒有此一檔案或目錄查了一下,2.6.23 後改掉了: release notes:Jeff Dike (3): UML - Stop using libc asm/page.h UML - Fix kernel vs libc symbols clash UML - stop using libc asm/user.h

2010年6月10日 星期四

git checkout previous rev - how to get back

用 git commit 了幾個revision後,想回到第一個revision 去,我就用:
git checkout cd453
節過災難就發生了 .. 因為這樣 checkout 過去後,git log 就不會列出 第一版以後的 log。 也就是說,我回不去了 >_< 後來用 git log master 會顯示master 所有的 rev,才找回最後的 hash code。
git rev-list --all --pretty
也可以列出所有的 revision, 但是各branch 會混在一起。 不然就要用 gitk 啟動圖形界面,再 start git gui,在 show all branch 把所有 branch 都 show 出來

2010年5月31日 星期一

Enable X font server

要啟動 font server,要安裝 xfs font server 這個 package。 雖然現在 X Server 大多已經不用 font server ,而改用 client side render 了。 但是在用 Xming 的時候,有 font server 還是比較方便。 安裝: # aptitude install xfs config:
裝完 xfs 後,/etc/X11 下就會有 fs 這個 folder,裡面會有 config。
把 config 的
no-listen = tcp
這一行 comment 掉後,重新啟動 xfs (/etc/init.d/xfs) 就可以
font server 的 service port 是 7100,可以用 netstate 來看。 裝完後,在 Xming 的 remote font server 欄為就可以填上 font server 的 ip address。

2010年5月11日 星期二

compcache in ubuntu

ubuntu 在 8.10 就支援 COMPCACHE 了: ubuntu man page
/etc/initramfs-tools/initramfs.conf
有個選項:
COMPCACHE_SIZE
改完後還要作:
sudo update-initramfs -u
再重開機。 ref: http://ubuntuforums.org/showthread.php?t=1040087

2010年5月10日 星期一

git : push - ssh

git remote 命令好像是對遠端 repository 的操作。
git remote add remotexample git@192.168.0.72:example
設定 一個 remote repository 的別名 為 remoteexample. 從 remote url 來看,這個 remote repository 是用 ssh 登入,ip 是 192.168.0.72, username=git example 就是在 server 的 /home/git/example
一旦設定過,就可以用
git push origin
把 local 的 code 同步到 server 也可以不用兩步驟: remote add 加別名,git push。 直接寫 url:
 git push git@192.168.0.72:example
所有定義過的 remote repo 別名可以用
 git remote show
來顯示 要刪除(好重新定義) remote name,可以用
git remote rm examplerepo
來刪除 examplerepo 這個名字 git server 的 repository 好像不能在遠端 create,要 ssh login 後,手動 create 一個 folder ,然後用 git init 命令產生 repostory (空的),然後才能由遠端 push source code 過去。
不然好像要用 gitosis 來作

2010年5月5日 星期三

Git: .gitignore

.gitignore 這個file 要在 init 和 commit 前先寫好,否則好像會失效。
偉大的 tsung 好像有說是 cache 的關係: http://plog.longwin.com.tw/my_note-app-setting/2010/01/26/git-ignore-howto-set-zim-2010
一般用在 Visual Studio 的專案是這樣:
.*
obj
*.obj
*.exe
*.pdb

2010年5月4日 星期二

Log : Build Infrarecorder

infrarecorder 是 Windows 的 DVD create,燒錄 GUI tool,GPLed。
download 下來後,照著 README 的說明,還需要:
  • WTL : 這是 MS opensource 的 Windows Template Library,download 完後,解開,要設好 include path,source code 和 resource 的 include path 都要設。
  • ckCore, ckFilesystem, ckMMC : 這是作者自己作的 open source 專案,download 完後,一一用 VS2005 開啟,build lib。其中 ckFilesystem 和 ckMMC 都需要 ckCore,所以要先build 好 ckCore,再把 ckCore 的 include path (和 library path) 加到 project 中。
  • libpng : 一樣是 opensource 專案,需要 zlib,可以follow 上一篇 : build MediaInfo from source, zlib download,修改。 --build libpng project 時,需要把 zlib 的 include path 加進去。
上面的一些 support library,download 下來後,我都放在 ir050_src\ 下 (也就是 解開的目錄)。
都 build 好 (WTL 不需要 build)後,
  • 把 每個 project 的 include folder 都加到 infrarecorder 的 =include path 中。
  • library 都加到 library path 中。
  • libpng 跟 zlib 因為 project build 出來的 library name 有加上版本符號,所以要修改 infrarecorder 的 project 內容,改一下library name。
這樣infrorecorder 就可以build OK 了。

debug run
需要一堆 dll ,開始 debug 後 VS2005 就會 complain,就把那些 dll copy 到 inforecorder.exe 所在的 folder 裡就可以。

標籤

網誌存檔