ubuntu 在 R40e 上 還有 Debian 在 Sempron 2600 上

2011年3月31日 星期四

repo : manifest.xml

這一篇有說明如何作 android source 的 local repo: http://omappedia.org/wiki/Android_Miscellaneous
順便配合 repo 的 source code 看一下 .. project.py : def _ParseProject(self, node):


每個 project 可有 remote attrib,如果沒有指定,就是 用 default:
remote = self._get_remote(node) if remote is None: remote = self._default.remote 接下去看才知道 repo 規定 manifest 一定要有 remote 設定,否則 fail:
if remote is None: raise ManifestParseError, \ "no remote for project %s within %s" % \ (name, self.manifestFile)

好麻煩,我翻譯一下那一篇好了

android 是由一堆 open source 專案組成的, google 為了管裡這麼多用 git 管理的專案,寫了 repo 這個程式。

repo 使用 manifest 檔來描述管理的 project


以下這個是 omap 的 android manifest 內容:

一開始的部份,描述 remote target..
<remote name="korg" fetch="git://android.git.kernel.org/" review="review.source.android.com" /> <remote name="omap" fetch="git://git.omapzoom.org/" /> <default revision="master" remote="korg"> 說明這個 manifest 檔有兩個 remote target,一個是 andorid - 叫 korg,另一個是 omapzoom,叫 omap

接著說明 default 的 remote 是 korg

之後,所有 project 的描述,就可以直接拿 korg, omap 來用。
<project path="hardware/ti/omap3" name="repo/android/hardware/ti/omap3" remote="omap" /> 如果沒說明,就用 default: <project path="bionic" name="platform/bionic" />

2011年3月30日 星期三

check if every git projects are list in repo manifest

先試一下 是不是所有的 source code 都有在 git 控制下:

目標:

找出所有 git versionize 的 project (folder) 和沒有 git versionize 的 folder。

Rule:

該 folder 有 .git 目錄,則該 folder 為 project root
到 tree end (沒有任何 subfolder) 都沒有 .git 目錄,則該 folder 就沒有 versionize.

os.walk( ) 的搜尋有 top-down 和 buttom-up.

使用 top-down,在 path walk 中可以即時更改 dirlist..

找dirlist 中每個 item (folder),該 folder 下有 .git 目錄,就從 dirlist 中刪掉 (remove).

如果 是 end node ( len(dirlist) == 0 ) 就是 not versionize folder.

寫起來就是:
import os gitproj=[] emptyproj = [] if os.path.isdir(".git"): gitproj.append("./") else: for root, dirlist, filelist in os.walk("./"): for ingpath in ['.repo','out']: if ingpath in dirlist: dirlist.remove(ingpath) if len(dirlist) == 0 : emptyproj.append(root) else: foundpath=[] for dirname in dirlist: if os.path.isdir(os.path.join(root,dirname,'.git')): foundpath.append(dirname) for dirname in foundpath: dirlist.remove(dirname) gitproj.append(os.path.join(root,dirname)) print emptyproj print '==============' print len(gitproj)

但是很神奇的,check patch 後的 folder,, 每個 folder 都有被 git versionzie 耶!!!
.. 所以是我寫錯?


這個比較有趣的地方是 (作為一個初學者):for.. in os.walk 的動作,在 top-down 模式,允許你修改 在 loop 中修改 dirlist 的內容,這樣他就不會 walk in 那些不在 dirlist 的 path.



接著,是不是所有的 git project 都有列在 repo 的 manifest 裡:

import os import sys import xml.dom.minidom # STEP 1 : get all project path in manifest.xml xmlroot = xml.dom.minidom.parse('./.repo/manifest.xml') manifestprojlist=[] for node in xmlroot.childNodes[0].childNodes: if node.nodeName == 'project': manifestprojlist.append(os.path.join('./',node.getAttribute('path'))) # STEP 2 : search all the source tree to get the .git project list emptylist = [] gitlist = [] for root, dirlist, filelist in os.walk('./'): for ingpath in ['.repo','out']: if ingpath in dirlist: dirlist.remove(ingpath) if len(dirlist) == 0: emptylist.append(root) else: foundpath=[] for dirname in dirlist: if os.path.isdir(os.path.join(root,dirname,'.git')): foundpath.append(dirname) gitlist.append(os.path.join(root,dirname)) # STEP 3 : compare and print result for projname in gitlist: if projname not in manifestprojlist: print projname
結果真的有...除了 kernel 和 bootloader 外,還有 10 個 git project

2011年3月25日 星期五

enable compiz

charles-chang@dellnb:~$ sudo aptitude install fglrx-modules-dkms 
The following NEW packages will be installed:
  cpp-4.3{a} dkms{a} fglrx-modules-dkms gcc-4.3{a} gcc-4.3-base{a} linux-headers-2.6-amd64{a} linux-headers-2.6.32-5-amd64{a} 
  linux-headers-2.6.32-5-common{a} linux-kbuild-2.6.32{a} 
0 packages upgraded, 9 newly installed, 0 to remove and 0 not upgraded.
Need to get 12.4 MB of archives. After unpacking 43.7 MB will be used.
Do you want to continue? [Y/n/?] Y
Get:1 http://debian.nctu.edu.tw/debian/ squeeze/main gcc-4.3-base amd64 4.3.5-4 [110 kB]
Get:2 http://debian.nctu.edu.tw/debian/ squeeze/main cpp-4.3 amd64 4.3.5-4 [3,349 kB]
Get:3 http://debian.nctu.edu.tw/debian/ squeeze/main dkms all 2.1.1.2-5 [71.3 kB]                                                                   
Get:4 http://debian.nctu.edu.tw/debian/ squeeze/main gcc-4.3 amd64 4.3.5-4 [2,604 kB]                                                               
Get:5 http://debian.nctu.edu.tw/debian/ squeeze/main linux-headers-2.6.32-5-common amd64 2.6.32-31 [3,889 kB]                                       
Get:6 http://debian.nctu.edu.tw/debian/ squeeze/main linux-kbuild-2.6.32 amd64 2.6.32-1 [238 kB]                                                    
Get:7 http://debian.nctu.edu.tw/debian/ squeeze/main linux-headers-2.6.32-5-amd64 amd64 2.6.32-31 [523 kB]                                          
Get:8 http://debian.nctu.edu.tw/debian/ squeeze/main linux-headers-2.6-amd64 amd64 2.6.32+29 [3,188 B]                                              
Get:9 http://debian.nctu.edu.tw/debian/ squeeze/non-free fglrx-modules-dkms amd64 1:10-9-3 [1,646 kB]                                               
Fetched 12.4 MB in 3min 20s (62.1 kB/s)                                                                                                             
Selecting previously deselected package gcc-4.3-base.
(Reading database ... 134269 files and directories currently installed.)
Unpacking gcc-4.3-base (from .../gcc-4.3-base_4.3.5-4_amd64.deb) ...
Selecting previously deselected package cpp-4.3.
Unpacking cpp-4.3 (from .../cpp-4.3_4.3.5-4_amd64.deb) ...
Selecting previously deselected package dkms.
Unpacking dkms (from .../dkms_2.1.1.2-5_all.deb) ...
Selecting previously deselected package gcc-4.3.
Unpacking gcc-4.3 (from .../gcc-4.3_4.3.5-4_amd64.deb) ...
Selecting previously deselected package linux-headers-2.6.32-5-common.
Unpacking linux-headers-2.6.32-5-common (from .../linux-headers-2.6.32-5-common_2.6.32-31_amd64.deb) ...
Selecting previously deselected package linux-kbuild-2.6.32.
Unpacking linux-kbuild-2.6.32 (from .../linux-kbuild-2.6.32_2.6.32-1_amd64.deb) ...
Selecting previously deselected package linux-headers-2.6.32-5-amd64.
Unpacking linux-headers-2.6.32-5-amd64 (from .../linux-headers-2.6.32-5-amd64_2.6.32-31_amd64.deb) ...
Selecting previously deselected package linux-headers-2.6-amd64.
Unpacking linux-headers-2.6-amd64 (from .../linux-headers-2.6-amd64_2.6.32+29_amd64.deb) ...
Selecting previously deselected package fglrx-modules-dkms.
Unpacking fglrx-modules-dkms (from .../fglrx-modules-dkms_1%3a10-9-3_amd64.deb) ...
Processing triggers for man-db ...
Setting up gcc-4.3-base (4.3.5-4) ...
Setting up cpp-4.3 (4.3.5-4) ...
Setting up dkms (2.1.1.2-5) ...
Setting up gcc-4.3 (4.3.5-4) ...
Setting up linux-headers-2.6.32-5-common (2.6.32-31) ...
Setting up linux-kbuild-2.6.32 (2.6.32-1) ...
Setting up linux-headers-2.6.32-5-amd64 (2.6.32-31) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 2.6.32-5-amd64
dkms: running auto installation service for kernel 2.6.32-5-amd64:
Setting up linux-headers-2.6-amd64 (2.6.32+29) ...
Setting up fglrx-modules-dkms (1:10-9-3) ...

Creating symlink /var/lib/dkms/fglrx/10-9/source ->
                 /usr/src/fglrx-10-9

DKMS: add Completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area....
make KERNELRELEASE=2.6.32-5-amd64 -C /lib/modules/2.6.32-5-amd64/build M=/var/lib/dkms/fglrx/10-9/build.....
cleaning build area....

DKMS: build Completed.

fglrx.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/2.6.32-5-amd64/updates/dkms/

depmod.....

DKMS: install Completed.
然後又...
charles-chang@dellnb:~$ sudo aptitude install fglrx-control 
The following NEW packages will be installed:
  fglrx-atieventsd{a} fglrx-control fglrx-driver{a} fglrx-glx{a} fglrx-glx-ia32{a} libaudio2{a} libmysqlclient16{a} libqt4-dbus{a} libqt4-designer{a} 
  libqt4-network{a} libqt4-qt3support{a} libqt4-script{a} libqt4-sql{a} libqt4-sql-mysql{a} libqt4-xml{a} libqtcore4{a} libqtgui4{a} mysql-common{a} 
  qt4-qtconfig{a} 
0 packages upgraded, 19 newly installed, 0 to remove and 0 not upgraded.
Need to get 49.1 MB of archives. After unpacking 139 MB will be used.
Do you want to continue? [Y/n/?] Y
Get:1 http://debian.nctu.edu.tw/debian/ squeeze/non-free fglrx-glx amd64 1:10-9-3 [257 kB]
Get:2 http://debian.nctu.edu.tw/debian/ squeeze/non-free fglrx-driver amd64 1:10-9-3 [17.6 MB]
Get:3 http://debian.nctu.edu.tw/debian/ squeeze/non-free fglrx-glx-ia32 amd64 1:10-9-3 [7,902 kB]                                                                       
Get:4 http://debian.nctu.edu.tw/debian/ squeeze/main libaudio2 amd64 1.9.2-4 [84.2 kB]                                                                                 
Get:5 http://debian.nctu.edu.tw/debian/ squeeze/main mysql-common all 5.1.49-3 [70.9 kB]                                                                               
Get:6 http://debian.nctu.edu.tw/debian/ squeeze/main libmysqlclient16 amd64 5.1.49-3 [1,985 kB]                                                                        
Get:7 http://debian.nctu.edu.tw/debian/ squeeze/main libqtcore4 amd64 4:4.6.3-4 [2,503 kB]                                                                             
Get:8 http://debian.nctu.edu.tw/debian/ squeeze/main libqt4-xml amd64 4:4.6.3-4 [144 kB]                                                                               
Get:9 http://debian.nctu.edu.tw/debian/ squeeze/main libqt4-dbus amd64 4:4.6.3-4 [266 kB]                                                                              
Get:10 http://debian.nctu.edu.tw/debian/ squeeze/main libqt4-script amd64 4:4.6.3-4 [871 kB]                                                                           
Get:11 http://debian.nctu.edu.tw/debian/ squeeze/main libqtgui4 amd64 4:4.6.3-4 [5,113 kB]                                                                             
Get:12 http://debian.nctu.edu.tw/debian/ squeeze/main libqt4-designer amd64 4:4.6.3-4 [5,625 kB]                                                                       
Get:13 http://debian.nctu.edu.tw/debian/ squeeze/main libqt4-network amd64 4:4.6.3-4 [541 kB]                                                                          
Get:14 http://debian.nctu.edu.tw/debian/ squeeze/main libqt4-sql amd64 4:4.6.3-4 [145 kB]                                                                              
Get:15 http://debian.nctu.edu.tw/debian/ squeeze/main libqt4-qt3support amd64 4:4.6.3-4 [1,402 kB]                                                                     
Get:16 http://debian.nctu.edu.tw/debian/ squeeze/main libqt4-sql-mysql amd64 4:4.6.3-4 [62.5 kB]                                                                       
Get:17 http://debian.nctu.edu.tw/debian/ squeeze/main qt4-qtconfig amd64 4:4.6.3-4 [142 kB]                                                                            
Get:18 http://debian.nctu.edu.tw/debian/ squeeze/non-free fglrx-atieventsd amd64 1:10-9-3 [145 kB]                                                                     
Get:19 http://debian.nctu.edu.tw/debian/ squeeze/non-free fglrx-control amd64 1:10-9-3 [4,321 kB]                                                                      
Fetched 49.1 MB in 4min 45s (172 kB/s)                                                                                                                                 
Preconfiguring packages ...
Selecting previously deselected package fglrx-glx.
(Reading database ... 141945 files and directories currently installed.)
Unpacking fglrx-glx (from .../fglrx-glx_1%3a10-9-3_amd64.deb) ...
Adding 'diversion of /usr/lib/libGL.so.1.2 to /usr/lib/fglrx/diversions/libGL.so.1.2 by fglrx-glx'
Adding 'diversion of /usr/lib/libGL.so.1 to /usr/lib/fglrx/diversions/libGL.so.1 by fglrx-glx'
Selecting previously deselected package fglrx-driver.
Unpacking fglrx-driver (from .../fglrx-driver_1%3a10-9-3_amd64.deb) ...
Adding 'diversion of /usr/lib/xorg/modules/extensions/libglx.so to /usr/lib/fglrx/diversions/libglx.so by fglrx-driver'
Selecting previously deselected package fglrx-glx-ia32.
Unpacking fglrx-glx-ia32 (from .../fglrx-glx-ia32_1%3a10-9-3_amd64.deb) ...
Adding 'diversion of /usr/lib32/libGL.so.1.2 to /usr/lib32/fglrx/diversions/libGL.so.1.2 by fglrx-glx-ia32'
Adding 'diversion of /usr/lib32/libGL.so.1 to /usr/lib32/fglrx/diversions/libGL.so.1 by fglrx-glx-ia32'
Selecting previously deselected package libaudio2.
Unpacking libaudio2 (from .../libaudio2_1.9.2-4_amd64.deb) ...
Selecting previously deselected package mysql-common.
Unpacking mysql-common (from .../mysql-common_5.1.49-3_all.deb) ...
Selecting previously deselected package libmysqlclient16.
Unpacking libmysqlclient16 (from .../libmysqlclient16_5.1.49-3_amd64.deb) ...
Selecting previously deselected package libqtcore4.
Unpacking libqtcore4 (from .../libqtcore4_4%3a4.6.3-4_amd64.deb) ...
Selecting previously deselected package libqt4-xml.
Unpacking libqt4-xml (from .../libqt4-xml_4%3a4.6.3-4_amd64.deb) ...
Selecting previously deselected package libqt4-dbus.
Unpacking libqt4-dbus (from .../libqt4-dbus_4%3a4.6.3-4_amd64.deb) ...
Selecting previously deselected package libqt4-script.
Unpacking libqt4-script (from .../libqt4-script_4%3a4.6.3-4_amd64.deb) ...
Selecting previously deselected package libqtgui4.
Unpacking libqtgui4 (from .../libqtgui4_4%3a4.6.3-4_amd64.deb) ...
Selecting previously deselected package libqt4-designer.
Unpacking libqt4-designer (from .../libqt4-designer_4%3a4.6.3-4_amd64.deb) ...
Selecting previously deselected package libqt4-network.
Unpacking libqt4-network (from .../libqt4-network_4%3a4.6.3-4_amd64.deb) ...
Selecting previously deselected package libqt4-sql.
Unpacking libqt4-sql (from .../libqt4-sql_4%3a4.6.3-4_amd64.deb) ...
Selecting previously deselected package libqt4-qt3support.
Unpacking libqt4-qt3support (from .../libqt4-qt3support_4%3a4.6.3-4_amd64.deb) ...
Selecting previously deselected package libqt4-sql-mysql.
Unpacking libqt4-sql-mysql (from .../libqt4-sql-mysql_4%3a4.6.3-4_amd64.deb) ...
Selecting previously deselected package qt4-qtconfig.
Unpacking qt4-qtconfig (from .../qt4-qtconfig_4%3a4.6.3-4_amd64.deb) ...
Selecting previously deselected package fglrx-atieventsd.
Unpacking fglrx-atieventsd (from .../fglrx-atieventsd_1%3a10-9-3_amd64.deb) ...
Selecting previously deselected package fglrx-control.
Unpacking fglrx-control (from .../fglrx-control_1%3a10-9-3_amd64.deb) ...
Processing triggers for man-db ...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for menu ...
Setting up fglrx-driver (1:10-9-3) ...
Setting up fglrx-glx (1:10-9-3) ...
Setting up fglrx-glx-ia32 (1:10-9-3) ...
Setting up libaudio2 (1.9.2-4) ...
Setting up mysql-common (5.1.49-3) ...
Setting up libmysqlclient16 (5.1.49-3) ...
Setting up libqtcore4 (4:4.6.3-4) ...
Setting up libqt4-xml (4:4.6.3-4) ...
Setting up libqt4-dbus (4:4.6.3-4) ...
Setting up libqt4-script (4:4.6.3-4) ...
Setting up libqtgui4 (4:4.6.3-4) ...
Setting up libqt4-designer (4:4.6.3-4) ...
Setting up libqt4-network (4:4.6.3-4) ...
Setting up libqt4-sql (4:4.6.3-4) ...
Setting up libqt4-qt3support (4:4.6.3-4) ...
Setting up libqt4-sql-mysql (4:4.6.3-4) ...
Setting up qt4-qtconfig (4:4.6.3-4) ...
update-alternatives: using /usr/bin/qtconfig-qt4 to provide /usr/bin/qtconfig (qtconfig) in auto mode.
Setting up fglrx-atieventsd (1:10-9-3) ...
Starting atieventsd: done.
Setting up fglrx-control (1:10-9-3) ...
Processing triggers for menu ...

兩個都裝完後,就會又ati catalys control center -- 類似windows 的 video driver control panel ,看一下 driver 是不是 OK。 開啟出現 error..所以依照說明,run $sudo aticonfig --init 重新建立 /etc/X11/xorg.cong 然後reboot.. ati catalys control center 就可以正常啟動,可以看到和設定 hd5650 的 harware 選項。 還有 lsmod, fglrx 的 reference 就不是 0 了。
接下來啟動 compiz-fusion-icon,Windows Manager 選 compiz。 在 Setting 可以選一些.. 記得要enable windows decorator,不然windows 上的三個button (minimize, maximum, close) 會不見。
glxgear 結果是1900 ~ 2300 FPS. 雖然跟這個無關.. 開啟chrome 的 hardware accelration,, about:flags .測一下http://www.kevs3d.co.uk/dev/asteroidsbench/
Benchmark Score: 2416
Average FPS: 51
爆笑的是..disable 的話,測出來:
Benchmark Score: 2428
Average FPS: 51

Auto Login - GDM

squeeze 上已經很簡單,就開啟 System -Administration - Login Screen
選一下自動login,設一下 timeout 秒數就可以了

2011年3月21日 星期一

new sd card.

買了 sd card : transend, 2G 和 4G (SDHC class 2) 外觀: 用 hd tune 測試結果: 2G:(TS2GUSD) 4G:(TS4GUSDHC2) 嗯。很奇怪,2G SD 的速度比 4G SDHC class 2 快。
買 transend 是因為"保固" 的方式,雖然各家都說有終身保固,但是實際上..
  • Sandisk : 要附上當初的購買證明,還有提供 sd card 序號!! (誰會留著這種東西?)
  • transend : 自己送到transend 的店裡去測試就可以換一塊
  • kingstone : 郵寄過去,就會換新的給你。
http://r40eubuntu.blogspot.com/2011/04/new-microsd-card-pendrive.html

2011年3月18日 星期五

iMX51 ddr_clk setting

Clock Control Module 李的 register : CBCMR (CCM Bus Clock Multiplexer Register).
field : 11-10 是 DDR clock multiplexer
決定 DDR 的 clock source: (1.0) * 00 : axi a * 01 : axi b * 10 : emi_slow_clk_root * 11 : ahb clock root 配合 u-boot 的 source code 就是:
static u32 __get_ddr_clk(void) { u32 ret_val = 0; u32 cbcmr = __REG(MXC_CCM_CBCMR); u32 ddr_clk_sel = (cbcmr & MXC_CCM_CBCMR_DDR_CLK_SEL_MASK) \ >> MXC_CCM_CBCMR_DDR_CLK_SEL_OFFSET; switch (ddr_clk_sel) { case 0: ret_val = __get_axi_a_clk(); break; case 1: ret_val = __get_axi_b_clk(); break; case 2: ret_val = __get_emi_slow_clk(); break; case 3: ret_val = __get_ahb_clk(); break; default: break; } return ret_val; } 現在debug output cbcmr - 0x0020C2. 所以 11.10 是 0 -- axi_a_clk.

然後 code 是去看 CBCDR ( CCM Bus Clock Divider Register ) 算出 DDR Speed。

source 有: enum pll_clocks { PLL1_CLK = MXC_DPLL1_BASE, PLL2_CLK = MXC_DPLL2_BASE, PLL3_CLK = MXC_DPLL3_BASE, };

分別是: #define AIPS2_BASE_ADDR 0x83F00000 #define PLL1_BASE_ADDR (AIPS2_BASE_ADDR + 0x00080000) #define PLL2_BASE_ADDR (AIPS2_BASE_ADDR + 0x00084000) #define PLL3_BASE_ADDR (AIPS2_BASE_ADDR + 0x00088000)
source code : lowlevel_init.S 設定 DDR 速度是修改 CBCDR. - ldr r1, =0x61E35100 + ldr r1, =0x71E35100 str r1, [r0, #CLKCTL_CBCDR]

DDR_CLK,有兩個 source 可以選,由CBCDR的 ddr_high_freq_clk_sel 決定。
  • 0 -- 有四個 source 可以選,由 CBCMR 的ddr_clk_sel 選擇
  • 1 -- 從 pll1_sw_clk (800MHz) 除頻, 除以 CBCDR 的ddr_clk_podf.(default 是 4,所以選這個會是 200MHz.


現在選的是 0,所以由四個 source 中選一個。 -- 選 0 -- form source 8.(axi_a)
這個就是 axi_a

axi_a 的第一階 source 有兩個,由CBCDR 的periph_clk_sel 決定 (這裡是選0 - pll2_sw_clk 665MHz)。

所以 最後 axi_a 就是 pll2_sw_clk 除頻,div = CBCDR:axi_a_podf+1 (預設是 3+1),所以預設的 axi_a 是 665MHz/4 = 166MHz。



所以 source code 寫錯了,沒有 考率到 ddr_clk 第一個 source select : CBCDR 的 ddr_high_freq_clk_sel 是 1 的狀況..

2011年3月16日 星期三

dropbox - in debian, manually download dropboxd

dropbox for debian,裝玩後要download dameon,但是好像沒有辦法 pass proxy。 所以 follow 這一篇 http://forums.dropbox.com/topic.php?id=3323 download dropbox-lnx.x86-1.0.20.tar.gz 下來解開 - .dropbox-dist 自己 run $./dropbox-dist/dropboxd & 就可以了
ref:http://forums.dropbox.com/topic.php?id=3323
Just wanted to post that I had the same problem that it said that it was downloading 
dropbox, but it never started or anything. (I do not use a proxy).
Manually extracting http://www.getdropbox.com/download?plat=lnx.x86 to my home 
directory did the trick. (I'm using Ubuntu 8.04)

哪個要用 root才會有的功能是在 file browser (natilus) 李,把sync file 打上 mark 的動作。 可以不要。 amd64 的 file link : http://www.getdropbox.com/download?plat=lnx.x86_64
後來有一次system update, nautilus 的 library version 好像換了,所以 dropbox 被 remove。 只好到 dropbox 網頁download source code 下來build。 build 的方法和一般 open source project 一樣, run ./configure, make , make install 就可以。 在 ./configure 時,會 report 缺的 library,再把他門補上去就可以。 從 source code build 完的好像叫 dropbox, 不是 dropboxd.

2011年3月15日 星期二

arcobat reader - amd64

adobe acrobat reader 要安裝的話,要用 www.debian-multimedia.org 裡的 acroreader。 到 adobe download linux 版 deb 只有 i386,沒有 amd64 的版本。
ref:

2011年3月14日 星期一

ffmpeg with libxvid libx264

deb http://www.debian-multimedia.org squeeze main non-free 加到 sources.list 中,

-- 實際上是去 download debian-multimedia-keyring_2010.12.26_all.deb 下來裝。

update 後,install avidemux ,就會因為 dependency problem,要 remove ffmpeg,選第二個 option,升級ffmpeg。

之後的 ffmpeg 就有 x264 跟 xvid 的 support -- 查是 non-free 裡的 ffmpeg.\
FFmpeg version SVN-r25838, Copyright (c) 2000-2010 the FFmpeg developers built on Jan 21 2011 08:21:58 with gcc 4.4.5 configuration: --enable-libdc1394 --prefix=/usr --extra-cflags='-Wall -g ' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-avfilter --enable-libdirac --disable-decoder=libdirac --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-libvpx --enable-librtmp --extra-libs=-lgcrypt --disable-altivec --disable-armv5te --disable-armv6 --disable-vis libavutil 50.33. 0 / 50.33. 0 libavcore 0.14. 0 / 0.14. 0 libavcodec 52.97. 2 / 52.97. 2 libavformat 52.87. 1 / 52.87. 1 libavdevice 52. 2. 2 / 52. 2. 2 libavfilter 1.65. 0 / 1.65. 0 libswscale 0.12. 0 / 0.12. 0 libpostproc 51. 2. 0 / 51. 2. 0 Hyper fast Audio and Video encoder
我的 win7 64 上 chrome 的版本是:10.0.648.133 ffmpeg convert divx 的 command 是: C:\Program Files (x86)\WinFF>"C:\Program Files (x86)\WinFF\ffmpeg.exe" -threads 4 -i "G:\nini\AHUO\nini1002\VIDEO_TS\VTS_01_1.VOB" -f avi -r 29.97 -vcodec libxvid -vtag XVID -s 640x480 -aspect 4:3 -maxrate 1800kb -b 1500kb -qmin 3 -qmax 5 -bufsize 4096 -mbd 2 -bf 2 -flags +4mv -trellis -aic -cmp 2 -subcmp 2 -g 300 -acodec libmp3lame -ar 48000 -ab 128kb -ac2 "G:\nini\AHUO\nini1002\VTS_01_1.avi"

2011年3月10日 星期四

gitosis

gitosis 大概是幫忙管理 git server 的 python script 集合。
幫助 設定,管理 git server。


安裝 gitosis 的步驟大概是:
  • 安裝 git-core, gitosis
  • 開一個 git user 帳號,設定 git user 的 home dir

aptitude install 完 gitosis,會create 一個 gitosis usr,home 是在 /srv/gitosis
/etc/passwd:
gitosis:x:104:113:git repository hosting,,,:/srv/gitosis:/bin/sh /src/gitosis 裡只有一個空 link, link到自己的 repository 目錄 (剛裝完,還沒create)。

第一個用來 init gitosis 的 rsa pub key 可以是任何一個 user 的,只是等一下要用那個 user 來 clone gitosis 的 config file。
- 所以用你自己 ~/.ssh/ 下的 就可以。

但是平時用來作 ssh connection key 的是 dsa, 這個要用的是 rsa,所以要重新產生一次。

用 gitosis 這個 user 來執行 gitosis-init 這個 command。
gitosis-init 會在你執行的目錄下產生工作目錄,所以一般教學的 command 都寫:
sudo -H -u gitosis gitosis-init < ~/.ssh/id_rsa.pub -H 代表 執行時,到該 user 的 HOME 下
-u gitosis 代表 switch 到 gitosis 這個 user 去執行
執行 gitosis-init 時,把自己的 id_rsa.pub 餵給他。

執行完後, gitosis 這個 user 的 HOME (/srv/gitosis) 目錄就多了兩個 folder:
gitosis, repositories


新增 project repo 的方法,就是修改 gitosis-admin.git/gitosis.conf 檔。

所以要 clone 下來,修改完commit 後再 push 回去。

之後新建一個 project,再加入這個 new repo 為 remote target.

gitosis-init 剛開始執行時給的 rsa/dsa pub key file 是設定一個可以 clone gitosis-admin 的 key (避免 雞-蛋 問題)。
所以餵進去的可以是任何人的 ssh pub key,但是等一下要用那個人的 account 來 clone gitosis-admin.


add user 的方法大概就是把那個人(的account) 的 pub key copy 到 keydir 下。
然後在gitosis.conf 中,就可以把"那個人" 加到 members 裡。

在 gitosis.conf 中,members 是寫 keydir 裡面,key file的 filename。
所以範例上,從各 client 把 pub key 送過來後,都會rename。
例如:
從 robot 的 charles 來的 id_dsa.pub,就 rename 成 charles@robot.pub。
然後,gitosis.conf 的 members 就可以寫
members = charles@robot 如果有兩個人,中間用 space 隔開: members = charles@robot tony@gps1004 members list 也可以寫 group name。 例如,先前定義過 allmembers group: [group allmembers] members = charles@robot tony@gps1004 nelson@thinkpad 下面新開的 repo 就可以這樣用:
[group bootloader] writable = a2-bootloader members = @allmembers

ref:

install adobe flashplayer plugin

先用 apt-get 安裝 flash installer:
$aptitude install flashplugin-nonfree 因為是屬於nonfree,所以 repo source 要把 nonfree 加進去才找得到。

裝完後再用 installer 進行安裝。
因為 installer 是用 root 作 wget 來 download,所以有 proxy 的化,要記得在 root 的環境中也要設好 http_proxy 變數。
乾脆就先 su 成 root 再作安裝
$ update-flashplugin-nonfree --install --verbose OK

log:
root@dellnb:~# update-flashplugin-nonfree --install --verboseoptions :  --install --verbose --
temporary directory: /tmp/flashplugin-nonfree.Nnwh4i7rfa
selected action = --install
wgetoptions= -nd -P .   -v --progress=dot:default
downloading http://people.debian.org/~bartm/flashplugin-nonfree/fp10.sha512.amd64.pgp.asc ...
--2011-03-10 09:24:27--  http://people.debian.org/~bartm/flashplugin-nonfree/fp10.sha512.amd64.pgp.asc
Connecting to 192.168.147.242:3128... connected.
Proxy request sent, awaiting response... 200 OK
Length: 1261 (1.2K) [text/plain]
Saving to: “./fp10.sha512.amd64.pgp.asc”

    0K .                                                     100%  138M=0s

2011-03-10 09:24:28 (138 MB/s) - “./fp10.sha512.amd64.pgp.asc” saved [1261/1261]

importing public key ...
verifying PGP fp10.sha512.amd64.pgp.asc ...
wgetoptions= -nd -P .   -v --progress=dot:default
--2011-03-10 09:24:28--  http://download.macromedia.com/pub/labs/flashplayer10/flashplayer10_2_p3_64bit_linux_111710.tar.gz
Connecting to 192.168.147.242:3128... connected.
Proxy request sent, awaiting response... 200 OK
Length: 4310219 (4.1M) [application/x-gzip]
Saving to: “./flashplayer10_2_p3_64bit_linux_111710.tar.gz”

    0K .......... .......... .......... .......... ..........  1% 59.8K 70s
 4200K .........                                             100%  129K=59s

2011-03-10 09:25:28 (71.4 KB/s) - “./flashplayer10_2_p3_64bit_linux_111710.tar.gz” saved [4310219/4310219]

verifying checksum flashplayer10_2_p3_64bit_linux_111710.tar.gz ...
unpacking flashplayer10_2_p3_64bit_linux_111710.tar.gz ...
verifying checksum contents of flashplayer10_2_p3_64bit_linux_111710.tar.gz ...
moving libflashplayer.so to /usr/lib/flashplugin-nonfree ...
setting permissions and ownership of /usr/lib/flashplugin-nonfree/libflashplayer.so ...
Flash Player version: LNX 10,3,162,29
moving flashplayer10_2_p3_64bit_linux_111710.tar.gz to /var/cache/flashplugin-nonfree ...
flash-mozilla.so - auto mode
 link currently points to /usr/lib/gnash/libgnashplugin.so
/usr/lib/gnash/libgnashplugin.so - priority 10
Current 'best' version is '/usr/lib/gnash/libgnashplugin.so'.
calling update-alternatives ...
flash-mozilla.so - auto mode
 link currently points to /usr/lib/flashplugin-nonfree/libflashplayer.so
/usr/lib/flashplugin-nonfree/libflashplayer.so - priority 50
/usr/lib/gnash/libgnashplugin.so - priority 10
Current 'best' version is '/usr/lib/flashplugin-nonfree/libflashplayer.so'.
end of action --install
cleaning up temporary directory /tmp/flashplugin-nonfree.Nnwh4i7rfa ...
end of update-flashplugin-nonfree


ref:

2011年3月9日 星期三

install new icon

download 下來的 icon 都是壓縮檔 (例如ICON-Kreski-Lines.tar.gz) 安裝的方法就是把他解開到 /usr/share/icons 下。 剛好解開的 folder 就是 icon option name。 解開後要 check 一下所有檔按的 read 屬性。 然後在 System -- Appearance -- Customize -- icon 就可以選到 (Kreski) 了。 -- 但是選完後好像要 logout 再 login.

2011年3月8日 星期二

sun-java6-sdk

sun-java6-jdk 在 nonfree,所以 reposit 要加入 nonfree 才找得到。 -- 這是說 squeeze.

MONACO Fonts

先Download MONACO fonts, (在dropbox),然後 force font cache rebuild: $sudo cp MONACO /usr/share/fonts/truetype $sudo fc-cache -f -v
ref:
  1. http://www.isnull.com.ar/2010/05/monaco-font-unbuntu.html
  2. http://linux.die.net/man/1/fc-cache

2011年3月7日 星期一

中文

裝完後中文顯示方塊字是沒有字型檔。
安裝一個中文字型,例如 xfonts-wqy。
輸入法裝 ibus, chewing
這樣大概就 OK.

測試一下,因為ibus-chewing沒辦法用 shift 換中英文,所以只好又用scim-chewing。
OK.

scim 裝完,好像要重開機。

Roy 的北海道禮物

收到Roy 北海道 禮物:
From blog
From blog
是 sunrise認證,不是山寨喔:
From blog

這是 TOMY的:
From blog
後來Roy又加送這個:
From blog

2011年3月3日 星期四

icon7 Bt mouse

為了沒有 小紅點 的 NB 買的 bt mouse : icon7
From blog
使用心得: 很糟,
  • 竟然沒有 win7 的 driver,所以他附的 driver 和 config tool 完全沒用,只能當一般沒功能的 mouse 用。
  • 耗電:電壓是鹼性電池的設計,所以充電電池會一直認為是 low battery
  • 靈敏度:還好,但是使用充電電池後,就變得比較重。大量使用會手酸
  • ubuntu 沒辦法用.. --- 天哪!!
vim72_w64, install.exe:This program sets up the installation of Vim 7.3 This program sets up the installation of Vim 7.3 Inspecting system... Install will do for you: 1 Install .bat files to use Vim at the command line: 2 Create C:\Windows\vim.bat 3 Create C:\Windows\gvim.bat 4 Create C:\Windows\evim.bat 5 Create C:\Windows\view.bat 6 Create C:\Windows\gview.bat 7 Create C:\Windows\vimdiff.bat 8 Create C:\Windows\gvimdiff.bat 9 Create C:\Windows\vimtutor.bat 10 Create startup file D:\InstalledAp\_vimrc with: 11 - run Vim with syntax highlighting and other features switched on 12 - Remap a few keys for Windows behavior (, , etc) 13 - The mouse right button has a popup menu (the Windows way) 14 Install an entry for Vim in the popup menu for the right mouse button so that you can edit any file with Vim 15 Add Vim to the "Open With..." list in the popup menu for the right mouse button so that you can edit any file with Vim 16 Add Vim to the Start menu 17 Create a desktop icon for gVim 18 Create a desktop icon for gVim Easy 19 Create a desktop icon for gVim Read-only 20 Create plugin directories: In the VIM directory To change an item, enter its number Enter item number, h (help), d (do it) or q (quit):

標籤

網誌存檔