richliu’s blog

Linux, 工作, 生活.

richliu’s blog header image 4

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] 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

Linux Kernel 2.6.24 Released.

January 26th, 2008 · No Comments

Linux kernel 2.6.24 己經在昨天 Released. 可以直接到 Kernel.org Download
要知道詳細的改變, 可以看 Kernelnewbies Linux Kernel 2.6.24
這邊列出我自己對於這次改版比較重要的地方

CFS improvement (Performance improvement, Fair group scheduling, Guest time reporting)
Tickless support for x86-64, PPC, UML, ARM, MIPS : 不知道 ARM 加上 Tickless support 會不會增加 Performance ?
New wireless drivers and configuration interface
Anti-fragmentation patches : 這個 Patch 很重要, 尤其是在記憶體不夠的 Embedded Linux, 現在整合進來或許以前某些奇怪的問題就可以解決了吧
Per-device [...]

[Read more →]

Tags: Linux

[Linux][Kernel] Kernel Oops 網站.

December 21st, 2007 · No Comments

http://www.kerneloops.org 是一個會收集 mailing list 和 bugzilla 的網站, 他將收集到的 oops 整理成一份簡單的 report.
這樣大家就可以知道, 那一版的 kernel 有多少個什麼類型的 Bug.
Bug Report 包含 module 和 backtrace, 不過不含原始網站連結, 這是比較可惜的地方
常常碰 embedded linux 的人, 常常要找一些莫名的 bug, 有時候為了節省時間,
會想辦法看看有沒有相對應的 Bug Patch, 如果有就非常方便.
這個網站看起來是可以節省一些 Search 的時間, 運氣好說不定碰到的 Bug 是同一個呀
Ref.
Kernel Trap : Collecting Kernel Oops Data
[Tags] Linux, kernel, oops [/Tags]

Tags: kernel, Linux, oops

[Read more →]

Tags: Embedded · Linux

[Linux][Kernel][Driver] 老師有沒有說, 不要用 cb!

October 25th, 2007 · 1 Comment

之前就苦口婆心的說, Network Driver 不要偷用 sk_buff 內的 cb .
就是有人不聽, 一定要用!

Tags: Linux

[Read more →]

Tags: Embedded · Linux · Programming