2009年4月6日 星期一

Embedded Linux Porting

Framebuffer device 驅動後的Tux logo


使用PicoTK在Framebuffer上隨機繪圖(線圓/長方形, 實心圓/長方形)
來產生類似screensaver的效果


新工作一個多月了, 上面兩張圖是這一陣子來的工作成果
工作內容的緣故需要在工作平台上建構Linux 環境
儘管port過幾個embedded os, 針對embedded linux platform寫過driver
然而從頭到尾作Linux kernel porting這倒是頭一遭
兩張圖是porting後實作framebuffer device driver, 並且在kernel與application上的結果
(picotk的畫圓的過程, 是相當著名的演算法)

出乎我意料的是, linux porting相關的資訊並不算是豐富
有機會再在blog上分享一些心得


以下是boot log (敏感部份, 經過馬賽克處理)

Uncompressing Linux.........................
.. done, booting the kernel.
Linux version 2.6.27.15 (champ@champ-laptop) (gcc version 4.3.2 (GCC)
) #423 Fri Apr 3 15:05:02 CST 2009
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
Machine: XXXXX XXXXX Technology XXXXXX processor
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 508
Kernel command line: mem=2M@0x1000000 initrd=0x1180000,161524
Trying to install interrupt handler for IRQ0
Trying to install interrupt handler for IRQ1
Trying to install interrupt handler for IRQ2
Trying to install interrupt handler for IRQ3
Trying to install interrupt handler for IRQ4
Trying to install interrupt handler for IRQ5
Trying to install interrupt handler for IRQ6
Trying to install interrupt handler for IRQ7
Trying to install interrupt handler for IRQ8
Trying to install interrupt handler for IRQ9
Trying to install interrupt handler for IRQ10
Trying to install interrupt handler for IRQ11
Trying to install interrupt handler for IRQ12
Trying to install interrupt handler for IRQ13
Trying to install interrupt handler for IRQ14
Trying to install interrupt handler for IRQ15
Trying to install interrupt handler for IRQ16
Trying to install interrupt handler for IRQ17
Trying to install interrupt handler for IRQ18
Trying to install interrupt handler for IRQ19
Trying to install interrupt handler for IRQ20
Trying to install interrupt handler for IRQ21
Trying to install interrupt handler for IRQ22
Trying to install interrupt handler for IRQ23
Trying to install interrupt handler for IRQ24
Trying to install interrupt handler for IRQ25
Trying to install interrupt handler for IRQ26
Trying to install interrupt handler for IRQ27
Trying to install interrupt handler for IRQ28
Trying to install interrupt handler for IRQ29
Trying to install interrupt handler for IRQ30
Trying to install interrupt handler for IRQ31
PID hash table entries: 16 (order: 4, 64 bytes)
console [ttyXXX0] enabled
Dentry cache hash table entries: 1024 (order: 0, 4096 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 2MB = 2MB total
Memory: 1036KB available (660K code, 45K data, 60K init)
Calibrating delay loop... 47.82 BogoMIPS (lpj=239104)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
done
Freeing initrd memory: 157K
fb0: XXXXXX frame buffer alive and kicking !
Serial: XXXXXX driver
ttyXXX0 at I/O 0xe0006400 (irq = 25) is a XXXXXX
Freeing init memory: 60K
sh: can't access tty; job control turned off
#

是的, 你沒看錯, 記憶體只有2MB
經過調整, 開機後還有600KB 左右的空間

過程中使用的是buildroot 建構toolchain, 以降低application的大小
有興趣的或是工作相關者, 歡迎討論, 並交換一下訊息與意見.

沒有留言:

Android 軟體架構轉變的進行式

今日在 Google 的 Android Developer Blog 上貼出了篇名為的 "Here comes Treble: A modular base for Android" 貼文, 這是一件對於 Android 生態系統的大事, 也是 Googl...