May 31, 2007

觀看CPU與硬碟溫度

sudo apt-get install sensor-applet hddtemp

May 29, 2007

note of install subversion server

install subversion and apache2 svn module
apt-get install subversion libapache2-svn

setup svn repository
mkdir /home/svn
svnadmin create /home/svn

setup mod_dav_svn in apache2
vi /etc/apache2/mods-available/dav_svn.conf

----------


DAV svn
#跟原本設定的不一樣,原本套件是 SVNPath,只能管理一個
#Project,SVNParentPath 可以在
#svn repository 下設定很多個 Project
SVNParentPath /home/svn/
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /etc/apache2/dav_svn.passwd

Require valid-user


----------

create dav_svn.passwd
htpasswd -c /etc/apache2/dav_svn.passwd

restart apache2
/etc/init.d/apache2 restart

create new project
svnadmin create /home/svn/projectname
chown -R www-data:www-data /home/svn/projectname

import project to your svn server
svn import projectname http://svn.server.com/svn/projectname

checkout it
svn checkout http://svn.server.com/svn/projectname

May 13, 2007

Today's link 20070514

Install Poky from scratch

上編文章提供,我們可直接使用官方已編好的Image與Kernel,但在此我們將自已動手做 :)

實作過程:
1. 下載 Source
svn co http://svn.o-hand.com/repos/poky/trunk poky
2. 必須之套件
patch diffstat texi2html cvs svn bzip2 tar gzip gawk makeinfo qemu
2.1. 如果你要自行編譯qemu for poky還須安裝
gcc-3.4, libsdl1.2-dev, zlib1g-dev
3. 設定環境
source poky-init-build-env
卻定/bin/ls -> bash,如果為dash在編譯perl-native時會有問題
4. 編譯 Image
bitbake oh-image-pda
5. Try it :)
cd ~/poky/build/tmp/deploy/images
poky-qemu zImage-qemuarm.bin oh-image-pda-qemuarm.ext2
6. 編譯qemu
bitbake -c build qemu
PS:如需移除套件可使用 bitbake -c clean $packname
7. 編譯完qemu之後,會放在 $OEROOT/build/tmp/work/armv5te-poky-linux-gnueabi內,使用自行編譯的qemu執行poky
sudo ~/poky/build/tmp/work/armv5te-poky-linux-gnueabi/qemu-0.8.2+cvs20060723-r4/install/qemu/usr/bin/qemu-system-arm -kernel zImage-qemuarm.bin -append "root=/dev/sda console=ttyAMA0 console=tty0 mem=64M" -net nic,vlan=0 -net tap,vlan=0,ifname=tap0,script=/home/blue119/poky/scripts/poky-qemu-ifup -M versatilepb -hda oh-image-pda-qemuarm.ext2 -usb -usbdevice wacom-tablet



Try it Poky

Poky是一套建立在OpenEmbedded上的embedded Linux build system, distribution and developer environment,且是一種GNOME Embedded type platforms(X11/Matchbox/GTK+)

Features include;
  • Linux 2.6.x kernel support.
  • x86 and ARM (both OABI and EABI) architecture support out the box with provision for others too .
  • Complete cross-compiling toolchain generation (gcc 3.4 and gcc 4.1 supported).
  • System layer with tuned Busybox, tslib, glibc2.x, Kdrive 7.1 XServer (aka TinyX) and more.
  • Complete customisable and optimised GNOME Embedded platform support for DBus / Gstreamer EDS Embedded / X11/ Matchbox / GTK+ / Cairo etc.
  • Optional dpkg (Debian) or Ipkg software packaging support.
  • QEmu (x86 and ARM) integration.
  • Release, debug, profiling and SDK filesystem image builds supported.
  • Easily ported to new boards/platforms to provide an incredably well featured BSP.
  • Support for OProfile performance measurements with remote graphical UI.
  • Support for Linux Trace Toolkit (LTTng) for further performance debugging.
  • Fast multithreaded builds (two hours for full filesystem on commodity dual core hardware)
  • 100% Open Source
開始安裝 :)
1. 於 /etc/apt/sources.list 加入
deb http://debian.o-hand.com unstable/
deb http://debian.o-hand.com dapper/
deb http://debian.o-hand.com edgy/
deb http://debian.o-hand.com feisty/
2. 下載Poky官方所提供的 Kernel and filesystem image

3. 安裝qemu and poky-scripts
apt-get install qemu poky-scripts
注意:如使用 ubuntu or debian 所包好的 qemu 執行時,會發生wacom-tablet無法使用,所以我們必須正確的下載ohand所提供的qemu,但是如果你是使用ubuntu feisty的話,可以下載ohand提供給edgy的deb pool中的qemu來使用,因為在feisty的deb pool中找不到qemu,不過使用上是沒問題的。

4. Try it :)
poky-qemu $Kernel $Image

May 11, 2007

神奇的垃圾桶

上星期跟學長去蘇澳吃海鮮,我自已先到宜蘭大學後的一家新開的丹提咖啡喝個茶,上廁所時發現,他的垃圾桶還變神奇的,會自動翻蓋 XD,當場在那研究了好久,也找不到sensor,哈,真是神奇。

Install OpenMoKo from MokoMakefile

如果你想安裝 OpenMoKo from scratch 有二種方法,除了直接下載SVN來編譯之後,我們可以使用 Rod Whitby 所編寫的 MokoMakefile Makefile,好處是我們可以利用簡單的make指令取代一些煩雜的指令 :),以下為我的安裝過程:

1. Make sure your build host is set up
apt-get install python patch m4 make python-psyco ccache perl diffstat \
wget curl ftp cvs subversion git

2. Openembedded on your Distribution
i. echo "deb http://www.openembedded.org/dl/ packages/" >> /etc/apt/source
ii. install monotone 0.32
wget http://monotone.ca/downloads/0.32/monotone_0.32-0.1_i386.deb #版本不一樣,可能會有問題,這版本是我使用過沒問題的

update-alternatives --config git #select /usr/bin/git-scm to provide git instead of /usr/bin/git.transition

3. Complementary packages
apt-get install libxml2-utils xmlto passivetex
apt-get install docbook

4. Create your $OMDIR directory:
export OMDIR=$HOME/moko ; mkdir $OMDIR ; cd $OMDIR

5. Grab MokoMakefile:
wget http://www.rwhitby.net/files/openmoko/Makefile

6. Set up the environment:
make setup

7. Start building.
make openmoko-devel-image

8. Run
make build-qemu
make flash-qemu-local
make run-qemu






May 8, 2007

VI小技巧,加速學習Python

於vimrc中加入
map <f2> :!clear;python %
寫完python後,直接按F2就可看結果 :)

May 3, 2007

Use palm in ubuntu feisty

至從上次從6.10升級到feisty之後,發現firefox無法使用,原因不明,後來只好使用 mozilla.com 提供的 binary,撐著用先。
今天想到,因該把J-Pilot與Palm Sync一下了,edgy時,當按下Palm的Sync鍵後,udev即會產生 ttyUSB0 and ttyUSB1,但在Feisty卻不會自行產生,而方法是自行加入 visor的 module,看了一下visor description: USB HandSpring Visor / Palm OS driver,不過,好奇的是,為什麼edgy不用載入 visor ><", 就可正常使用
Bug #99329 in udev (Ubuntu): “[Feisty] Udev & Palm”