2007/08/30

try new ubuntu 試試新的ubuntu

Ubuntu 確實頗受歡迎,因此這邊介紹一下怎麼把玩 ubuntu

首先,你必須先去下載 image file, 直接從這兒下載的話會有每日最新的,若從 ubuntu 首頁ubuntu taiwan 下載的話,會是正式釋出版,通常較穩定。

接下來想當然爾,可以將之燒錄在光碟片中,這一點我不多說,燒完直接開機試用。
還有一種方法,就是用qemu(還有 kvm 等虛擬技術,不在此討論)來模擬光碟開機,但是這並非本文要談的。

另外一種方法是,將 iso 檔掛起來: mkdir -p iso; mount xxxx.iso iso -o loop,將 kernel, initrd, filesystem 複製到硬碟: cp -a iso/casper /,最後就是修改 /boot/grub/menu.lst, 底下僅供參考:


title Ubuntu, cdrom gutsy
root (hd0,3)
kernel /casper/vmlinuz boot=casper root=UUID=0627a896-4ecc-43b6-8b15-f36221aa11c6 resume=/dev/sda3 ro quiet splash
initrd /casper/initrd.gz
quiet
savedefault


上面 root (hd0,3) 是因為我的硬碟分割是第四塊,最好請參考你現有 /boot/menu.lst 來修改,可以複製目前開機(通常是第一個title)的來用。而 kernel 選項中有幾點要說:
1. root=UUID 那個每個人都會不一樣,不能照抄,以我的例子來說,也可以改成 root=/dev/sda4。這一點前面有說,我的硬碟使用的是第四個分割區,若您是第一個分割區的話,那就是 root=/dev/sda1
2. boot=casper 這一個是不可或缺的,它會設定 /casper/initrd.gz 裡的init 讀進/casper/filesystem.squashfs 當 root filesystem,否則你將會又用回原來的分割區當 root filesystem
3. resume=/dev/sda3 那項純粹是用來讓系統可以「休眠」用的,你可以省略,若你想休眠的話可以參考著用,/dev/sda3 必須是 swap 分割區,其實也可以指定檔案,不過不在此討論。

這邊討論的方式其實可以讓你有機會自己修改這個 squashfs 檔,直到滿意再來燒成光碟或其他後續處理,請參考 KNOPPIX remaster

2007/08/08

雙方合作多版本 如何更新軟體 how to update your software version in multi partners

我們在與 chip 廠商合作開發產品時,有個軟體更新流程提供參考:

現狀:
  1. Chip 開發其 demo board 的軟體,使其接近 turn key。軟體版本以 Vo 代表
  2. 敝公司將修改 GUI 後的軟體 porting 上去,軟體版本以 Vo' 代表,也就是我們新增部份是 (Vo'-Vo)
  3. 當我們測試產品有非 GUI 相關 bug 時,會請 chip 商修改,其軟體版本以 Vn 代表,回到 步驟 1. 2. 以便產生 Vn'

這邊提兩個 porting 的方式,其中 Vn 是 Chip 商提供的新版,Vo 是 Chip 商提供的舊版,而 Vn' 是我們 porting 欲Porting 至 Vn 後的新版,Vo' 是我們 Porting 至 Vo 後的舊版

  1. Vn' = Vn + (Vo' - Vo) : 將兩個舊版比對差異後 porting 到 Vn

  2. Vn' = (Vn - Vo) + Vo' : 將 Chip 商新舊版比對差異後 Porting 到 Vo'
以上兩個作法乍看之下效果是相同的,但是我這邊得花點時間來檢視其間的差異:

  1. 當初期自行修改的 code 較少時,Vo'-Vo 的值會較小,看起來前者較優。相反的,初期 Vn - Vo 的值應該較大,不利於 Porting 到 Vo'。因此可以判定說:當 Chip 提供的 code 變異性很大時或我們新創的 GUI 方面的 code 較少時,採用前者較有利

  2. 但是通常上面的情形比較不會發生,原因是 Chip 商提供的 code 通常一開始就已經相對龐大,或者說在後期通常只是針對 bug 在修正。在此情形下,若我們發現 (Vo' - Vo) > (Vn - Vo) 時,應該採後面的作法。

  3. 另外一種考量其實無關兩個差值,我只想說,只有採行第二種作法才是正確的方式。
    1. 讓我們看看前者,當採用 (Vo'-Vo) 時,會給我們一種錯覺,認為這樣的差值我們最熟,最容易控制,加上當初就是這樣開發自己的 code for GUI,採用前者的作法似乎較受歡迎。

    2. 但是正如我說這是錯覺,其原因是你把假設建立在 Vn 一定是對的上面。若 Vo --> Vn 的發行是因為要修正 bug, 那很顯然 Vo 已經不對,而且也不保證 Vn - Vo 真的只修改到 bug 的部份。會不會有邊際效應?或者說會不會因為團隊開發使得 Vn 跟 Vo 做的變動你根本無法預期?

    3. 這邊要說的其實是,Vo' 是我們最熟的部份,也是我們知道 bug 在哪的狀態,那麼為何不是透過 (Vn-Vo) 來挑出 Chip 商到底做了哪些修正?再將這些修正挑選適合的移植到 Vo' 上?也就是說,其實我們得修正上面後者的公式為:

      Vn' = (Vn - Vo)' + Vo'

      值得注意的是,第一種作法是無法這樣修正的。


2007/08/03

Iso639 language codes


ISO 639-2 CodeISO 639-1 Code English name of Language  ISO 639-2 Code ISO 639-1 Code English name of Language   ISO 639-2 Code ISO 639-1 Code English name of Language
aar aa Afar
arp   Arapaho
ber   Berber (Other)
abk ab Abkhazian
art   Artificial (Other)
bho   Bhojpuri
ace   Achinese
arw   Arawak
bih bh Bihari
ach   Acoli
asm as Assamese
bik   Bikol
ada   Adangme
ast   Asturian; Bable
bin   Bini; Edo
ady   Adyghe; Adygei
ath   Athapascan languages
bis bi Bislama
afa   Afro-Asiatic (Other)
aus   Australian languages
bla   Siksika
afh   Afrihili
ava av Avaric
bnt   Bantu (Other)
afr af Afrikaans
ave ae Avestan
tib/bod bo Tibetan
ain   Ainu
awa   Awadhi
bos bs Bosnian
aka ak Akan
aym ay Aymara
bra   Braj
akk   Akkadian
aze az Azerbaijani
bre br Breton
alb/sqi sq Albanian
bad   Banda languages
btk   Batak languages
ale   Aleut
bai   Bamileke languages
bua   Buriat
alg   Algonquian languages
bak ba Bashkir
bug   Buginese
alt   Southern Altai
bal   Baluchi
bul bg Bulgarian
amh am Amharic
bam bm Bambara
bur/mya my Burmese
ang   English, Old (ca.450-1100)
ban   Balinese
byn   Blin; Bilin
anp   Angika
baq/eus eu Basque
cad   Caddo
apa   Apache languages
bas   Basa
cai   Central American Indian (Other)
ara ar Arabic
bat   Baltic (Other)
car   Galibi Carib
arc   Official Aramaic (700-300 BCE); Imperial Aramaic (700-300 BCE)
bej   Beja
cat ca Catalan; Valencian
arg an Aragonese
bel be Belarusian
cau   Caucasian (Other)
arm/hye hy Armenian
bem   Bemba
ceb   Cebuano
arn   Mapudungun; Mapuche   ben bn Bengali   cel   Celtic (Other)
cze/ces cs Czech
csb   Kashubian
gre/ell el Greek, Modern (1453-)
cha ch Chamorro
cus   Cushitic (Other)
elx   Elamite
chb   Chibcha
wel/cym cy Welsh
eng en English
che ce Chechen
cze/ces cs Czech
enm   English, Middle (1100-1500)
chg   Chagatai
dak   Dakota
epo eo Esperanto
chi/zho zh Chinese
dan da Danish
est et Estonian
chk   Chuukese
dar   Dargwa
baq/eus eu Basque
chm   Mari
day   Land Dayak languages
ewe ee Ewe
chn   Chinook jargon
del   Delaware
ewo   Ewondo
cho   Choctaw
den   Slave (Athapascan)
fan   Fang
chp   Chipewyan
ger/deu de German
fao fo Faroese
chr   Cherokee
dgr   Dogrib
per/fas fa Persian
chu cu Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic
din   Dinka
fat   Fanti
chv cv Chuvash
div dv Divehi; Dhivehi; Maldivian
fij fj Fijian
chy   Cheyenne
doi   Dogri
fil   Filipino; Pilipino
cmc   Chamic languages
dra   Dravidian (Other)
fin fi Finnish
cop   Coptic
dsb   Lower Sorbian
fiu   Finno-Ugrian (Other)
cor kw Cornish
dua   Duala
fon   Fon
cos co Corsican
dum   Dutch, Middle (ca.1050-1350)
fre/fra fr French
cpe   Creoles and pidgins, English based (Other)
dut/nld nl Dutch; Flemish
fre/fra fr French
cpf   Creoles and pidgins, French-based (Other)
dyu   Dyula
frm   French, Middle (ca.1400-1600)
cpp   Creoles and pidgins, Portuguese-based (Other)
dzo dz Dzongkha
fro   French, Old (842-ca.1400)
cre cr Cree
efi   Efik
frr   Northern Frisian
crh   Crimean Tatar; Crimean Turkish
egy   Egyptian (Ancient)
frs   Eastern Frisian
crp   Creoles and pidgins (Other)   eka   Ekajuk   fry fy Western Frisian
ful ff Fulah
gwi   Gwich'in
ile ie Interlingue
fur   Friulian
hai   Haida
ilo   Iloko
gaa   Ga
hat ht Haitian; Haitian Creole
ina ia Interlingua (International Auxiliary Language Association)
gay   Gayo
hau ha Hausa
inc   Indic (Other)
gba   Gbaya
haw   Hawaiian
ind id Indonesian
gem   Germanic (Other)
heb he Hebrew
ine   Indo-European (Other)
geo/kat ka Georgian
her hz Herero
inh   Ingush
ger/deu de German
hil   Hiligaynon
ipk ik Inupiaq
gez   Geez
him   Himachali
ira   Iranian (Other)
gil   Gilbertese
hin hi Hindi
iro   Iroquoian languages
gla gd Gaelic; Scottish Gaelic
hit   Hittite
ice/isl is Icelandic
gle ga Irish
hmn   Hmong
ita it Italian
glg gl Galician
hmo ho Hiri Motu
jav jv Javanese
glv gv Manx
scr/hrv hr Croatian
jbo   Lojban
gmh   German, Middle High (ca.1050-1500)
hsb   Upper Sorbian
jpn ja Japanese
goh   German, Old High (ca.750-1050)
hun hu Hungarian
jpr   Judeo-Persian
gon   Gondi
hup   Hupa
jrb   Judeo-Arabic
gor   Gorontalo
arm/hye hy Armenian
kaa   Kara-Kalpak
got   Gothic
iba   Iban
kab   Kabyle
grb   Grebo
ibo ig Igbo
kac   Kachin; Jingpho
grc   Greek, Ancient (to 1453)
ice/isl is Icelandic
kal kl Kalaallisut; Greenlandic
gre/ell el Greek, Modern (1453-)
ido io Ido
kam   Kamba
grn gn Guarani
iii ii Sichuan Yi
kan kn Kannada
gsw   Swiss German; Alemannic
ijo   Ijo languages
kar   Karen languages
guj gu Gujarati
iku iu Inuktitut
kas ks Kashmiri
geo/kat ka Georgian
kur ku Kurdish
mah mh Marshallese
kau kr Kanuri
kut   Kutenai
mai   Maithili
kaw   Kawi
lad   Ladino
mak   Makasar
kaz kk Kazakh
lah   Lahnda
mal ml Malayalam
kbd   Kabardian
lam   Lamba
man   Mandingo
kha   Khasi
lao lo Lao
mao/mri mi Maori
khi   Khoisan (Other)
lat la Latin
map   Austronesian (Other)
khm km Central Khmer
lav lv Latvian
mar mr Marathi
kho   Khotanese
lez   Lezghian
mas   Masai
kik ki Kikuyu; Gikuyu
lim li Limburgan; Limburger; Limburgish
may/msa ms Malay
kin rw Kinyarwanda
lin ln Lingala
mdf   Moksha
kir ky Kirghiz; Kyrgyz
lit lt Lithuanian
mdr   Mandar
kmb   Kimbundu
lol   Mongo
men   Mende
kok   Konkani
loz   Lozi
mga   Irish, Middle (900-1200)
kom kv Komi
ltz lb Luxembourgish; Letzeburgesch
mic   Mi'kmaq; Micmac
kon kg Kongo
lua   Luba-Lulua
min   Minangkabau
kor ko Korean
lub lu Luba-Katanga
mis   Uncoded languages
kos   Kosraean
lug lg Ganda
mac/mkd mk Macedonian
kpe   Kpelle
lui   Luiseno
mkh   Mon-Khmer (Other)
krc   Karachay-Balkar
lun   Lunda
mlg mg Malagasy
krl   Karelian
luo   Luo (Kenya and Tanzania)
mlt mt Maltese
kro   Kru languages
lus   Lushai
mnc   Manchu
kru   Kurukh
mac/mkd mk Macedonian
mni   Manipuri
kua kj Kuanyama; Kwanyama
mad   Madurese
mno   Manobo languages
kum   Kumyk   mag   Magahi   moh   Mohawk
mol mo Moldavian
nic   Niger-Kordofanian (Other)
paa   Papuan (Other)
mon mn Mongolian
niu   Niuean
pag   Pangasinan
mos   Mossi
dut/nld nl Dutch; Flemish
pal   Pahlavi
mao/mri mi Maori
nno nn Norwegian Nynorsk; Nynorsk, Norwegian
pam   Pampanga
may/msa ms Malay
nob nb Bokmål, Norwegian; Norwegian Bokmål
pan pa Panjabi; Punjabi
mul   Multiple languages
nog   Nogai
pap   Papiamento
mun   Munda languages
non   Norse, Old
pau   Palauan
mus   Creek
nor no Norwegian
peo   Persian, Old (ca.600-400 B.C.)
mwl   Mirandese
nqo   N'Ko
per/fas fa Persian
mwr   Marwari
nso   Pedi; Sepedi; Northern Sotho
phi   Philippine (Other)
bur/mya my Burmese
nub   Nubian languages
phn   Phoenician
myn   Mayan languages
nwc   Classical Newari; Old Newari; Classical Nepal Bhasa
pli pi Pali
myv   Erzya
nya ny Chichewa; Chewa; Nyanja
pol pl Polish
nah   Nahuatl languages
nym   Nyamwezi
pon   Pohnpeian
nai   North American Indian
nyn   Nyankole
por pt Portuguese
nap   Neapolitan
nyo   Nyoro
pra   Prakrit languages
nau na Nauru
nzi   Nzima
pro   Provençal, Old (to 1500)
nav nv Navajo; Navaho
oci oc Occitan (post 1500); Provençal
pus ps Pushto
nbl nr Ndebele, South; South Ndebele
oji oj Ojibwa
qaa-qtz   Reserved for local use
nde nd Ndebele, North; North Ndebele
ori or Oriya
que qu Quechua
ndo ng Ndonga
orm om Oromo
raj   Rajasthani
nds   Low German; Low Saxon; German, Low; Saxon, Low
osa   Osage
rap   Rapanui
nep ne Nepali
oss os Ossetian; Ossetic
rar   Rarotongan; Cook Islands Maori
new   Nepal Bhasa; Newari
ota   Turkish, Ottoman (1500-1928)
roa   Romance (Other)
nia   Nias   oto   Otomian languages   roh rm Romansh
rom   Romany
sin si Sinhala; Sinhalese
scc/srp sr Serbian
rum/ron ro Romanian
sio   Siouan languages
srr   Serer
rum/ron ro Romanian
sit   Sino-Tibetan (Other)
ssa   Nilo-Saharan (Other)
run rn Rundi
sla   Slavic (Other)
ssw ss Swati
rup   Aromanian; Arumanian; Macedo-Romanian
slo/slk sk Slovak
suk   Sukuma
rus ru Russian
slo/slk sk Slovak
sun su Sundanese
sad   Sandawe
slv sl Slovenian
sus   Susu
sag sg Sango
sma   Southern Sami
sux   Sumerian
sah   Yakut
sme se Northern Sami
swa sw Swahili
sai   South American Indian (Other)
smi   Sami languages (Other)
swe sv Swedish
sal   Salishan languages
smj   Lule Sami
syc   Classical Syriac
sam   Samaritan Aramaic
smn   Inari Sami
syr   Syriac
san sa Sanskrit
smo sm Samoan
tah ty Tahitian
sas   Sasak
sms   Skolt Sami
tai   Tai (Other)
sat   Santali
sna sn Shona
tam ta Tamil
scc/srp sr Serbian
snd sd Sindhi
tat tt Tatar
scn   Sicilian
snk   Soninke
tel te Telugu
sco   Scots
sog   Sogdian
tem   Timne
scr/hrv hr Croatian
som so Somali
ter   Tereno
sel   Selkup
son   Songhai languages
tet   Tetum
sem   Semitic (Other)
sot st Sotho, Southern
tgk tg Tajik
sga   Irish, Old (to 900)
spa es Spanish; Castilian
tgl tl Tagalog
sgn   Sign Languages
alb/sqi sq Albanian
tha th Thai
shn   Shan
srd sc Sardinian
tib/bod bo Tibetan
sid   Sidamo   srn   Sranan Tongo   tig   Tigre
tir ti Tigrinya
tyv   Tuvinian
wen   Sorbian languages
tiv   Tiv
udm   Udmurt
wln wa Walloon
tkl   Tokelau
uga   Ugaritic
wol wo Wolof
tlh   Klingon; tlhIngan-Hol
uig ug Uighur; Uyghur
xal   Kalmyk; Oirat
tli   Tlingit
ukr uk Ukrainian
xho xh Xhosa
tmh   Tamashek
umb   Umbundu
yao   Yao
tog   Tonga (Nyasa)
und   Undetermined
yap   Yapese
ton to Tonga (Tonga Islands)
urd ur Urdu
yid yi Yiddish
tpi   Tok Pisin
uzb uz Uzbek
yor yo Yoruba
tsi   Tsimshian
vai   Vai
ypk   Yupik languages
tsn tn Tswana
ven ve Venda
zap   Zapotec
tso ts Tsonga
vie vi Vietnamese
zen   Zenaga
tuk tk Turkmen
vol vo Volapük
zha za Zhuang; Chuang
tum   Tumbuka
vot   Votic
chi/zho zh Chinese
tup   Tupi languages
wak   Wakashan languages
znd   Zande languages
tur tr Turkish
wal   Walamo
zul zu Zulu
tut   Altaic (Other)
war   Waray
zun   Zuni
tvl   Tuvalu
was   Washo
zxx   No linguistic content
twi tw Twi   wel/cym cy Welsh   zza   Zaza; Dimili; Dimli; Kirdki; Kirmanjki; Zazaki