[技術] 各家Toolchains的比較

Written on 4:04 下午 by Yu Lai

一般而言,
在開發Embedded System時大都需要用到不同平台的cross-compiler與Toolchains。
而在elinux.org有一篇介紹各家Toolchains的文章,就轉來參考囉。

Ref: http://elinux.org/Toolchains

以下是常見的幾個Toolchains的說明:

CodeSourcery
CodeSourcery develops Sourcery G++, an Eclipse based Integrated Development Environment (IDE) that incorporates the GNU Toolchain (gcc, gdb, etc.) for cross development for numerous target architectures. CodeSourcery provides a "lite" version for ARM, Coldfire, MIPS, SuperH and Power architectures. The toolchains are always very up to date. CodeSourcery contributes enhancements it makes to the GNU Toolchain upstream continually, making it the single largest (by patch count) corporate contributor.

DENX ELDK
The DENX Embedded Linux Development Kit (ELDK) provides a complete and powerful software development environment for embedded and real-time systems. It is available for ARM, PowerPC and MIPS processors and consists of:
Cross Development Tools (Compiler, Assembler, Linker etc.) to develop software for the target system.
Native Tools (Shell, commands and libraries) which provide a standard Linux development environment that runs on the target system.
Firmware (U-Boot) that can be easily ported to new boards and processors.
Linux kernel including the complete source-code with all device drivers, board-support functions etc.
Xenomai - RTOS Emulation framework for systems requiring hard real-time responses.
SELF (Simple Embedded Linux Framework) as fundament to build your embedded systems on.
All components of the ELDK are available for free with complete source code under GPL and other Free Software Licenses. Also, detailed instructions to rebuild all the tools and packages from scratch are included.
The ELDK can be downloaded for free from several mirror sites or ordered on CD-ROM for a nominal charge (99 Euro). To order the CD please contact office@denx.de
Detailed information about the ELDK is available here.

Buildroot
Buildroot is a complete build system based on the Linux Kernel configuration system and supports a wide range of target architectures. It generates root file system images ready to be written to flash. In addition to having a huge number of packages which can be compiled into the image, it also generates a cross toolchain to build those packages from source. Even if you don't want to use buildroot for your root filesystem, it is a useful tool for generating a toolchain. It should be noted however that it only supports uClibc. If you want to use glibc, you'll need something else.

[技術] Linux下使用Minicon+Kermit

Written on 10:41 上午 by Yu Lai

這陣子接了新的板子的開發,由於H/W的關係,
加上JTAG數量有限,所以只能先用RS-232來傳image到板子上run。

目前板子上的Loader為舊版本的u-boot,它只有支援Kermit protocol來傳輸。
說到Kermit,在Windows下有名的TeraTerm的檔案傳送功也有支援kermit protocol。
以下就是我在Linux下使用Minicom+Kermit的心得整理;

1. 安裝minicom和ckermit
請先透過apt-get或Synaptic把minicom和ckermit裝起來。

2. 配置ckermit的設定檔
將以下內容放在~/.kermrc裡.
set carrier-watch off
set prefixing all
set parity none
set stop-bits 1
set modem none
set file type bin
set file name lit
set flow-control none
set prompt "Linux Kermit> "

3. 配置minicom
使用minicom -s,到"檔案傳輸協定"或"File Transfer protocols"裡的G和H,
G設定為/usr/bin/kermit -i -l %f -b %b -s Y U Y N N,
H設定為/usr/bin/kermit -i -l %f -b %b -r N D Y N N。

4. 開始傳檔
執行Ctrl+A -> S,接著選完檔案後即可開始傳送檔案了。

PS1:
以上minicom的設定,
可以使用Ctrl+A -> O裡的"儲存設定",
這樣就不用每次都重新設定了。

PS2:
一般而言除了Kermit外,
常見的還有使用x-modem, y-modem或z-modem protocol來傳送。
而minicom都可以配合外掛程式來達到此功能。

[企管] [轉錄]企業常用的縮寫

Written on 11:07 上午 by Yu Lai

From: http://wiki.planetoid.info/index.php/%E4%BC%81%E6%A5%AD%E5%B8%B8%E7%94%A8%E7%9A%84%E7%B8%AE%E5%AF%AB

5S 5S管理
ABC 作業製成本制度 (Activity-Based Costing)
ABB 實施作業制預算制度 (Activity-Based Budgeting)
ABM 作業製成本管理 (Activity-Base Management) (see cost management)
APS 先進規畫與排程系統 (Advanced Planning and Scheduling)
ASP 應用程式服務供應商(Application Service Provider)
ATP 可承諾量 (Available To Promise)
AVL 認可的供應商清單(Approved Vendor List)
BOM 物料清單 (Bill Of Material)
BPR 企業流程再造 (Business Process Reengineering)
BSC 平衡記分卡 (Balanced ScoreCard)
BTF 計劃生產 (Build To Forecast)
BTO 訂單生產 (Build To Order)
CPM 要徑法 (Critical Path Method)
CPM 每一百萬個使用者會有幾次抱怨(Complaint per Million)
CRM 客戶關係管理 (Customer Relationship Management)
CRP 產能需求規劃 (Capacity Requirements Planning)
CTO 客製化生產 (Configuration To Order)
DBR 限制驅導式排程法 (Drum-Buffer-Rope)
DMT 成熟度驗證(Design Maturing Testing)
DVT 設計驗證(Design Verification Testing)
DRP 運銷資源計劃 (Distribution Resource Planning)
DSS 決策支援系統 (Decision Support System)
EC 設計變更/工程變更 (Engineer Change)
EC 電子商務 (Electronic Commerce)
ECM 企業內容管理(Enterprise content management)
ECRN 原件規格更改通知(Engineer Change Request Notice)
EDI 電子資料交換 (Electronic Data Interchange)
EIS 主管決策系統 (Executive Information System)
EMC 電磁相容(Electric Magnetic Capability)
EOQ 基本經濟訂購量 (Economic Order Quantity)
ERP 企業資源規劃 (Enterprise Resource Planning)
FAE 應用工程師(Field Application Engineer)
FCST 預估(Forecast)
FMS 彈性製造系統 (Flexible Manufacture System)
FQC 成品品質管制 (Finish or Final Quality Control)
IPQC 製程品質管制 (In-Process Quality Control)
IQC 進料品質管制 (Incoming Quality Control)
ISO 國際標準組織 (International Organization for Standardization)
ISAR 首批樣品認可(Initial Sample Approval Request)
JIT 即時管理 (Just In Time)
KM 知識管理 (Knowledge Management)
L4L 逐批訂購法 (Lot-for-Lot)
LTC 最小總成本法 (Least Total Cost)
LUC 最小單位成本 (Least Unit Cost)
MES 製造執行系統 (Manufacturing Execution System)
MO 製令(Manufacture Order)
MPS 主生產排程 (Master Production Schedule)
MRO 請修(購)單(Maintenance Repair Operation)
MRP 物料需求規劃 (Material Requirement Planning)
MRPII 製造資源計劃 (Manufacturing Resource Planning)
NFCF 更改預估量的通知(Notice for Changing Forecast)
OEM 委託代工 (Original Equipment Manufacture)
ODM 委託設計與製造 (Original Design & Manufacture)
OLAP 線上分析處理 (On-Line Analytical Processing)
OLTP 線上交易處理 (On-Line Transaction Processing)
OPT 最佳生產技術 (Optimized Production Technology)
OQC 出貨品質管制 (Out-going Quality Control)
PDCA PDCA管理循環 (Plan-Do-Check-Action)
PDM 產品資料管理系統 (Product Data Management)
PERT 計畫評核術 (Program Evaluation and Review Technique)
PO 訂單(Purchase Order)
POH 預估在手量 (Product on Hand)
PR 採購申請(Purchase Request)
QA 品質保證(Quality Assurance) see also Quality control
QC 品質管制(Quality Control)
QCC 品管圈 (Quality Control Circle)
QE 品質工程(Quality Engineering)
RCCP 粗略產能規劃 (Rough Cut Capacity Planning)
RMA 退貨驗收(Returned Material Approval)
ROP 再訂購點 (Re-Order Point)
SCM 供應鏈管理 (Supply Chain Management)
SFC 現場控制 (Shop Floor Control)
SIS 策略資訊系統 (Strategic Information System)
SO 訂單(Sales Order)
SOR 特殊訂單需求(Special Order Request)
SOW 工作說明書(Statement of work)
SPC 統計製程管制 (Statistic Process Control)
TCO 整體擁有成本(Total cost of ownership)
TOC 限制理論 (Theory of Constraints)
TPM 全面生產管理(Total Production Management)
TQC 全面品質管制 (Total Quality Control)
TQM 全面品質管理 (Total Quality Management)
WIP 在製品 (Work In Process)

[技術] [轉錄]Android 內核的簡單分析

Written on 1:38 上午 by Yu Lai

From: http://www.cnmsdn.com/html/201002/1266986960ID865.html

在kernel子目錄下存放的就是Android的Linux Kernel了, 通過和標準的Linux 2.6.25 Kernel的對比,我們可以發現,其主要增加了以下的內容:

  1. 基於ARM架構增加Gold-Fish平台,相應增加的目錄如下:

  kernel/arch/arm/mach-goldfish

  kernel/include/asm-arm/arch-goldfish

  Gold-Fish平台採用的是ARM926T CPU作為BaseBand處理器, 該CPU主頻至少為200M HZ. 採用MSM7201A CPU(ARM 11)作為主CPU, 其主頻為528M HZ.

  2. 增加了yaffs2 FLASH文件系統,相應增加的目錄為:

  kernel/fs/yaffs2

  實際上,Android包經過編譯後生成的system.img和ramdisk.img文件就是yaffs2格式的包.

  3. 增加了Android的相關Driver,相應目錄為:

  kernel/drivers/android

  主要分為:

  Android IPC系統: Binder

  Android 日誌系統: Logger

  Android 電源管理: Power

  Android 鬧鐘管理: Alarm

  Android 內存控制台: Ram_console

  Android 時鐘控制的gpio: Timed_gpio

  4. 增加了switch處理, 相應的目錄為:

  kernel/drivers/switch/

  5. 增加了一種新的共享內存處理方式, 相應增加的文件為:

  kernel/mm/ashmem.c

  6. 其他為Linux-2.6.25內核所做的補丁等等,例如BlueTooth, 在此不做詳細分析

  另外GoldFish平台相關的驅動文件如下:

  1. 字符輸出設備:

  kernel/drivers/char/goldfish_tty.c

  2. 圖像顯示設備: (Frame Buffer)

  kernel/drivers/video/goldfishfb.c

  3. 鍵盤輸入設備:

  kernel/drivers/input/keyboard/goldfish_events.c

  4. RTC設備: (Real Time Clock)

  kernel/drivers/rtc/rtc-goldfish.c

  . USB Device設備:

  kernel/drivers/usb/gadget/android_adb.c

  6. SD卡設備:

  kernel/drivers/mmc/host/goldfish.c

  7. FLASH設備:

  kernel/drivers/mtd/devices/goldfish_nand.c

  kernel/drivers/mtd/devices/goldfish_nand_reg.h

  8. LED設備:

  kernel/drivers/leds/ledtrig-sleep.c

  9. 電源設備:

  kernel/drivers/power/goldfish_battery.c

  10. 音頻設備:

  kernel/arch/arm/mach-goldfish/audio.c

  11. 電源管理:

  kernel/arch/arm/mach-goldfish/pm.c

  12. 時鐘管理:

  kernel/arch/arm/mach-goldfish/timer.c

[技術] Milestone的鬧鐘問題

Written on 12:47 上午 by Yu Lai

Milestone從原本都很正常work的鬧鐘,
從我出差來泰國後, 沒有插著AC充睡覺就開始怪怪的.
後來花了點時間去trace, 才發現原來RTC的interrupt在2.1的firmware被改濫了.
還好有人把新版本的kernel從新的加拿大版的firmware取出來做成SBF.

Ref From: http://and-developers.com/motorola_milestone:sbf

2.1 kernel fix of scheduled CPU wake-ups

This SBF file will flash only the boot.img (kernel+init) from SHOLS_U2_03.10.0: mediafire, rapidshare

It will fix the broken scheduling of Alarm/RTC interrupts on the SHOLS_U2_02.31 and
SHOLS_U2_02.34 systems (kernel problem - alarms delayed).


升級前先把Kernel的版號記錄一下:
2.6.29-omap1 a21146@ca25rhe74 #1

透過上一篇提到的sbf_flash指令,把kernel更新後,版號變成如下:
2.6.29-omap1 rkg683@ca25rhe56 #1

應該是有更新成功吧,就看這幾天鬧鐘正不正常囉。

[技術] Milestone上SBF和RSD Lite說明

Written on 12:01 上午 by Yu Lai

之前在root Milestone時有使用到的SBF以及RSD Lite,
這陣子有把資料找全了,在這裡重新說明一下用以備忘。

首先SBF是Single Binary File的縮寫,
它是包含了要燒錄的binary data和checksum資料等。
提供給RSD介面燒錄資料到device上。
除了Motorola官方提供的SBF可供燒錄外,
我們也可以透過SBF-Recalc自行產生出可燒錄的SBF檔。
Ref: http://and-developers.com/motorola_milestone:sbf

而講到RSD Lite就要先講一下RSD,
RSD是Remote Software Download的縮寫,
它是Motorola開發出來用來做為遠端燒錄flash的介面,
也就是說只有Motorola的device才會用到的東東。
而目前使用到RSD的軟體有:
RSD-NetConnected
RSD Lite
Motorola Software Updater
RSD-NPI

目前RSD Lite只有Windows版本,若要在Linux下使用不太方便。
於是有網友[mbm]提供了一個Linux程式sbf_flash,有興趣可以到這裡看看。
Ref:http://and-developers.com/motorola_milestone:tools:rsd_lite

[技術] Linux Kernel的schedule_timeout error

Written on 4:45 下午 by Yu Lai

今天在寫Code時,Kernel狂吐schedule_timeout: wrong timeout value fffffd85 from c01595ef。
查了一下Google才發現這是說schedule_timeout被傳了負數的value進去導致的錯誤。
到/proc/ksyms或System.map一查才發現原來是epoll所呼叫的。
比對了一下code才發現原來忘了對timeout variable進行initial與小於0的check,修正後即解決。

[技術] Milestone上安裝Busybox

Written on 1:09 下午 by Yu Lai

最近在Milestone上玩起adb和Terminal,發現原有的shell真的難用到爆,
再加上一堆指令不內建,於是想自己編busybox來用用。

首先先搞定Milestone的Cross-Compiler,不外乎以下幾種方法:
1. 自己手動抓binutil, gcc等回來自己慢慢編成target=ARM。(PS:會很慢)
2. 到Android Open Source Project的網站抓prebuilt.git裡編好的toolchain。
http://android.git.kernel.org/?p=platform/prebuilt.git;a=tree;f=linux-x86/toolchain/arm-eabi-4.4.0;
點選snapshot即可下載,大概是74mb左右.我是抓arm-eabi-4.4.0的。
3. 到CodeSourcery抓Sourcery G++ Lite Edition for ARM
http://www.codesourcery.com/sgpp/lite/arm點選Download。

接著去抓busybox的原始碼回來,解開後先按make menuconfig進選單,
此時記得把cross-compiler的位置指定好,
同時把Build BusyBox as a static binary (no shared libs)勾選起來。
其實勾選static binary是比較花code size的,但沒辦法,
懶得hack busybox去配合Bionic Libc,要花太多effert。
所幸編出來的code size也不至於爆肥到哪去 XD。
接著把要編出來的applet選好,存好後敲make開始編囉。

編出busybox後,由於Android內的/system預設是read-only的,
所以我們使用adb push的方式先將busybox丟到/data下。
./adb push busybox /data
接著使用adb shell操作把/system重新mount再把busybox丟過去。
./adb shell
$ su <- 變root
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock6 /system
# cd /data
# chmod +x busybox
# ./busybox cp busybox /system/xbin <- 因為內建的cp難用
# cd /system/xbin
# ./busybox --install <- 安裝links
# cd /data
# rm busybox
# mount -o ro,remount -t yaffs2 /dev/block/mtdblock6 /system
# exit
$ exit

接著就可以使用到busybox所提供強大的功能啦 :)

Milestone 2.1 root心得

Written on 10:10 上午 by Yu Lai

其實拿到手機第二天就被我root了。 XD
只是我這陣子忙著弄rstp到現在才有空把這些資訊整理出來。

首先Milestone的Boot Loader除了原本Loader的功能(Load Kernel & FS then Go)外,
還具有2個特別的功能:
  1. Program SBF file。
  這個功能是Loader提供了一個介面,讓安裝了RSD Lite的PC透過USB連接線,
  直接將Image(SBF file)直接燒錄到Milestone的flash裡。
  這裡有官方提供的SBF檔,請小心對應版本。
  http://and-developers.com/motorola_milestone:sbf

  2. Recovery Mode.
  這裡提供Apply sdcard:update.zip與factory reset等功能。

而在2.0.1版本前取root的方法不外乎進Loader的Recovery Mode,
將su與Superuser.apk包成update.zip的方式更新到系統中。
但Motorola官方釋出了Milestone 2.1的更新版中的Recovery mode已經使用新的簽證,
所以無法再繼續使用以前的update.zip來騙過系統作假更新,
也就是不吃使用者自訂的update.zip,這導致無法透過此方法取得root。

沒關係,山不轉路轉,既然新的Recovery Mode不能用,我們就把它更新回舊的。
網路上有人把2.0.1的Recovery Mode從2.0.1的更新檔中抽出來并包裝成SBF檔提供使用。
檔案在此:SHOLS_U2_01.14.0_recovery_only.zip (mediafile)或(bandongo)。

接著去下載Motorola工程師專用的RSD Lit軟件並安裝到Windows內,
http://www.multiupload.com/SIYSOH7VTU

然後如果沒有安裝Motorola USB driver,
請先安裝: Windows 32-bit Driver / Windows 64-bit Driver

接著先把Milestone關機,接上USB連接線,把鍵盤推開,
按住"上"鍵不放再按電源鍵啟動Milestone。
等到出現Bootloader裡面後,在Windows裡開啟已安裝的Motorola RSD Lite。
接著在RSD Lite軟件上的Filename裡按 [...],指定剛下載的SBF檔案,
然後按[Start]開始還原,待還原程序完成100%時,手機就會自動重啟。
此時你的Milestone就會具有2.1的System與2.0.1的Recovery Mode。

再來去下載milestone_root.zip到電腦裡,http://www.sendspace.com/file/5cvh9e
把檔名改為update.zip放到Micro SD Card的根目錄 / 內。
接著進到Recovey Mode,有2個方法:
  1. 先關閉milestone電源,然後推開鍵盤,按住"上"鍵不放再按電源鍵啟動Milestone,
  直到看見白色三角形標置。此時可放開按鈕,再長按"音量增大鍵"+"照相鍵"一下,
  便進入了 Recovery Mode。
  2. 使用Android Debuging Bridge Tool (adb tool),# adb reboot recovery。

Recovey Mode用鍵盤的5方向鍵選到Apply SDcard: Update.zip按下去執行等到
"Install from sd card complete"字句出現。接著選擇"Reboot system now"重啟Milestone,
待開完機後檢查app裡有沒有"Superuser whitelist"存在即可知道有否root成功。

[閒聊] 新玩具-Motorola Milestone

Written on 9:15 上午 by Yu Lai

哇哈哈,昨天去敗家了。
敗了一台Moto的Milestone回來,
Android機器人我來啦~。

[技術] 在Linux中透過ioctl來設定ARP Table

Written on 11:39 上午 by Yu Lai

一般我們在Linux上可以使用arp這個指令來顯示或設定ARP Table。
而在程式中如果要操作系統的ARP Table的話,除了用system()來呼叫
arp指令外,也可以透過socket fd所提供的ioctl命令來達成,共有3種,
分別是SIOCSARP(設定ARP mapping),SIOCDARP(刪除ARP mapping),
SIOCGARP(獲取ARP mapping)。在操作上需配合struct arpreq,
定義如下:

struct arpreq {
struct sockaddr arp_pa; /* protocol address */
struct sockaddr arp_ha; /* hardware address */
int arp_flags; /* flags */
struct sockaddr arp_netmask; /* netmask of protocol address */
char arp_dev[16];
};


其中,arp_pa必須是AF_INET的socket。而指定的network device
也必須填入arp_dev中。而arp_flag的value定義如下:
ATF_COM = Lookup complete
ATF_PERM = Permanent entry
ATF_PUBL = Publish entry
ATF_USETRAILERS = Trailers requested
ATF_NETMASK = Use a netmask
ATF_DONTPUB = Don't answer

使用SIOCSARP命令時,需設定arpreq的arp_pa,arp_ha和arp_flags。
此時若ARP Table己經存在這筆IP位址,它會將它取出更新。若不存在,則新增。

使用SIOCDARP命令時,只需設定arpreq中的arp_pa和arp_dev,kernel會
根據arp_pa的IP位址從ARP Table的hash中取出,並將其state更新為NUD_FAILED。
這樣在下一次ARP GC時就會被清掉。

使用SIOCGARP命令時,只需要設定arpreq中的arp_pa即可。不過一般我們
不會透過SIOCGARP命令,而是使用/proc/net/arp直接讀取。

以下是SIOCSARP的範例程式:
#include <sys/ioctl.h> 
#include <sys/socket.h>
#include <net/if.h>
#include <netinet/if_ether.h>
#include <netinet/in.h>

int set_arp(char * ip, char * mac, char * dev) {

struct arpreq req;
struct sockaddr_in addr;
int sockfd, rc;
unsigned int s_addr;

sockfd = socket(AF_INET, SOCK_DGRAM, 0);
if(sockfd < 0) {
return 1;
}

/* Inet sockaddr_in struct */
memset(&addr, 0, sizeof(struct sockaddr_in));
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = inet_addr(ip);

/* ARP arpreq struct */
memset(&req, 0, sizeof(req));
memcpy(&req.arp_pa, &addr, sizeof(struct sockaddr));
memcpy(req.arp_ha.sa_data, mac, 6);
req.arp_flags = ATF_PERM | ATF_COM;
strcpy(req.arp_dev, dev);

rc = ioctl(sockfd, SIOCSARP, &req);
close(sockfd);

return rc;

}

[技術] Hexspeak

Written on 2:01 上午 by Yu Lai

我相信在程式設計師心理,都有想惡搞的一面,
這也大概就是HexSpeak會出現的原因吧。XD
PS: 這篇就當做用來設計Protocol與Magic Number參考用吧。

Ref: Wikipedia Hexspeak

Hexspeak, like leetspeak, is a novelty form of variant English spelling.

Hexspeak was created by programmers who wanted a magic number, a clear and unique identifier with which to mark memory or data. Using hexadecimal notation, which includes the digits 0123456789ABCDEF, it is possible to create small words with the digit "0" representing the letter "O", "1" representing the letter "I", "5" representing "S", and "6" or "9" representing "G" or "g" respectively.

Notable magic numbers

Many computer processors, operating systems, and debuggers make use of magic numbers, especially as a magic debug value.

* 0xABADBABE ("a bad babe") is used by Apple as the "Boot Zero Block" magic number.[citation needed]
* 0xBAADF00D ("bad food") is used by Microsoft's LocalAlloc(LMEM_FIXED) to indicate uninitialised allocated heap memory.[citation needed]
* 0xBADCAB1E ("bad cable") Error Code returned to the Microsoft eVC debugger when connection is severed to the debugger.[citation needed]
* 0xBADDCAFE ("bad cafe") is used by 'watchmalloc' in OpenSolaris to mark allocated but uninitialized memory.[citation needed]
* 0xBEADFACE ("bead face, or face bead") Is the pattern that fills all unused memory locations in the Motorola 68HCS12DP256 micro-controller simulator, SimHC12.[citation needed]
* 0xCAFEBABE ("cafe babe") is used by Mach-O ("Fat binary" in both 68k and PowerPC) to identify object files, and by the Java programming language to identify Java bytecode class files.[1]
* 0xCAFED00D ("Cafe Dude") is used by Sun JAVA as a magic number for their pack200 compression.[citation needed]
* 0xD15EA5E ("disease") opens a game disc partition on the Wii video game console. (Also of note, it was 0xDEADBEEF on the Nintendo GameCube.)[citation needed]
* 0xDEADBABE ("Dead Babe") is used by IBM Jikes RVM as a sanity check of the stack of the primary thread [2]
* 0xDEADBEEF ("dead beef") is used by IBM RS/6000 systems, Mac OS on 32-bit PowerPC processors and the Commodore Amiga as a magic debug value. On Sun Microsystems' Solaris, it marks freed kernel memory. On OpenVMS running on Alpha processors, DEAD_BEEF can be seen by pressing CTRL-T.[3]
* 0xDEADDEAD ("dead dead") is the bug check (STOP) code displayed when invoking a Blue Screen of Death either by telling the kernel via the attached debugger, or by using a special keystroke combination[4]. This is usually seen by driver developers, as it is used to get a memory dump on Windows NT based systems. An alternative to 0xDEADDEAD is the bug check code 0x000000E2[5], as they are both called MANUALLY_INITIATED_CRASH as seen on the Microsoft Developer Network.
* 0xDEFEC8ED ("defecated") is the magic number for OpenSolaris core dumps.[6]
* 0xFACEFEED ("face feed") is used by Alpha servers running Windows NT. The Alpha Hardware Abstraction Layer (HAL) generates this error when it encounters a hardware failure.[7]
* 0xFEE1DEAD ("feel dead") is used as a magic number in the Linux reboot system call.[8]
* 0xFEEDFACE ("feed face") is used as a header for Mach-O binaries, and as an invalid pointer value for 'watchmalloc' in OpenSolaris.[citation needed]

[edit] Designing magic numbers

Given there are at least a few hundred words in English consisting of only the letters "a", "b", "c", "d", "e", "f", "o", "i" and "s", it is easy for programmers to devise their own, such as 0xD15EA5ED or 0xBED51DE5. As such, it is useful to observe a few patterns in the classic hexspeak constants given above. These constants all use the full width of the word (in this case 32-bit), and none begin with "1" or "5". This choice means that if the word is interpreted as an integer, it is a (usually large) negative integer. For example, 0xBAADF00D is -1163005939, a large negative integer that is unlikely to arise in many programs. Microsoft's 0xBAADF00D is also a good value to catch access to uninitialised memory for another reason—ending the word with the "1", "5", "b", "d", or "f" ensures that the constant is an odd number, which generates an unaligned pointer exception on many processor architectures if the constant is interpreted as a pointer value.
[edit] Alternative letters

* In the Ada programming language, hexadecimal numbers are enclosed by "16#" and "#". For example, "16#Ada_Ada_Ada_Ada#".
* The C programming language notation uses the "0x" prefix to indicate a hexadecimal number; the "0x" is usually ignored when reading the letters or numbers.
* In the Intel assembly language, hexadecimal numbers are denoted by a "h" suffix. For example: FEEDADEADF15h ("feed a dead fish"). Note that numbers in this notation that begin with a letter have to start with a zero to distinguish them from variable names. "FEEDADEADF15h" would then be "0FEEDADEADF15h".
* In 6502 assembly language , hexadecimal numbers are denoted by a "$" prefix. This allows for words starting with the letter "S", for example $EED ("seed").

[技術] 在Makefile中加入Check file size的機制

Written on 9:11 下午 by Yu Lai

今天在porting新板子的loader,
因為flash memory layout的關係,
整個loader大小才128kb。
而我沒注意到Image Size己經暴了一點,
沒想到flash還是寫成功了,
結果reboot後跑起來果然怪怪的。
連基本的printf都怪怪的,囧~
只能拿JTAG來救了,唉。

於是我想到要在Makefile裡加入檢查檔案大小的機制,
讓make時適時的提醒我檔案大小是否ok?

結果讓我搞了一個快下午還搞不定 @_@,
我試了老半天還是不知該怎麼把bash的if加到Makefile裡。
最後到GNU Makefile仔細的找了找才發現原來是我想錯了,
Makefile裡的command部份其實是呼叫sub shell執行命令,
然後判斷其return value。
所以要加入檢查檔案大小的機制連if都不必用到,
直接用test就可以了。

e.g.

check:
@echo -e "\nCheck redboot.img file size ....."
@test `stat -c %s boot/install/bin/redboot.img` -lt 129792
@echo "Ok."

[技術] 在Wine中存取Serial COM Port

Written on 2:03 上午 by Yu Lai

Wine是一種在類Unix系統上執行Windows程式的軟體,
它可以在Ubuntu上跑一些Windows的程式。

會使用這功能主要是要跑Holux M-1000C附的ezTour,
雖然己成功將GPS配合Google Earth來使用,
但我仍未找出怎麼讀出M-1000C內路徑的方法,
現階段只好先透過Wine來跑囉。

不過ezTour要使用COM Port來存取GPS的資料,
在使用前要先將Wine設定好mapping COM Port,
設定方式是先在 ~/.wine/dosdevices 目錄下建立一個link,
e.g.

# ln -s /dev/rfcomm0 com1

這樣透過Wine開啟的ezTour就可以指定COM1來讀出rfcomm0內的資料啦。

[技術] 在Ubuntu使用Holux M-1000C GPS配合Google Earth

Written on 12:10 下午 by Yu Lai

本篇介紹為了這次出差買的Holux M-1000C GPS在Ubuntu
下配合Google Earth來達到即時定位.

1. 首先當然是要先讓Ubuntu與Holux M-1000C連線
Holux M-1000C本身主要是用藍芽的方式與NB或手機連線,
它也有提供特殊的USB線可以直接轉成RS-232的方式連結,
但這條線我沒買,有機會下次再介紹這條特別的線。

在Ubuntu下用GUI的藍芽只能完成初步的連線,至於GPS常用
的SPP只能在Terminal下指令了,方式如下:
先scan藍芽,把M-1000C的MAC記下來。

# hcitool scan
Scanning ...
00:1B:C1:05:9C:64 Holux M-1000C

接著查看GPS使用的RFCOMM的channel。
# sdptool browser 00:1B:C1:05:9C:64
Browsing 00:1B:C1:05:9C:64 ...
Service Name: SPP slave
Service RecHandle: 0x10000
Service Class ID List:
"Serial Port" (0x1101)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 1
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100

最後編輯/etc/bluetooth/rfcomm.conf建立rfcomm介面:
rfcomm0 {
bind yes;
device 00:1B:C1:05:9C:64;
channel 1;
comment “Holux M-1000C”;
}

重啟Bluetooth services
/etc/init.d/bluetooth stop
(wait a while)
/etc/init.d/bluetooth start


2. 安裝與設定Google Earth
Google Earth自行到Google網頁上抓就有了,我是抓5.1beta版本。
接下來我們要利用了Google Earth的KML以及KML可以refresh的功能,
來達到即時定位的目的。

預設Google Earth會安裝在/opt/google-earth目錄下,
在該目錄下建立一個Realtime GPS.kml,內容如下:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.2">
<NetworkLink>
<name>Realtime GPS</name>
<open>1</open>
<Link>
<href>./realtime/Realtime GPS.kml</href>
<refreshMode>onInterval</refreshMode>
</Link>
</NetworkLink>
</kml>

接著把相關目錄realtime建立出來:
# mkdir /opt/google-earth/realtime

接著打開Google Earth,它建好的KML開啟放在Places下(檔案 -> 開啟...)。

3. 從M-1000C取出NMEA定位資料
我們剛才己經將RFCOMM介面設定好了,接著只要下
# rfcomm connect 0
syntax error line 23
Connected /dev/rfcomm0 to 00:1B:C1:05:9C:64 on channel 1
Press CTRL-C for hangup

然後另外開一個Terminal就可以從/dev/rfcomm0內取到M-1000C回報的定位資料了。
e.g.
# cat /dev/rfcomm0 
$GPGGA,044423.000,0910.5038,N,09916.9805,E,1,9,0.89,8.6,M,-24.3,M,,*72
$GPRMC,044423.000,A,0910.5038,N,09916.9805,E,0.03,0.00,311009,,,A*67
$GPVTG,0.00,T,,M,0.03,N,0.06,K,A*38
$GPGGA,044424.000,0910.5038,N,09916.9805,E,1,9,0.89,8.6,M,-24.3,M,,*75
$GPRMC,044424.000,A,0910.5038,N,09916.9805,E,0.06,0.00,311009,,,A*65
$GPVTG,0.00,T,,M,0.06,N,0.10,K,A*3A
...

所以接下來就是要拆NMEA的format將它轉成剛才在Google Earth設定realtime的KML檔,
提供給Google Earth讀取並顥示即時位置了。
(PS:NMEA格式可以到GPS - NMEA sentence information參考。)
以下是我自己寫的C Code,是將NMEA中的GPRMC格式轉成KML,
當然可以依照自喜歡的格式和語言自己改寫。
/*
* filename: gps2kml.c
* author: lazyf (lazyflai (at) gmail.com)
* date: 2009/10/31
* copyright: http://creativecommons.org/licenses/by-nc-nd/2.5/tw/
*/

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>

#define DEV_FILE "/dev/rfcomm0"
#define KML_FILE "/opt/google-earth/realtime/Realtime GPS.kml"


int main(int argc, char *argv[]) {

char strbuf[256];
char *strp;
FILE *fp, *fp2;
float latitude, latitude_in, latitude_degrees, latitude_minutes;
float longitude, longitude_in, longitude_degrees, longitude_minutes;
float altitude, speed;

/* Call rfcomm connect */
system("rfcomm release 0");
sleep(3);
system("rfcomm connect 0 &");
sleep(5);

/* Open device file */
if((fp = fopen(DEV_FILE, "r"))) {
/* Call Google Earth up */
system("/opt/google-earth/googleearth &");
while(1) {
/* Read text */
memset(strbuf, 0, sizeof(strbuf));
fscanf(fp, "%s\n", strbuf);
if(strlen(strbuf) < 58)
continue;

/* Parse GPRMC format */
if(memcmp(strbuf, "$GPRMC", 6)==0) {
strp = (char *)strtok(strbuf, ","); /* $GPRMC */
strp = (char *)strtok(0, ","); /* Time */
strp = (char *)strtok(0, ","); /* Avalible or Void */

strp = (char *)strtok(0, ","); /* Latitude */
latitude_in = atof(strp);
strp = (char *)strtok(0, ","); /* N or S */
if(strcmp(strp, "S") == 0)
latitude_in = -latitude_in;
latitude_degrees = (int)(latitude_in/100);
latitude_minutes = latitude_in - latitude_degrees*100;
latitude = latitude_degrees + (latitude_minutes/60);

strp = (char *)strtok(0, ","); /* Longitude */
longitude_in = atof(strp);
strp = (char *)strtok(0, ","); /* E or W */
if(strcmp(strp, "W") == 0)
longitude_in = -longitude_in;
longitude_degrees = (int)(longitude_in/100);
longitude_minutes = longitude_in - longitude_degrees*100;
longitude = longitude_degrees + (longitude_minutes/60);

strp = (char *)strtok(0, ","); /* Speed */
speed = atof(strp) * 1.852;
if(speed < 3)
speed = 0;

strp = (char *)strtok(0, ","); /* Altitude */
altitude = atof(strp);

/* Output KML file */
if((fp2 = fopen(KML_FILE, "w"))) {
fprintf(fp2,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<kml xmlns=\"http://earth.google.com/kml/2.0\">\n"
"\t<Placemark>\n"
"\t\t<name>GPS %d.%d km/h</name>\n"
"\t\t<description></description>\n"
"\t\t<Point>\n\t\t\t<coordinates>%f,%f,%f</coordinates>\n\t\t</Point>\n"
"\t</Placemark>\n"
"</kml>\n",
(int)speed, ((int)(speed*10))%10, longitude, latitude, altitude);
fflush(fp2);
fclose(fp2);
}
}
}
fclose(fp);
}

return 0;

}

最後把它compile出來執行,就會自動建好rfcomm0和開啟Google Earth啦。

[技術] 在Ubuntu安裝SCM SCR-243 PCMCIA Card Reader

Written on 2:55 上午 by Yu Lai

之前買的pcmcia介面的SmartCard Reader,沒想到裝在Linux上有點麻煩。
首先到官網上 http://www.scm-pc-card.eu/ 抓Driver回來。
安裝前請先透過apt-get安裝以下套件:

apt-get install libusb-0.1-4 libpcsclite1 libpcsclite-dev pcscd pcsc-tools build-essential autoconf libccid

接著把Driver解開,執行它的install檔,不過我抓的v4.2.6好像在判斷pcsclite有問題,
手動將install內的判斷式修改一下即可。
./install

接著到 /dev 下手動將device node建立出來
cd /dev
mknod SCR24x0 c 251 0

udev也要
cd /lib/udev/devices
mknod SCR24x0 c 251 0

然後重新啟動電腦,讓剛才編好的driver與pcscd載入,
可用以下指令來判斷是否載作成功:
# lspcmcia -v
Socket 0 Bridge: [yenta_cardbus] (bus ID: 0000:06:09.0)
Configuration: state: on ready: unknown
Voltage: 5.0V Vcc: 5.0V Vpp: 0.0V
Socket 0 Device 0: [scr24x_cs] (bus ID: 0.0)
Configuration: state: on
Product Name: SCR243 PCMCIA Smart Card Reader
Identification: manf_id: 0xffff card_id: 0x0001
prod_id(1): "SCR243 PCMCIA" (0x2054e8de)
prod_id(2): "Smart Card Reader" (0xf5a90d5d)
prod_id(3): --- (---)
prod_id(4): --- (---)

# lsmod |grep pcmcia
pcmcia 43052 1 SCR24x
pcmcia_core 43412 4 SCR24x,pcmcia,yenta_socket,rsrc_nonstatic

使用讀卡機前可以用 pcsc_scan 指令來檢查,
不過我在使用上需先重插卡片再重啟pcscd才能正常使用,
算了,能用就好。最後就是上玉山的WebATM使用囉。

[技術] 在Thinkpad T60上安裝Ubuntu一些Note

Written on 2:31 上午 by Yu Lai

最近出差到泰國,真的被XP當到快發瘋了,
待出差回去後,把T60整個format掉裝起Ubuntu。
期間有一些安裝上的Note,就記錄在這裡囉。
(PS: 本篇會持續修改與增加內容。)

1. Track-Point的中鍵scroll功能
(Updated on 2010/07/05)
原本的方法在Ubuntu 10.04後就失效了QQ,
還好有人把該設定打包成套件直接使用。
先安裝gpointing-device-settings,
裝好執行後把Use wheel emulation打勾,
Button選2按Ok即可正常運作。

2. 把該死的dash拿掉
這個之前就有一篇在說明了,這裡再補記一下= =。
cd /bin
ln -sf bash sh

3. 使用root登入
這點很不建議,不過由於工作上的關係,常常需要compile到Linux Kernel,
加上又是NB,所以只好偷雞一下啦。
到/etc/gdm/gdm.conf內加入 AllowRoot=true 即可。

4. 安裝SCM SCR-243 PCMCIA Card Reader
這篇內容太多了,所以獨立出來。
Link: [技術]在Ubuntu安裝SCM SCR-243 PCMCIA Card Reader

5. 使用GPS配合Google Earth
Link: [技術] 在Ubuntu使用Holux M-1000C GPS配合Google Earth

6. 使用Wine存取Serial COM Port
Link: [技術] 在Wine中存取Serial COM Port

7. 取消udisks-daemon去polling光碟機
就算光碟機裡沒放光碟片,它還是偶爾會去讀取,一整個超怪。
# sudo hal-disable-polling --device /dev/sr0

8. 永久取消Pointer can be controlled using the keypad
修改/usr/share/X11/xkb/compat/complete檔,把augment "mousekeys"和augment "accessx(full)"取消掉。
如下:

// $XKeyboardConfig$
// $Xorg: complete,v 1.3 2000/08/17 19:54:34 cpqbld Exp $
default xkb_compatibility "complete"  {
include "basic"
augment "iso9995"
//    augment "mousekeys"
//    augment "accessx(full)"
augment "misc"
augment "xfree86"
augment "level5"
};

9. 永久取消NumLock
使用gconf-editor,使用Ctrl+F,勾選"Search also in key names",找"numlock"。
然後Turn off "remember_numlock_state"和Turn off numlock "numlock_on"。

[技術] coLinux安裝步驟

Written on 6:56 下午 by Yu Lai

之前就裝過coLinux來玩過了,但後來公司配了workstation裝了Linux,
工作上的使用也都移到那台去run,於是就把coLinux給移掉了,沒辦法,佔空間啊。
最近要出差到國外做function verify,需要邊改邊測,總不能叫我還帶台
workstation出國吧,所以又把coLinux給裝起來了。不過隨著新版本coLinux,
安裝和設定上有些微的不同,以下就是這次安裝的步驟,就當做筆記吧。


1. 下載coLinux
首先,到coLinux的官網 http://www.colinux.org/ 下載最新的 coLinux,
點選download後它會幫你導向sourceforge,我抓到的版本為 0.7.4 版本。
這裡順便把coLinux幫我們包好的各大Linux Distribution的filesystem image
檔也抓下來,我使用的是 Debian-5.0r2-lenny.7z。

2. 安裝coLinux
抓完後執行解開,基本上照著點下一步就ok了。另外,TAP Driver記得安裝唷。
裝好後先別急著執行 coLinux,先把剛才的 Debian-5.0r2-lenny.7z 解開放在
coLinux的目錄下。

3. 網路設定-Windows
修改debian-lenny.conf的內容,把網路介面設成 eth0=tuntap。
(這一步看個人使用習慣,我是習慣透過tap配合NAT來使用。)
點選控制台->網路連線,把新增出來的網路介面名稱改為"TAP"方便示別。
接著點入原有的LAN的介面->內容->進階,把"允許其他網路使用著透過這台..."打勾,
開啟NAT的服務。

4. 網路設定-Debian
接著回到coLinux的目錄下執行debian-lenny.bat。
進到Debian的console後,用預設帳密 root / colinux 登入。先設定網路,
修改/etc/network/interfaces,把eth0的部份改為以下:

allow-hotplug eth0
iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0
gateway 192.168.0.1

修改/etc/resolv.conf,加入DNS:
nameserver 168.95.192.1

這裡補充一點,到/etc/modprobe.d/aliases把ipv6 Module給取消掉,
因為ipv6會影響到samba的運作,所以要修改一下:
alias net-pf-10 off

把以上這行取代掉原本的alias net-pf-10 ipv6即可。

5. 安裝Tools
再來就可以透過apt-get這個好用的tool把該裝的裝一裝了,
e.g. sshd, samba, gcc, subversion...etc。
這裡建議先裝前2個,這樣可以透過putty連進去,畫面操作上會比較順手。

6. 增加Partition
另外,由於我們的Partition是使用別人幫我們包好的filesystem image檔,
大小是固定的2gb。使用上多少會有所限制,所以這時可以透過以下方法新增
出額外的image檔來使用。
首先,在coLinux目錄下使用windows內建的指令來新增一空白的檔案:
c:\coLinux>fsutil file createnew Debian-pub.ext3.8gb 8589934592

這裡我建了一個8gb大小的檔案出來。
接著修改debian-lenny.conf的內容,把這個image檔mount進去,在conf檔內加入:
cobd1="Debian-pub.ext3.8gb"

改完後存檔,重新啟動coLinux,進到debian後,使用以下指令來建立ext3 filesystem:
debian# mkfs.ext3 /dev/cobd1

跑完後就可以mount啦,記得修改一下/etc/fstab把新的filesystem image自動mount起來:
/dev/cobd1      /pub            ext3    errors=remount-ro 0       1


7. 總結
以上就是這次安裝的一些重要步驟,至於其他Debian設定上的細節就沒提到了。
有什麼問題再寫E-mail問我吧。

[技術] ATM流量管理(QoS)

Written on 11:53 上午 by Yu Lai

最近在弄ATM Qos,自然也學到了不少東東,以下是一些相關的資料整理。

依照ATM Forum的Traffic Management Specification Version 4.0規範,ATM的服務類別分為以下的定義:

1. Constant Bit Rate (CBR)
可提供固定速率的服務,對傳輸延遲、傳輸遺失及傳輸跳動等服務品質的要求最為嚴格,適合應用於及時性或需要固定頻寬的服務。適用的應用服務如下:
-交談式視訊服務 (e.g., videoconferencing)。
-交談式音訊服務 (e.g., telephone)。
-分散式視訊 (e.g., television, distributed classroom)。
-分散式音訊 (e.g., radio, audio feed)。
-其他視訊服務 (e.g., video on demand)。
-其他音訊服務 (e.g., audio library)。

2. Real-Time Variable Bit Rate (rt-VBR)
VBR的服務品質提供了對傳輸延遲和傳輸遺失的保證,主要針對影像和對傳輸延遲敏感的服務。另外,根據對延遲要求的不同,又可細分為及時性(VBR-rt)和非及時性(VBR-nrt)兩類。適用的應用服務如下:
-即時應用服務(包含CBR所列)但可容許些微的cell loss率,或是較有效率的網路資源應用(註)。

3. Non-Real-Time (nrt-VBR)
和VBR-rt相比,VBR-nrt可允許較多的傳輸延遲。適用的應用服務如下:
-緊急性的交易程序 (e.g., airline reservations, banking transactions, process monitoring)。
-Frame Relay interworking。

4. Available Bit Rate (ABR)
ABR的服務品質保證了最小傳輸頻寬,適合IP和LAN的服務,ABR需要在ATM層提供流量控制(Flow Control),以避免網路發生壅塞或超載。適用的應用服務如下:
-任何UBR的應用,配合ABR的flow-control可以得到較少的cell lose率。
-緊急性的資料傳輸 (e.g., defense information)。
-超級電腦應用服務。
-需較少的delay行為的傳輸服務 (e.g., remote procedure call, distributed file service, or computer process swap/paging)。

5. Unspecified Bit Rate (UBR)
UBR適合的服務與ABR相同,但無任何服務保證。適用的應用服務如下:
-一般文字/資料/圖片傳送 (e.g., banking transaction, credit card verification, email, telex, fax, news feed, weather sat. pictures, file transfer, library browsing, telecommuting, telnet)

註:
當服務品質的要求愈高時,相對地對傳輸頻寬的需求就愈高,在配置網路頻寬時的彈性也就跟著下降。對CBR而言,因為從頭到尾都必須提供固定的頻寬,根本就沒有多工增益(Multiplexing Gain)可言。但是對VBR-nrt和ABR而言,因為訊務本身具有叢集(Bursty)特性,系統只需要提供介於最高所需頻寬和平均所需頻寬的等效頻寬即可。隨著訊務的叢集特性愈明顯,網路可以容納的用戶數也愈多,多工增益也跟著提高,因此CBR的收費最高,VBR、ABR次之,UBR最低。

[技術] MSN與各家防毒軟體的設定

Written on 10:44 上午 by Yu Lai

一般我們在使用MSN時, 在傳送檔案時,
MSN都會要我們設定防毒軟體或是使用它們自己的LiveCare.
使用LiveCare是也ok, 但每次都要等它更新完才能掃毒實在有夠久的.

但各家防毒軟體的設定單檔掃描的方式也都不同,
以下是在網路上找到的, 有幾個我自己也沒試過, 參考看看吧.

== Avira AntiVir 9.x 小紅傘 ==
"C:\Program Files\Avira\AntiVir Desktop\avscan.exe" /CFG="C:\Program Files\Avira\AntiVir Desktop\Profile.txt" /PATH=%file%

同時需建立一文字檔Profile.txt於安裝目錄下, 內容如下:
[CFG]
GuiMode=2
ExitMode=3

[SEARCH]
Parameter=0x00000002
Parameter=0x00000020
Parameter=0x00000100
Parameter=0x00000400
Parameter=0x00010000
Parameter=0x00000080

[SCANNER]
BootsektorStart=0
Memory=0
ScanRootkits=0

參數說明:
GuiMode=?
1=顯示完整視窗
2=精簡
3=不顯示

ExitMode=3 (掃描後離開)
BootsektorStart=0 (取消開機磁區掃描)
Memory=0 (取消記憶體掃描)
ScanRootkits=0 (取消Rootkit掃描)

== ESET's NOD32 ==
"C:\Program Files\Eset\nod32.exe" /selfcheck+ /list+ /scroll+ /quit+ /pattern+ /heur+ /scanfile+ /scanboot- /scanmbr- /scanmem- /arch+ /sfx+ /pack+ /mailbox- /adware /unsafe /ah /prompt /all

== Symantec AntiVirus ==
"C:\Program Files\Symantec AntiVirus\Rtvscan.exe" /selfcheck+ /list+ /scroll+ /quit+ /pattern+ /heur+ /scanfile+ /scanboot- /scanmbr- /scanmem- /arch+ /sfx+ /pack+ /mailbox- /adware /unsafe /ah /prompt /all

== Norton AntiVirus ==
"C:\Program Files\Norton Internet Security Professional\Norton AntiVirus\ccIMScan.exe"

== Avast ==
"C:\Program Files\Alwil Software\Avast4\ashQuick.exe"

== Kaspersky ==
"C:\Program Files\Kaspersky Lab\Kaspersky Internet Security 6.0\avp.exe" scan %1

== McAfee 2007 ==
"C:\Program Files\McAfee\VirusScan\mcods.exe"

== PC-cillin ==
"C:\Program Files\Trend Micro\Internet Security 2005\PCCVScan.exe"