2005/10/19 

PalmSource加入OSDL

Wednesday, October 19, 2005
10/19/2005 5:40:28 AM

PalmSource加入OSDL

PalmSource宣佈加入 「開原碼開發實驗室」(OSDL),PalmSource將成為這個實驗室「行
動Linux計畫」的成員。全文:http://lxer.com/module/newswire/view/45422/

OSDL Mobile Linux Initiative 網址:http://www.osdl.org/lab_activities/mobile_linux/mli
主要技術:
* Fast Boot
* Memory Footprint
* Multi-media Framework
* Power Managment
* Radio Interface
* Real-time
* Security
* SoC Data Paths
主要廠商:MontaVista、Wind River Systems、PalmSource


PalmSource資料
2005年9月26日宣佈和Microsoft,Verizon Wireless合作開發和銷售Treo智慧手機(WinCE 5.0)。
2005年9月9日宣佈被日本Access公司併購(3.24億美元)
2004年12月9日收購China MobileSoft
2003年8月Palm獨立Palm OS的業務部門為PalmSource
1999年9月 spin out 3Com

 

Linux Boot Logo Support

Wednesday, October 19, 2005
10/19/2005 5:01:26 AM

Linux Boot Logo Support
開機時如果想要有圖形化的Logo,那你需要這個http://www.bootsplash.org/
它支援2.4.18-2.4.22 和2.6 kernel (更新版也是支援的)

如果你是2.0和2.2的kernel,那你需要 LINUX Boot Logo Patch
它至少支援2.0.36和2.2.x
http://www.hanno.de/linux-bootlogo/


bootsplash在2.6.10的使用方法
# cd linux-2.6.10
# patch -p1 < .. /bootsplash-3.1.4-2.6.10.diff make menuconfig 來設定核心支援 bootsplash: Console drivers --->
[*] VGA text console
[*] Video mode selection support
Frame-buffer support --->
[*] Support for frame buffer devices
[*] VESA VGA graphics console
[*] Use splash screen instead of boot logo
另外你需要bootsplash的utilities和 etc/rc.d的scripts
http://www.bootsplash.org/dload.html

另外2.6的Kernel也已經支援Linux logo了
可以試試,但限制較多
http://seclists.org/lists/linux-kernel/2003/May/att-3345/linux-logo-HOWTO_txt

2.6.12
Device Drivers --->
Graphics support --->
[*]Virtual Frame Buffer Support(ONLY FOR TESTING!)
[*]Bootup logo
[ ] Standard black and white Linux logo
[ ] Standard 16-color Linux logo
[*] Standard 224-color Linux logo

 

Linux有多少發行套件呢?

Wednesday, October 19, 2005
10/19/2005 2:31:59 AM
Linux有多少發行套件呢?

之前知道的是http://lwn.net/Distributions
現在再介紹http://distrowatch.com
目前(2005/10/19) distrowatch收集了386個套件(另有9個BSD),其中50個至少2年沒有更新了
這個網站為每個套件有以下的Link,還蠻方便找到資料的

例如CentOS
發行版 CentOS
首頁 http://www.centos.org/
發源地 Global
郵件諮詢清單 http://www.centos.org/modules/tinycontent/
論壇 http://www.centos.org/modules/newbb/index.php
CentOS Forum
Sponsored User Forums LinuxForums.org
Sponsored User Forums LinuxQuestions.org
說明文件 --
下載處 / 映射網站 http://www.centos.org/modules/tinycontent/
See also: LinuxQuestions.org - ISO Downloads . The Linux Mirror Project
相關網站連結 eLucis.com . Freshmeat
評論 4.x: Internet.com (Japanese) . Linux.com . Linux Planet
3.x: Linux Times . LinuxPlanet . NewsForge
狀態 This distribution is active.


另外它有按國家排列喔!
依國家發行數排列的有
US 63
Germany 25
France 22
Spain 22
Canada 20
Brazil 15 巴西
Italy 13
Japan 13
UK 13
China 9
Netherlands 8 荷蘭
Poland 8 波蘭
Switzerland 7 瑞士
Global 7
Korea 6
Argentina 4 阿根廷
Australia 5
Austria 4 奧地利
Czech Republic 4 捷克
Hungary 4 匈牙利
Romania 4 羅馬尼亞
Russia 4 俄羅斯
Finland 3 芬蘭
HK 3
Taiwan 3
B2D Linux中文作業系統計劃
Chinese Linux Extension中文延申套件
Linpus Linux百資

2005/10/15 

有更好的找資料方法嗎?告訴我吧

Saturday, October 15, 2005
10/15/2005 12:51:09 AM

有更好的找資料方法嗎?告訴我吧
每當有人提到他有好的方法可以上網找到資料時,我總是特別的關注,深恐自已不知道"那"個方法
,我想這應該和喜歡用eMule,P2P下載的人一樣的心情吧(不管用不用的到,Download先....
真希望我的HD無限大)。有我不知道的好方法嗎?快告訴我吧。


以下整理自"教授為什麼沒告訴我"一書,作者:畢恆達
期刊論文
Science Citation Index SCI 科學引用索引資料庫
Social Sciences Citation Indes SSCI 社會科學引用索引資料庫
Arts & Humanities Citation Index A&HCI 藝術與人文引用索引資料庫
PsycINFO 心理學文獻電子資料庫
SOCIOFILE 社會學期刊論文索引與摘要資料庫
Educational Resources Information Center (ERIC 教育相關文獻資料庫)
readopac.ncl.edu.tw/html/frame1.htm 中華民國期刊論文索引影像系統

學術論文
國外論文ProQuest Dissertations & Theses(PQDT)
1997年後的論文有24頁的pdf
http://wwwlib.umi.com/dissertations/search
國內博碩士論文
http://etds.ncl.edu.tw/

書籍
全國圖書書目 http://nbinet1.ncl.edu.tw/screens/opac_menu.html
美國國會圖書館 http://catalog.loc.gov/
英國國家圖書館 http://catalogue.bl.uk

商業書店
美國 Barnes & Noble ,Amazon
台灣:博客來
英國TSO online Bookshop 五十萬本

2005/10/13 

GCC Linker Script

Friday, October 14, 2005
10/13/2005 7:59:46 PM

GCC Linker Script
Q:很多人在compiler linxu kernel 時會發現x.lds的檔案,例如vmlinux.lds/bootloader.lds,它有什麼做用呢?
A:lds是一種 Linker Script,它可以指定link後的Memory layout
例如SECTIONS是一種用來描述memory layout的commmand

以下表示 所有的code都要載入到0x10000
data要從0x8000000開始
bss要放在data之後
SECTIONS
{
. = 0x10000; //.為目前位址
.text : { *(.text) } //所有object file中的 .text都擺到text
. = 0x8000000; //目前位址移到0x8000000;
.data : { *(.data) }
.bss : { *(.bss) }
}

註:
.text是程式段
.data是已初使化的段
.bss是未初使化的段
你可以使用
#readelf -a hello 來看看你自已的程式
Ref. http://www.delorie.com/gnu/docs/binutils/ld.html#SEC_Top

2005/10/12 

幾個監看/改變Linux系統的記憶體/Process/CPU使用有關的指令

Wednesday, October 12, 2005
10/12/2005 5:01:57 AM
幾個監看/改變Linux系統的記憶體/Process/CPU使用有關的指令
1.ps 檢視目前正在執行中的 process
參數: 注意沒有加"-"並不是代表省略 例如pa -a 和 ps a是不太相同的
-a : 顯示在所有終端機下所執行的程序(含其它使用者)。
a : 顯示在現在的終端機下所執行的所有程序(同-a再加上顯示command的參數)。
-A : 顯示所有的程序(含服務)。
-f : 顯示 UID、PPIP(父process)、C、STIME 欄位。
S : 列出程序時,包含『已死亡』 的子程序資訊。
u : 以使用者程序為主的格示來顯示。
v : 以虛擬記憶體的格式來顯示。
V : 顯示版本資訊。
x : 顯示所有的程序,不以終端機來分別。
範例:
ps -A |grep hello hello有沒有在執行
ps -f -A 可以看到所有process關係,例如PID=1的init共有多少子孫(建議改用pstree)
2.nice/renice 改變Process的優先順序,-19 為最高而 20 為最低。

nice Command &(將程式放到背景執行,同時指定優先順序為 10。)
nice # Command &(將程式放到背景執行,同時指定優先順序為#。)

renice # [#]ProcessID(將指定的背景中執行程式的優先順序設定為 #。)
renice -u UserName # [#]ProcessID(將指定的使用者的背景中執行程式的優先順序全部 設定為#。)

3.top 顯示目前的系統使用概況
預設以 CPU 使用率排序
以Memory使用率排序。
以執行時間排序。
檢視命令列的參數。


檢視命令列的參數。
按檢視特定的使用者。
離開。

4.vmstat 可用來顯示 processes, memory, paging, block IO, traps, 與 cpu activity。
# vmstat 1 //更新速度為1秒
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
0 0 0 140088 5272 30600 0 0 305 73 1035 295 3 8 84 5
0 0 0 140088 5272 30600 0 0 0 0 1003 9 0 0 100 0
The fields of vmstat's display are
procs
r: The number of processes waiting for run time.
b: The number of processes in uninterruptible sleep.
swpd swapped

memory (in Kbytes)
swpd: the amount of virtual memory used.
free: the amount of idle memory.
buff: the amount of memory used as buffers.
cache: the amount of memory used as cache.
inact: the amount of inactive memory. (-a option)
active: the amount of active memory. (-a option)
Swap
si: Amount of memory swapped in from disk (/s).
so: Amount of memory swapped to disk (/s).

IO
bi: Blocks received from a block device (blocks/s).
bo: Blocks sent to a block device (blocks/s).
System
in: The number of interrupts per second, including the clock.
cs: The number of context switches per second.

CPU
These are percentages of total CPU time.
us: Time spent running non-kernel code. (user time, including nice time)
sy: Time spent running kernel code. (system time)
id: Time spent idle. Prior to Linux 2.5.41, this includes IO-wait time.
wa: Time spent waiting for IO. Prior to Linux 2.5.41, shown as zero.

5.kill/killall 刪除正在執行中的程式
kill 要先查PID(Process ID),kill則使用程式的名稱
參數:
-1 :重新讀取一次參數的設定檔 (類似 reload);
-2 :代表與由鍵盤輸入 [ctrl]-c 同樣的動作;
-9 :立刻強制刪除一個Process;
-15:以正常的程序方式終止Process。

#ps -A |grep hello
10001 tty1 00:00:00 hello
使用#kill 10001 -9 刪除
#killall -v hello
Killed hello(10001) with signal 15

6.pstree 列出所有的Process的相關性
參數:
-A :各Process樹間以 ASCII 字元來連接;
-p :並列出每個 process 的 PID;
-u :並列出每個 process 的所屬帳號名稱。
範例一:列出目前系統上面所有的Process樹的相關性:
[root@linux ~]# pstree -A
init-+-atd
|-crond
|-dhclient
7.找出那個Process讓Device出現device is busy
範例 #umount /mnt出現
umount: /mnt: device is busy
找出兇手的方法
#fuser /mnt
/mnt: 2028c
#ps -A"|grep 2028
2028 tty1 00:00:00 bash
表示tty1正在使用中
8.如何得知那個User開了那些檔案
範例 user :root 開了那些和httpd有關的檔案
#lsof -u root|grep httpd
bash 2028 root cwd DIR 8,1 4096 1105530 /work/tinyhttpd/tinyhttpd-0.1.0
httpd 22352 root cwd DIR 8,1 4096 1105530 /work/tinyhttpd/tinyhttpd-0.1.0
httpd 22352 root rtd DIR 8,1 4096 2 /
httpd 22352 root txt REG 8,1 14320 1105644 /work/tinyhttpd/tinyhttpd-0.1.0/httpd
httpd 22352 root mem REG 8,1 126648 1236850 /lib/ld-2.3.5.so
httpd 22352 root mem REG 8,1 1489572 1236851 /lib/libc-2.3.5.so
httpd 22352 root mem REG 8,1 101600 1236854 /lib/libpthread-2.3.5.so
httpd 22352 root mem REG 0,0 0 [stack] (stat: No such file or directory)
httpd 22352 root 0u CHR 4,1 2211 /dev/tty1
httpd 22352 root 1u CHR 4,1 2211 /dev/tty1
httpd 22352 root 2u CHR 4,1 2211 /dev/tty1
httpd 22352 root 3u IPv4 116871 TCP *:32770 (LISTEN)
lsof 22359 root cwd DIR 8,1 4096 1105530 /work/tinyhttpd/tinyhttpd-0.1.0
bash 22360 root cwd DIR 8,1 4096 1105530 /work/tinyhttpd/tinyhttpd-0.1.0
lsof 22361 root cwd DIR 8,1 4096 1105530 /work/tinyhttpd/tinyhttpd-0.1.0

 

如何自已compiler gcc 2.95.3 (在Fedora 4用gcc 4.0測試過)

Wednesday, October 12, 2005
10/12/2005 4:59:49 AM
如何自已compiler gcc 2.95.3 (在Fedora 4用gcc 4.0測試過)
為compiler 2.4.x的kernel準備
1.Download gcc 2.95.3 in /opt
ftp://ftp.gnu.org/pub/gnu/gcc/gcc-2.95.3/
or
http://gcc.fyxm.net/releases/gcc-2.95.3/gcc-2.95.3.tar.gz

2. cd /opt
#tar zxvf gcc-2.95.3.tar.gz

3. configure
#./configure --host=i686-redhat-linux --build=i686-redhat-linux --enable-multilib --enable-shared --with-system-zlib --prefix=/opt --enable-threads=posix

4.
# make
# make install
安裝binutils
即使用了gcc,你一樣還是需要ld,ar,as,objcopy這些binutils
你可以有二種選擇(個人選擇2)
1.使用同RedHat 9相同的版本
RH9的binutils是 2.13.90.0.18-9
你可以到ftp://ftp.gnu.org/gnu/binutils/下載,自已安裝
2.使用Fedora 4版本 2.15.94.0.2.2
#ln -s /usr/bin/ld /opt/bin/ld
#ln -s /usr/bin/ar /opt/bin/ar
#ln -s /usr/bin/objcopy /opt/bin/objcopy
#ln -s /usr/bin/as /opt/bin/as

下載Kernel 2.4.22 (應該2.4.x都是一樣的)
1. download linux-2.4.22.tar.bz2 到/usr/src
2. #tar jxvf linux-2.4.22.tar.bz2
3. #ln -s /usr/src/linux-2.4.22/include/asm-i386 /usr/src/linux-2.4.22/include/asm
4. #make mrproper;make menuconfig
5. 更改Makefile到我們指定的gcc 2.95.3
CROSS_COMPILE = /opt/bin/
6. 你可以make你要的kernel和module了
#make dep;make module;

2005/10/07 

如何每次自動載入8139too.ko

Friday, October 7, 2005
10/7/2005 3:59:15 AM
如何每次自動載入8139too.ko

修改/etc/modprobe.conf (2.4的Kernel修改/etc/modules.conf)
語法:「alias [interface_name] [module_name]」,
alias eth0 8139too

設IP ADDRESS
檔案:/etc/sysconfig/network-scripts/ifcfg-eth0內容如下
DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.1.255
IPADDR=192.168.1.100
NETMASK=255.255.255.0
NETWORK=192.168.1.0
ONBOOT=yes

另外記得在 /lib/modules/2.x.x-x.xxx/modules.dep設定dependence關係
路徑規則依核心的module版本不同而不同/lib/modules/`uname –r`/modules.dep
內容如下
/lib/modules/2.x.x-x.xxx/kernel/drivers/net/8139too.ko: /lib/modules/2.x.x-x.xxx/kernel/drivers/net/mii.ko
以上是同一行

 

幾個常用的embedded Web Server

Friday, October 7, 2005
10/7/2005 12:53:35 AM
幾個常用的embedded Web Server
1.tinyhttpd supports threading and CGI scripts
2.GoAHead 支援多種OS:Windows NT/98,Embedded&nbspLinux,VxWorks,QNX,有ASP(不要太高興,它並沒有MS ASP那麼強),雖然是open source,但聽說要在網頁上放goahead的Logo
3.Boa :single-tasking HTTP server,有CGI

2005/10/06 

uCLinux的起源-第一個uClinux Project

Wednesday, October 5, 2005
10/4/2005 11:46:53 PM
uCLinux的起源-第一個uClinux Project
個人用uCLinux也有二年了,今天剛好有空看了一下官方網頁上的介紹,它開始是在1998年Porting在Palm上的(1998年Palm還在3com公司內時推出了PalmIII),個人只是猜測是 PalmIII(Motorola MC68328 16MHz),至於官網上寫的TRGpro則是1999年才推出的,這樣的猜測應該是很正確的,我用Google找了一下,還可以看到http://tuxmobil.org/pda_linux_palm.html直接就寫了uCLinux是在Palm III/V上的字眼。
另外在它的HTTP DOWNLOAD上有一個http://www.uclinux.org/pub/uClinux/uClinux-2.0.x/patch2.0.33-090298.diff.gz的patch檔(1998/2/9)內發現了
-ARCH = i386
+ARCH = m68knommu
它將architectures改成m68knommu,用的也是romfs。
2001年時,uCLinux看來直接跳過2.2而直接到了Kernel 2.4上面,這個版本也開始支援ARM610/710/720/920,SA-110(http://www.uclinux.org/pub/uClinux/uClinux-2.4.x/uClinux-2.4.0-20010501.diff.gz)
到了2003/11月 linux 2.6正式Release後至今(2005/10),uCLinux 幾乎都能同步的推出對應的主版本。

2005/10/05 

hdparm用來取得或設定硬碟的參數

hdparm用來取得或設定硬碟的參數

語法:# hdparm [-參數] 裝置名稱
注意:不了解之前,最好不要使用本指令
說明:
-i 顯示device的資訊
-tT 測試讀取時間
-Xnn 開啟PIO/DMA UltraDMA mode0~5 這是危險動作,nn請自行參考說明文件
還有很多很多的參數,想提升/破壞HD的人必讀


MaxMultSect: 這個欄位告訴我們硬碟在同一時間可以讀取的最大磁區數目。
MultSect: 這個顯示現時同一時間可以讀取的最大磁區數目。

About me

  • I'm Martin's blog 馬汀的部落格
  • From 中壢市, 桃園縣, Taiwan
  • -----BEGIN GEEK CODE BLOCK----- Version: 3.1 Comment: For info see http://www.geekcode.com GC/CS/CC/E/IT/TW d- s a C++++ L++++ P+ L++++ E--- W+++ N++ o+ K- w+++ O- M- V- PS+ PE++ Y+ PGP+ t 5- X++ R- tv- b+++ DI+ D-- G e+++ h+ r+ y+ z? ------END GEEK CODE BLOCK------ /**************************** 旅行是我生命的動力 它的樂趣從計劃旅行開始 我樂於分享旅行及Linux Kernel上的每一件事. ****************************/
My profile