|
05 30 |
|
在講到inotify這個機制前,可能要說一下它的使用限制,如果OS不是用LINUX,請按上一頁,再者如果Linux版本不是2.6.13以上,也請按上一頁,如果OS條件都符合以上兩項,請繼續往下看
什麼是inotify
我截錄一段inotify創作人Rober Love在Linux Journal上所說的一段話
inotify is a file change notification system—a kernel feature that allows applications to request the monitoring of a set of files against a list of events. When the event occurs, the application is notified. To be useful, such a feature must be simple to use, lightweight with little overhead and flexible. It should be easy to add new watches and painless to receive notification of events.
上面那段話簡單的來說,inotify可以幫助你即時的觀測檔案的改變,並回送通知給你,而inotify把檔案狀態的變化分為以下十類
什麼是inotify
我截錄一段inotify創作人Rober Love在Linux Journal上所說的一段話
inotify is a file change notification system—a kernel feature that allows applications to request the monitoring of a set of files against a list of events. When the event occurs, the application is notified. To be useful, such a feature must be simple to use, lightweight with little overhead and flexible. It should be easy to add new watches and painless to receive notification of events.
上面那段話簡單的來說,inotify可以幫助你即時的觀測檔案的改變,並回送通知給你,而inotify把檔案狀態的變化分為以下十類
標籤: linux
|
05 29 |
|
開發環境: CentOS5
第一天早上(toolchain preparation and compile u-boot):
1.下載ELDK4.1
我下載的版本是 arm-linux-x86-uclibc. 底下是它的連結.
ftp://ftp.denx.de/pub/eldk/4.1/arm-linux-x86-uclibc/iso/arm-2007-01-22-uclibc-src.iso
2. Install ELDK4.1
用指令“install –d directory [cpu family]”安裝ELDK. 舉例來說, 輸入 “install –d /usr/local/eldk arm”
3. 下載 並解壓縮U-BOOT 1.3.2
ftp://ftp.denx.de/pub/u-boot/u-boot-1.3.2.tar.bz2
輸入指令"tar jxvf u-boot-1.3.2.tar.bz2"
4. 編譯 U-BOOT 1.3.2
進入 u-boot-1.3.2 的目錄, 輸入 “make smdk2410_config” 然候再輸入 “make all”
I如果成功的話, 你會看到u-boot(elf image) 和u-boot.bin(binary image)在u-boot的資料夾下

第一天早上(toolchain preparation and compile u-boot):
1.下載ELDK4.1
我下載的版本是 arm-linux-x86-uclibc. 底下是它的連結.
ftp://ftp.denx.de/pub/eldk/4.1/arm-linux-x86-uclibc/iso/arm-2007-01-22-uclibc-src.iso
2. Install ELDK4.1
用指令“install –d directory [cpu family]”安裝ELDK. 舉例來說, 輸入 “install –d /usr/local/eldk arm”
3. 下載 並解壓縮U-BOOT 1.3.2
ftp://ftp.denx.de/pub/u-boot/u-boot-1.3.2.tar.bz2
輸入指令"tar jxvf u-boot-1.3.2.tar.bz2"
4. 編譯 U-BOOT 1.3.2
進入 u-boot-1.3.2 的目錄, 輸入 “make smdk2410_config” 然候再輸入 “make all”
I如果成功的話, 你會看到u-boot(elf image) 和u-boot.bin(binary image)在u-boot的資料夾下
標籤: embedded
|
05 29 |
|
最近抓了一些網路設備的open source來trace,發現有些網路設備的web UI有用到AJAX,也就是在他網頁原始碼可以很清楚看到onreadystatechange所指到的回呼函式,小弟在trace完大部份的code以後,簡單整理如下
CGI 原理解說

CGI為一通訊轉換的界面供Client與Server交換它們的資料流,client的資料(如POST的DATA,或QUERY STRING)進來時,會被CGI轉換成STREAM型態的資料並送到STDIN供SERVER讀取,同樣的,Server寫在stdout的資料同樣會被CGI轉換成資料(or 封包)的形態丟給client讀取
CGI 原理解說

CGI為一通訊轉換的界面供Client與Server交換它們的資料流,client的資料(如POST的DATA,或QUERY STRING)進來時,會被CGI轉換成STREAM型態的資料並送到STDIN供SERVER讀取,同樣的,Server寫在stdout的資料同樣會被CGI轉換成資料(or 封包)的形態丟給client讀取
標籤: embedded
|
05 28 |
|
|
05 28 |
|
Abstract
UC/OS2 是即時系統核心,跟其它微型作業系統一樣,它沒有shell, file system, network stack…等,所以對porting來說,改動的幅度不大
原始碼可在此網頁查看
在porting的過程中只需改動5個檔案,分別是
1.OS_CPU_A.s:增加4個函式的實作(OSStartHighRdy, OSIntCtxSw, OSCtxSw, OS_CPU_SR_Save, OS_CPU_SR_Restore)
2.OS_CPU_C.c:實做process stack的存放方式,和critical section進入和離開的函式
3.OS_CPU.H:宣告相關cpu-specified的變數
4.Vector.s:實做IRQ中斷時的uc/os context switch
5.timer.c:呼叫OS的計時函式
UC/OS2 是即時系統核心,跟其它微型作業系統一樣,它沒有shell, file system, network stack…等,所以對porting來說,改動的幅度不大
原始碼可在此網頁查看
在porting的過程中只需改動5個檔案,分別是
1.OS_CPU_A.s:增加4個函式的實作(OSStartHighRdy, OSIntCtxSw, OSCtxSw, OS_CPU_SR_Save, OS_CPU_SR_Restore)
2.OS_CPU_C.c:實做process stack的存放方式,和critical section進入和離開的函式
3.OS_CPU.H:宣告相關cpu-specified的變數
4.Vector.s:實做IRQ中斷時的uc/os context switch
5.timer.c:呼叫OS的計時函式
標籤: embedded
- 1


