Lucidi8xxFreezes
最近升級至 Ubuntu 10.10 之後,X40 的顯卡似乎就沒辦法正常運作圖行加速的功能。
於似乎找到了上面連結的討論。也花了一兩個早上在試著把圖顯加速的功能開啟。
試到至今的結果是可以開啟圖顯加速,但畫面會產生破損的情況。(等於沒用)
如果想要好一點的圖顯加速功能似乎也只能退回至10.04版加上舊版的kernel.
以上,很不甘心的結案。(會再持續觀察)
2011年3月10日 星期四
2011年2月7日 星期一
[Tips] 監控 dmesg 命令的即時訊息
- 參考來源: watch-file-while-it-changes-dmesg.html
- 命令: watch "dmesg |tail --lines=$(($LINES-4))"
- 參數說明:
- watch: 關察 “命令” 的變化
- tail --line: 欲顯視之行數多寡
- $LINES:目前終端機之顯示行數
2010年12月28日 星期二
Ubuntu 10.10 & ThinkPad(X40) 中鍵捲動
事由
某日心血來潮在台年齡超過七年的ThinkPad上面裝上 Ubuntu 10.10,
結果…中鍵的功能卻少了可以上下捲動的功能,
只好靠著 GOOGLE 找到了這樣的文章~~來暫時解決一下囉!
參考網站文章
http://www.eastwoodzhao.com/thinkpad-middle-button-scroll-ubuntu-linux-10-04-lucid-lynx/
修改步驟
For 10.04
某日心血來潮在台年齡超過七年的ThinkPad上面裝上 Ubuntu 10.10,
結果…中鍵的功能卻少了可以上下捲動的功能,
只好靠著 GOOGLE 找到了這樣的文章~~來暫時解決一下囉!
參考網站文章
http://www.eastwoodzhao.com/thinkpad-middle-button-scroll-ubuntu-linux-10-04-lucid-lynx/
修改步驟
- 新增檔案
| sudo gvim /usr/share/X11/xorg.conf.d/20-thinkpad.conf |
For 10.04
| sudo nano /usr/lib/X11/xorg.conf.d/20-thinkpad.conf |
- 加入檔案內容
| Section "InputClass" Identifier "Trackpoint Wheel Emulation" MatchProduct "TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite TouchPad / TrackPoint" MatchDevicePath "/dev/input/event*" Option "EmulateWheel" "true" Option "EmulateWheelButton" "2" Option "Emulate3Buttons" "false" Option "XAxisMapping" "6 7" Option "YAxisMapping" "4 5" EndSection |
- 存檔及重新開機...
2010年11月30日 星期二
Porting lsusb & libusb on Android.
目的
在Android User Mode 下,透過 libusb 操作 USB Device,如:送出 Control MSG 至 Device。
參考文件
Using Android in Industrial Automation
Technical Report
A student semester project at the University of Applied Sciences Northwestern Switzerland for the Institute of Automation
Authors: Manuel Di Cerbo, and Andreas Rudolf
Project principal: Matthias Meier ⃝
FHNW/IA, 29.01.2010
源碼下載
libusb-1.0.8.tar.bz2
檔案放置
libusb: /external/libusb-1.0.8/
lsusb: /external/lsusb/lsusb.c
編譯及安裝
重新make & download image 試試看在 shell 底下 lsusb 能不能動囉!
在Android User Mode 下,透過 libusb 操作 USB Device,如:送出 Control MSG 至 Device。
參考文件
Using Android in Industrial Automation
Technical Report
A student semester project at the University of Applied Sciences Northwestern Switzerland for the Institute of Automation
Authors: Manuel Di Cerbo, and Andreas Rudolf
Project principal: Matthias Meier ⃝
FHNW/IA, 29.01.2010
源碼下載
libusb-1.0.8.tar.bz2
檔案放置
libusb: /external/libusb-1.0.8/
lsusb: /external/lsusb/lsusb.c
編譯及安裝
- 新增 libusb-1.0.8/Android.mk
ifeq ($(TARGET_ARCH),arm)
LOCAL_PATH:= $(call my-dir)
subdirs := $(addprefix $(LOCAL_PATH)/,$(addsuffix /Android.mk, \
libusb \
))
include $(subdirs)
endif
- 新增 lsusb/Android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := lsusb.c
LOCAL_MODULE := lsusb
LOCAL_C_INCLUDES += external/libusb-1.0.8/
LOCAL_SHARED_LIBRARIES := libc libusb
include $(BUILD_EXECUTABLE)
- 修改libusb-1.0.8/libusb/io.c
#ifndef TIMESPEC_TO_TIMEVAL
#define TIMESPEC_TO_TIMEVAL(tv, ts) \
do { \
(tv)->tv_sec = (ts)->tv_sec; \
(tv)->tv_usec = (ts)->tv_nsec / 1000; \
} while(0)
#endif /* end of TIMESPEC_TO_TIMEVAL */
為了解決
E: undefined reference to ‘TIMESPEC_TO_TIMEVAL’
S: defined TIMESPEC_TO_TIMEVAL macro in libusb/io.c
- 在 memory map(
/build/core/prelink-linux-arm.map 中加入 libusb.so(會依 platform 不同而有所不同)# extended system libraries
libusb.so 0xAE600000
libril.so 0xAE400000
如果沒有定義 memory address,在編譯時會產生底下的錯誤訊息:
E: build/tools/apriori/prelinkmap.c(137): library ’libusb.so’ not in prelink map
S: build/core/prelink-linux-arm.map
- 在 init.rc 的 on boot 節(session) 中加入 mount usbfs 的命令:
# usbfs
mkdir /proc/bus/usb 0771
mount usbfs none /proc/bus/usb -o devmode=0666
重新make & download image 試試看在 shell 底下 lsusb 能不能動囉!
2010年6月6日 星期日
Android (or Android-x86) 開發環境的設置及工具安裝
<<設定Build code 及環境的文章多不可數,但還是仍然放置在這邊,供自己查詢使用。 >>
開發環境的設置及工具安裝:
開發環境的設置及工具安裝:
- 系 統設定 -- Using Ubuntu 10.04 or 9.10
-- 安裝 JDK5
# 開啟 APT 設定檔
$sudo gedit /etc/apt/sources.list
# 加入 server For sun-java5-jdk
deb http://ir.archive.ubuntu.com/ubuntu jaunty-updates main multiverse
# 更新及安裝 JDK5
$sudo aptitude update
$sudo aptitude install sun-java5-jdk
-- 安裝 相關工具
$sudo apt-get install gcc g++
$sudo apt-get install flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind libreadline5-dev
-- 安裝 GIT
$sudo apt-get install git-core
-- 額外的部份: X11/Xatom.h & X11/Xlib.h (非必要):
# provides Xatom.h
$sudo apt-get install x11proto-core-dev
# provides Xlib.h
$sudo apt-get install libx11-dev
# 開啟 APT 設定檔
$sudo gedit /etc/apt/sources.list
# 加入 server For sun-java5-jdk
deb http://ir.archive.ubuntu.com/ubuntu jaunty-updates main multiverse
# 更新及安裝 JDK5
$sudo aptitude update
$sudo aptitude install sun-java5-jdk
-- 安裝 相關工具
$sudo apt-get install gcc g++
$sudo apt-get install flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind libreadline5-dev
-- 安裝 GIT
$sudo apt-get install git-core
-- 額外的部份: X11/Xatom.h & X11/Xlib.h (非必要):
# provides Xatom.h
$sudo apt-get install x11proto-core-dev
# provides Xlib.h
$sudo apt-get install libx11-dev
- 建立 bin 目錄
$mkdir ~/bin
- 創 建 repo
$curl http://android.git.kernel.org/repo > ~/bin/repo
# 變更 repo 為可執行檔
$chmod a+w ~/bin/repo
- 把 repo 的路徑加至 $PATH
# 編輯 ~/ 底下的 .bashrc 檔案,加上底下這行
export PATH=$HOME/bin:$PATH
export PATH=$HOME/bin:$PATH
- 建 立workspace
# 新建目錄放置 Android Source Code. 底下使用 來代表自訂的名稱。
$mkdir ~/
$cd ~/
$mkdir ~/
$cd ~/
- 從 官方 server 的 GIT source tree 下載 Source Code
# 初始化要下載的文件清單
$repo init -u git://android.git.kernel.org/platform/manifest.git
# 同步資料庫(下載 Source Code)
$repo sync
$repo init -u git://android.git.kernel.org/platform/manifest.git
# 同步資料庫(下載 Source Code)
$repo sync
- 在 有 HTTP Proxy 設定的情況下,我們需要透過 SSH , 把 git port 轉至 http port,所以需要透過 connect.c 程式,相關的設定如下:
下載 connect.c, http://www.meadowy.org/~gotoh/ssh/connect.c
請個別使用相關的設定值。
請個別使用相關的設定值。 可使用 cd ~; pwd 查詢。
編 譯 connect 執行檔,並且放置在 ~/bin/ 目錄下。$gcc connect.c -o connect
$cp connect ~/bin/.
$chmod a+x ~/bin/connect
新增 proxy-cmd.sh, socks-gw.sh, sock-gw.sh 於 ~/bin/ 。
$cd ~/bin
$touch proxy-cmd.sh
$chmod a+x proxy-cmd.sh
$touch socks-gw.sh
$chmod a+x socks-gw.sh
$touch socks-ssh.sh
$chmod a+x socks-gw.sh
編輯 ~/bin/proxy-cmd.sh 內容:
(echo "CONNECT $1:$2 HTTP/1.0"; echo; cat ) | socket | (read a; read a; cat )
編輯 ~/bin/socks-gw.sh 內容:#!/bin/sh
# ~/bin/socks-gw.sh
# This script connects to a HTTP proxy using connect.c
connect -H: $@
編輯 ~/bin/socks-ssh.sh 內容:#!/bin/sh
# ~/bin/socks-ssh.sh
ssh -o ProxyCommand="/bin/socks-gw.sh %h %p" $@
新增 proxy.sh 於 ~/ 。
$cd ~
$touch proxy.sh
$chmod a+x proxy.sh
編輯 proxy.sh 內容:
#!/bin/sh
# ~/proxy.sh
# http proxy setting
export HTTP_PROXY=http://:
export http_proxy=$HTTP_PROXY
# set git to use ssh over http proxy
export GIT_SSH="/bin/socks-ssh.sh"
export GIT_PROXY_COMMAND="/bin/socks-gw.sh"
在 執行 repo sync 前,請先在workspace folder 中執行:
$source ~/proxy.sh
參考網頁:http://mmmyddd.freeshell.net/wiki/android/build.html#sec4
編 譯 connect 執行檔,並且放置在 ~/bin/ 目錄下。$gcc connect.c -o connect
$cp connect ~/bin/.
$chmod a+x ~/bin/connect
新增 proxy-cmd.sh, socks-gw.sh, sock-gw.sh 於 ~/bin/ 。
$cd ~/bin
$touch proxy-cmd.sh
$chmod a+x proxy-cmd.sh
$touch socks-gw.sh
$chmod a+x socks-gw.sh
$touch socks-ssh.sh
$chmod a+x socks-gw.sh
編輯 ~/bin/proxy-cmd.sh 內容:
(echo "CONNECT $1:$2 HTTP/1.0"; echo; cat ) | socket
編輯 ~/bin/socks-gw.sh 內容:#!/bin/sh
# ~/bin/socks-gw.sh
# This script connects to a HTTP proxy using connect.c
connect -H
編輯 ~/bin/socks-ssh.sh 內容:#!/bin/sh
# ~/bin/socks-ssh.sh
ssh -o ProxyCommand="
新增 proxy.sh 於 ~/ 。
$cd ~
$touch proxy.sh
$chmod a+x proxy.sh
編輯 proxy.sh 內容:
#!/bin/sh
# ~/proxy.sh
# http proxy setting
export HTTP_PROXY=http://
export http_proxy=$HTTP_PROXY
# set git to use ssh over http proxy
export GIT_SSH="
export GIT_PROXY_COMMAND="
在 執行 repo sync 前,請先在workspace folder 中執行:
$source ~/proxy.sh
參考網頁:http://mmmyddd.freeshell.net/wiki/android/build.html#sec4
2008年12月9日 星期二
2008年3月2日 星期日
訂閱:
文章 (Atom)