richliu’s blog

Linux, 工作, 生活.

richliu’s blog header image 4

Entries Tagged as 'UNIX'

Linux kernel 2.6.24 Porting 雜記.

May 15th, 2008 · 2 Comments

最近將某個 Device Porting 從 2.6.16 Porting 上 2.6.24, 記錄一下碰到的問題.
1. Network Driver
當有這樣的訊息時
# ifconfig eth0 up
SIOCSIFFLAGS : invalid agument
我碰到的狀況是, MAC Address 必需要在 probe 時先行 initial 完成.
若是沒有完成, ifconfig 就會出現這樣的錯誤訊息, 原因仍然不明.
我的做法就是加一行
memcpy(dev->dev_addr , addr, 6); 這樣就可以了.
2.6.24 的 NAPI Interface 改過了, 上比對一下 2.6.23 和 2.6.24 的 Code 就可以知道改了什麼地方.
netif_poll_* 的 interface 改名了以外, NAPI hook 的 _poll function 在傳入參數和結構上有小小的修正
2.6.24 修改了 NAPI 的呼叫法, 對我這邊比較複雜的 [...]

[Read more →]

Tags: Linux

[Gentoo] x61 vmware 效能低落問題.

May 2nd, 2008 · No Comments

最近換了 x61, 如果不跑 vmware, 效能還不錯.
如果裝了 vmware 6, performance 馬上就變差, 不僅僅是 vmware, 連 host OS 也會受影響.
這個症狀是vmware 內有大量的 IO 存取, 至於存取什麼並不清楚.
在網路上也很難找相關的訊息, 後來找到一篇是說和 ACPI 有關,
在 grub 加上二個參數 noapic nolapic 就可以暫時解決這個問題.
kernel (hd0,4)/vmlinuz root=/dev/sda6 noapic nolapic
20080516 Update:
事實上是 kvm/kvm_intel module 要拿掉, 要不然會大幅影響 Performance.
Edit file /etc/modprobe.d/blacklist 加上這二行就可以了
blocklist kvm
blocklist kvm_intel

Tags: Gentoo, vmware

[Read more →]

Tags: Gentoo

Trace32 在 Ubuntu 上執行的問題

April 7th, 2008 · No Comments

Trace32 在 ubuntu 上會抓不到 USB device, 在 Gentoo 上並沒有這樣的問題.
這是因為 ubuntu USB device 預設不會建立相容目錄 /proc/bus/usb .
這時候就要修改 /etc/init.d/mountdevsubfs.sh , 找到
#
# Magic to make /proc/bus/usb work
#
mkdir -p /dev/bus/usb/.usbfs
domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
ln -s .usbfs/devices /dev/bus/usb/devices
mount --rbind /dev/bus/usb /proc/bus/usb
將最後四行的 "#" unmark 掉.
然後建立 system group 給 usb 的使用者
sudo addgroup --system usbusers
# Output [...]

[Read more →]

Tags: Embedded · Hardware · UNIX

[Java] Assertion `c->xlib.lock’ failed

March 24th, 2008 · No Comments

今天要在 Gentoo 上跑 Freemind 時, Java 會出現這一段訊息
Checking Java Version...
Locking assertion failure. Backtrace:
#0 /usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0x47) [0x4cea1997]
java: xcb_xlib.c:82: xcb_xlib_unlock: Assertion `c->xlib.lock' failed.
暫時的修正方法
# cd /opt
# find -name libmawt.so | grep "xawt/libmawt.so" | xargs sed -i 's/XINERAMA/FAKEEXTN/g'
Ref.
xcb_xlib.c:50: xcb_xlib_unlock: Assertion 'c->xlib.lock' failed.

Tags: Java

[Read more →]

Tags: Linux · Software

[Gentoo] Linux 2.6.24 和 ntfs3g 配合的問題.

February 28th, 2008 · 2 Comments

昨天剛拿到新的 Notebook X61, 想將使用己久的 FAT32 系統換 NTFS (主要還是為了不爭氣的 Windows 做檔案交換用, 而且因為用 VirtualBox, 單一檔超過 2G, FAT32 不吃(手賤嘛).
結果從昨天試到今天, 當 file copy 進用 ntfs-3g mount 的 Disk 時. 就是會出現 Core Dump, 這邊節錄三行就好了.
BUG: soft lockup - CPU#1 stuck for 11s! [wget:28163]
Pid: 28163, comm: wget Not tainted (2.6.24-gentoo-r2 #4)
EIP: 0060:[] EFLAGS: 00000246 CPU: 1
現在小朋友不睡覺, 只好抱著小朋友, 順便找找有沒有什麼解決方案, 最後在 Gentoo Forums [...]

[Read more →]

Tags: Gentoo · Linux

Wii 上也可以執行 Linux 了.

February 27th, 2008 · No Comments

Digg 報導, Wii 上己經可以執行 Linux 了.
目前是提供 Linux kernel 2.6.24 的 patch. 而這是使用 USB Gecko 的成果.
不過如果連 USB Gecko 都出來了, Linux support Wii 只是早晚的事情吧 XD
謎之音 : 不知道這個 USB Gecko可不可以拿來當金手指.

Tags: Linux, Wii

[Read more →]

Tags: Embedded · GAME · Hardware · Linux

[ARM] chroot 出現 Message “Illegal Instruction”

February 21st, 2008 · 2 Comments

記錄一下,
不僅僅是 chroot 以外, 如果執行任何程式有 "Illegal Instruction" 時, 記得將 kernel 的 NWFPE 選項 enable.

Tags: arm, kernel, Linux

[Read more →]

Tags: Embedded · Hardware · Linux

Bind 9 Performance Test, Gentoo 奪冠

February 19th, 2008 · No Comments

本期的 Gentoo Monthly Newsletter: 18 February 2008
ISC 針對 8 個平台(包含 Linux, FreeBSD, Solaris, Windows) 做的 DNS Query Test.
Gentoo 以 93,000/sec 次奪冠, 遠超過 Windows 平台 4 倍以上.
不過......
一般不會有這麼大量的 DNS Query 吧, 除非是攻擊.

Tags: Bind, Gentoo, Linux, Performance Test

[Read more →]

Tags: Gentoo · UNIX

Seagate ES.2 ST31000340NS 在 Linux 下只抓到 33MB 的問題.

February 18th, 2008 · No Comments

過年前, 因為某台機器連續壞了二顆 Seagate 250G HDD.
所以備載容量下降 500G.
在 slzzp 的道德勸說之下(他說資料比金錢重要呀), 所以最後就選了 Seagate ES.2 ST31000340NS (1000G) 的 HDD 做為備援.

Tags: Hardware, hdparm, Linux, linux ide, seagate, ST31000340NS

[Read more →]

Tags: Hardware · Linux

Wine 0.9.54 Released

January 27th, 2008 · No Comments

本來 Wine 就是一直在升級的, 不過這次瞄到 Wine 0.9.54 Release Note
- Photoshop CS/CS2 should now work, please help us testing it.
See http://wiki.winehq.org/AdobePhotoshop for details.
有些人可以弄來試試了

Tags: Linux, Wine

[Read more →]

Tags: Linux · Software