From f50b08ef71ed7f4158d52c5550ac30faa2a4ed78 Mon Sep 17 00:00:00 2001 From: arrow_zhang Date: Wed, 20 Aug 2008 11:45:41 -0700 Subject: [PATCH] [ADD] viki files and Makefile --- viki/Makefile | 18 +- viki/{ => arm}/Makefile | 12 +- viki/{ => buildroot}/Makefile | 12 +- viki/buildroot/buildroot.viki | 1 + viki/{ => busybox}/Makefile | 12 +- viki/{ => english}/Makefile | 12 +- viki/english/english.viki | 306 +++++++++++++++++++++++ viki/{ => gimp}/Makefile | 12 +- viki/{ => gtk}/Makefile | 12 +- viki/gtk/gtk.viki | 6 + viki/{ => humanism}/Makefile | 12 +- viki/humanism/chess-play.viki | 40 +++ viki/humanism/encourage-study.viki | 29 +++ viki/humanism/start.viki | 1 + viki/{ => kernel}/Makefile | 12 +- viki/kernel/ldd3/start.viki | 15 ++ viki/kernel/start.viki | 5 + viki/kernel/study-howto.viki | 31 +++ viki/{ => mips}/Makefile | 12 +- viki/{ => misc}/Makefile | 12 +- viki/misc/about.viki | 11 + viki/misc/algorithm.viki | 2 + viki/misc/arrow.viki | 36 +++ viki/misc/git.viki | 12 + viki/misc/mysqladmin.viki | 1 + viki/misc/notes.viki | 2 + viki/misc/notice.viki | 26 ++ viki/misc/remembrance-enhance.viki | 20 ++ viki/misc/screen.viki | 22 ++ viki/misc/sshd.viki | 13 + viki/misc/start.viki | 3 + viki/misc/tcpdump.viki | 7 + viki/misc/wine.viki | 32 +++ viki/misc/xdm.viki | 197 +++++++++++++++ viki/{ => mysql}/Makefile | 12 +- viki/mysql/mysql.viki | 234 ++++++++++++++++++ viki/{ => ncurses}/Makefile | 12 +- viki/ncurses/ncurses.viki | 1 + viki/{ => php}/Makefile | 12 +- viki/php/php.viki | 1 + viki/{ => playground}/Makefile | 12 +- viki/playground/playground.viki | 66 +++++ viki/{ => qemu}/Makefile | 9 +- viki/qemu/qemu.viki | 1 + viki/start.viki | 28 +++ viki/{ => tex}/Makefile | 9 +- viki/tex/start.viki | 100 ++++++++ viki/{ => uboot}/Makefile | 9 +- viki/uboot/start.viki | 3 + viki/uboot/uboot-mips-run.viki | 27 ++ viki/uboot/uboot-s3c44b0x.viki | 488 +++++++++++++++++++++++++++++++++++++ viki/{ => utils}/Makefile | 9 +- viki/{ => wiki}/Makefile | 9 +- viki/wiki/dokuwiki.viki | 67 +++++ viki/wiki/syntax.viki | 420 +++++++++++++++++++++++++++++++ viki/{ => zdraft}/Makefile | 9 +- viki/zdraft/auth.viki | 21 ++ viki/zdraft/playground.viki | 16 ++ 58 files changed, 2451 insertions(+), 80 deletions(-) copy viki/{ => arm}/Makefile (80%) copy viki/{ => buildroot}/Makefile (80%) create mode 100644 viki/buildroot/buildroot.viki copy viki/{ => busybox}/Makefile (80%) copy viki/{ => english}/Makefile (80%) create mode 100644 viki/english/english.viki copy viki/{ => gimp}/Makefile (80%) copy viki/{ => gtk}/Makefile (80%) create mode 100644 viki/gtk/gtk.viki copy viki/{ => humanism}/Makefile (80%) create mode 100644 viki/humanism/chess-play.viki create mode 100644 viki/humanism/encourage-study.viki create mode 100644 viki/humanism/start.viki copy viki/{ => kernel}/Makefile (80%) create mode 100644 viki/kernel/ldd3/start.viki create mode 100644 viki/kernel/start.viki create mode 100644 viki/kernel/study-howto.viki copy viki/{ => mips}/Makefile (80%) copy viki/{ => misc}/Makefile (80%) create mode 100644 viki/misc/about.viki create mode 100644 viki/misc/algorithm.viki create mode 100644 viki/misc/arrow.viki create mode 100644 viki/misc/git.viki create mode 100644 viki/misc/mysqladmin.viki create mode 100644 viki/misc/notes.viki create mode 100644 viki/misc/notice.viki create mode 100644 viki/misc/remembrance-enhance.viki create mode 100644 viki/misc/screen.viki create mode 100644 viki/misc/sshd.viki create mode 100644 viki/misc/start.viki create mode 100644 viki/misc/tcpdump.viki create mode 100644 viki/misc/wine.viki create mode 100644 viki/misc/xdm.viki copy viki/{ => mysql}/Makefile (80%) create mode 100644 viki/mysql/mysql.viki copy viki/{ => ncurses}/Makefile (80%) create mode 100644 viki/ncurses/ncurses.viki copy viki/{ => php}/Makefile (80%) create mode 100644 viki/php/php.viki copy viki/{ => playground}/Makefile (80%) create mode 100644 viki/playground/playground.viki copy viki/{ => qemu}/Makefile (83%) create mode 100644 viki/qemu/qemu.viki create mode 100644 viki/start.viki copy viki/{ => tex}/Makefile (83%) create mode 100644 viki/tex/start.viki copy viki/{ => uboot}/Makefile (83%) create mode 100644 viki/uboot/start.viki create mode 100644 viki/uboot/uboot-mips-run.viki create mode 100644 viki/uboot/uboot-s3c44b0x.viki copy viki/{ => utils}/Makefile (83%) copy viki/{ => wiki}/Makefile (83%) create mode 100644 viki/wiki/dokuwiki.viki create mode 100644 viki/wiki/syntax.viki copy viki/{ => zdraft}/Makefile (83%) create mode 100644 viki/zdraft/auth.viki create mode 100644 viki/zdraft/playground.viki diff --git a/viki/Makefile b/viki/Makefile index 69f74ee..010d228 100644 --- a/viki/Makefile +++ b/viki/Makefile @@ -8,11 +8,15 @@ ### user options ### # # output html to this directory, NO extra spaces at the end! -HTMLDIR = /work/web.arrow/viki/ +HTMLDIR = /work/web.arrow/viki # SUBDIRS = lpi vim dpkg dev # sub dirs -SUBDIRS = misc -CSS_NAME = moon.css # the css file to copy over, located in $(CSS_PATH) -TGZ = murj_viki.tar.gz # backup all your data into this archieve +SUBDIRS:=arm buildroot busybox english gimp gtk humanism +SUBDIRS+=kernel mips misc mysql ncurses php playground +SUBDIRS+=qemu tex uboot utils wiki zdraft + +TOP_CSS_NAME=tabbar.css +CSS_NAME = ${TOP_CSS_NAME} # the css file to copy over, located in $(CSS_PATH) +TGZ = arrow_viki.tar.gz # backup all your data into this archieve ### in most cases, you need not modify the followings ### # @@ -23,7 +27,8 @@ DEPLATE = deplate MODULE = utf8 # deplate common configuration file, not used yet. DEPLATECONFIG = ~/.deplate/config.rb -export CSS_PATH CSS_NAME DEPLATE MODULE DEPLATECONFIG # make them visible in sub dirs +# make them visible in sub dirs +export CSS_PATH CSS_NAME DEPLATE MODULE DEPLATECONFIG TOP_CSS_NAME SRCS := $(wildcard *.viki) HTML := $(patsubst %.viki, $(HTMLDIR)/%.html, $(wildcard *.viki)) @@ -51,7 +56,8 @@ $(TGZ) : subdirs: $(MAKEFILE) $(SUBDIRS) %/Makefile : Makefile - cp --reply=yes Makefile $@; +# cp --reply=yes Makefile $@; +# /bin/cp -i Makefile $@; $(SUBDIRS): cd $@ && $(MAKE) HTMLDIR=$(HTMLDIR)/$@ diff --git a/viki/Makefile b/viki/arm/Makefile similarity index 80% copy from viki/Makefile copy to viki/arm/Makefile index 69f74ee..9040027 100644 --- a/viki/Makefile +++ b/viki/arm/Makefile @@ -10,9 +10,12 @@ # output html to this directory, NO extra spaces at the end! HTMLDIR = /work/web.arrow/viki/ # SUBDIRS = lpi vim dpkg dev # sub dirs -SUBDIRS = misc -CSS_NAME = moon.css # the css file to copy over, located in $(CSS_PATH) -TGZ = murj_viki.tar.gz # backup all your data into this archieve +# SUBDIRS:=arm buildroot busybox english gimp gtk humanism +# SUBDIRS+=kernel mips misc mysql ncurses php playground +# SUBDIRS+=qemu tex uboot utils wiki z_draft + +CSS_NAME = ${TOP_CSS_NAME} # the css file to copy over, located in $(CSS_PATH) +TGZ = arrow_viki.tar.gz # backup all your data into this archieve ### in most cases, you need not modify the followings ### # @@ -51,7 +54,8 @@ $(TGZ) : subdirs: $(MAKEFILE) $(SUBDIRS) %/Makefile : Makefile - cp --reply=yes Makefile $@; +# cp --reply=yes Makefile $@; + /bin/cp -i Makefile $@; $(SUBDIRS): cd $@ && $(MAKE) HTMLDIR=$(HTMLDIR)/$@ diff --git a/viki/Makefile b/viki/buildroot/Makefile similarity index 80% copy from viki/Makefile copy to viki/buildroot/Makefile index 69f74ee..9040027 100644 --- a/viki/Makefile +++ b/viki/buildroot/Makefile @@ -10,9 +10,12 @@ # output html to this directory, NO extra spaces at the end! HTMLDIR = /work/web.arrow/viki/ # SUBDIRS = lpi vim dpkg dev # sub dirs -SUBDIRS = misc -CSS_NAME = moon.css # the css file to copy over, located in $(CSS_PATH) -TGZ = murj_viki.tar.gz # backup all your data into this archieve +# SUBDIRS:=arm buildroot busybox english gimp gtk humanism +# SUBDIRS+=kernel mips misc mysql ncurses php playground +# SUBDIRS+=qemu tex uboot utils wiki z_draft + +CSS_NAME = ${TOP_CSS_NAME} # the css file to copy over, located in $(CSS_PATH) +TGZ = arrow_viki.tar.gz # backup all your data into this archieve ### in most cases, you need not modify the followings ### # @@ -51,7 +54,8 @@ $(TGZ) : subdirs: $(MAKEFILE) $(SUBDIRS) %/Makefile : Makefile - cp --reply=yes Makefile $@; +# cp --reply=yes Makefile $@; + /bin/cp -i Makefile $@; $(SUBDIRS): cd $@ && $(MAKE) HTMLDIR=$(HTMLDIR)/$@ diff --git a/viki/buildroot/buildroot.viki b/viki/buildroot/buildroot.viki new file mode 100644 index 0000000..441851a --- /dev/null +++ b/viki/buildroot/buildroot.viki @@ -0,0 +1 @@ +===== buildroot ===== diff --git a/viki/Makefile b/viki/busybox/Makefile similarity index 80% copy from viki/Makefile copy to viki/busybox/Makefile index 69f74ee..9040027 100644 --- a/viki/Makefile +++ b/viki/busybox/Makefile @@ -10,9 +10,12 @@ # output html to this directory, NO extra spaces at the end! HTMLDIR = /work/web.arrow/viki/ # SUBDIRS = lpi vim dpkg dev # sub dirs -SUBDIRS = misc -CSS_NAME = moon.css # the css file to copy over, located in $(CSS_PATH) -TGZ = murj_viki.tar.gz # backup all your data into this archieve +# SUBDIRS:=arm buildroot busybox english gimp gtk humanism +# SUBDIRS+=kernel mips misc mysql ncurses php playground +# SUBDIRS+=qemu tex uboot utils wiki z_draft + +CSS_NAME = ${TOP_CSS_NAME} # the css file to copy over, located in $(CSS_PATH) +TGZ = arrow_viki.tar.gz # backup all your data into this archieve ### in most cases, you need not modify the followings ### # @@ -51,7 +54,8 @@ $(TGZ) : subdirs: $(MAKEFILE) $(SUBDIRS) %/Makefile : Makefile - cp --reply=yes Makefile $@; +# cp --reply=yes Makefile $@; + /bin/cp -i Makefile $@; $(SUBDIRS): cd $@ && $(MAKE) HTMLDIR=$(HTMLDIR)/$@ diff --git a/viki/Makefile b/viki/english/Makefile similarity index 80% copy from viki/Makefile copy to viki/english/Makefile index 69f74ee..9040027 100644 --- a/viki/Makefile +++ b/viki/english/Makefile @@ -10,9 +10,12 @@ # output html to this directory, NO extra spaces at the end! HTMLDIR = /work/web.arrow/viki/ # SUBDIRS = lpi vim dpkg dev # sub dirs -SUBDIRS = misc -CSS_NAME = moon.css # the css file to copy over, located in $(CSS_PATH) -TGZ = murj_viki.tar.gz # backup all your data into this archieve +# SUBDIRS:=arm buildroot busybox english gimp gtk humanism +# SUBDIRS+=kernel mips misc mysql ncurses php playground +# SUBDIRS+=qemu tex uboot utils wiki z_draft + +CSS_NAME = ${TOP_CSS_NAME} # the css file to copy over, located in $(CSS_PATH) +TGZ = arrow_viki.tar.gz # backup all your data into this archieve ### in most cases, you need not modify the followings ### # @@ -51,7 +54,8 @@ $(TGZ) : subdirs: $(MAKEFILE) $(SUBDIRS) %/Makefile : Makefile - cp --reply=yes Makefile $@; +# cp --reply=yes Makefile $@; + /bin/cp -i Makefile $@; $(SUBDIRS): cd $@ && $(MAKE) HTMLDIR=$(HTMLDIR)/$@ diff --git a/viki/english/english.viki b/viki/english/english.viki new file mode 100644 index 0000000..6f9a855 --- /dev/null +++ b/viki/english/english.viki @@ -0,0 +1,306 @@ + +第1部分 整体建议 + + 1. We'd better develop our interest in English at the beginning of + our study. To develop interest in English study is not very hard. We + may have the feeling of satisfaction and achievement from our English + study when we are able to say something simple in English, talk with + others or foreigners in English and act as others' interpreters. + + 在英语学习之初,我们应该注重培养对英语学习的兴趣.培养对英语的兴趣并不 + 难.当我们可以说点儿简单的英语,用英语与别人或与老外交谈,或作别人的翻 + 译时,我们就可以从英语学习中得到满足感和成就感,这样,兴趣就培养起来了. + 请注意,这种满足感和成就感很重要! + + 2. Plans are always very essential, so we must make some elaborate + and workable plans before study. And we should certainly carry out + these plans to the letter. + + 制定英语学习计划 + 太重要了,所以我们必须在学习前制定精细的和可操作的计划. + 并且我们一定要严格执行这些计划.请注意:千万不要干没有计划的傻事,那等 + 于在浪费生命. + + 3. Notes should be made whenever we study any book. We may follow + this advice: Don't read book without making notes. As we know that + notes are the summarization, the core content, our understanding and + the abbreviations of the books. Our notes are much thinner than the + books so that we can learn them by heart easier and can often review + and read them. We may also record our notes on tapes so as to often + listen to them easier, to deepen our impression and to lighten our + burden of memory. Sometimes it is needful to draw some tables and + illustrations that are very impressive, visual and concise. + + 无论学习什么,我们都要作笔记.我们可以参照下面的忠告:不作笔记就不要读 + 书.如您所知,笔记是我们对所学课本的总结,中心内容,我们的理解和课本的 + 缩略.笔记要比课本薄的多,我们可以较容易的记忆和经常复习他们.更胜一 + 畴的做法是把笔记录成音,这样我们可以经常听一听来加深印象和减轻记忆 + 负担. + + 4. Watching English movies, English TV programs, listening to English + songs and learn English on some special occasions are also excellent + and vivid English learning ways as we may combine English with some + certain scenes to deepen our memory. + + 看英文电影,收看英语电视节目,听英文歌曲和在某些特定场景学习英语也是 + 很棒和很生动的英语学习方式,因为这样我们可以把所学英语与某些特定的 + 场景联系起来以加深记忆. + + 5. Never just memorize single English words. Learn by heart the whole + sentences and the phrases that contain the new words so we may know + how to use the words. + + 不要孤立地背英语单词.请背记包含生词的句子或词组,这样我们才真正能运 + 用这些词汇,而且印象更深.(不过这点,偶也很矛盾,因为我不喜欢) + + 6. If time permits, we may read Mini Chinese-English dictionary + carefully from cover to cover, which may help us widen our sight + and master knowledge in all aspects. + + 如果时间允许,通读小小汉英字典对于英语学习也帮助很大.他能帮助我们扩 + 大视野并全方位地掌握所学知识. + + 7. Excellent personality is one of the decisive factors in English + study. Persistence, patience, self-confidence and determination are + badly needed. + + 优秀的性格也是英语学习的关键因素之一,坚持,忍耐,自信和坚定都是很重 + 要的.当然如果兴趣培养得好, + 可适当削弱这方面的要求. + + Part 2 Detailed methods(第2部分 具体方法) + + 1. Oral English:(口语学习) + + A. We study spoken English so as to make oral communications, so + this order of importance of oral English study should be followed: + Fluency, Accuracy, and Appropriateness. That is to say, we have to + pay more attention to practical communicating ability instead of + only laying emphasis on the grammatical correctness. + + 我们学习口语目的是为了与别人进行交流,所以英语口语中的几个要素的 + 重要次序应为: + 流利-准确-恰当 . + + B. Try to find some partners practicing oral English together and + English corner is a good place as where we may exchange English + study experience, widen our sight and improve interest in English. + + 努力寻找学伴一起练习口语.英语角是个不错的地方,在那我们不但可以练 + 习口语,还可以交流英语学习经验,开拓视野,提高英语学习兴趣. + + C. If English partners are not easy to get, then we have to create + an English environment ourselves by speaking English to ourselves. + + 如果找不到学伴或参加英语角的机会很少,那么就需要通过自己对自己将 + 英语来创造英语环境.比如对自己描述所看到的景物,英语口述自己正在 + 作的事情. + + D. This method is very effective and easy to insist on--interpreting + Chinese-English novels or books. First we read the Chinese parts + and then try to interpret them into English and then compare our + interpretation with the original versions in the novels or books so + that we can find out the mistakes, shortcomings and progresses in + our interpretation. + + 这种方法非常有效且很容易坚持---口译汉英对照(或英汉对照)的小说或 + 其它读物.首先我们先读汉语部分,然后逐句直接口译成英文,完成一小段 + 后,去看书上的对应英文部分并与我们的口译进行比较,我们马上可以发 + 现我们口译的错误,缺点和进步. + + 请注意: 开始要选择较简单的读物 . + + 这样作的好处: + + 1. 自己就可以练习口语,想练多久,就练多久. + + 2. + 始终有一位高级教师指出您的不足和错误---英文原文. + + 3. + 题材范围极广,可以突破我们自己的思维禁锢,比如我们总是喜欢谈论我 + 们自己熟悉的话题,所以我们总是在练习相同的语言,进步当然就缓慢了. + + 4. + 选择小说,幽默故事或好的短文阅读,使我们有足够的兴趣坚持下去. + + 5. + 有一些我们在直接学习英语课文时被我们熟视无睹的地道的英语用法会 + 被此法发掘出来. + + 6. + 对所学知识和所犯错误印象深刻.这等于我们一直在作汉译英练习,很多 + 英文译文是我们费尽心思憋出来的,所以印象相当深刻.比直接学习英文 + 课文印象要深的多. + + E. Interpreting what you hear---Changing Roles: Three people make + a group: one speaks Chinese, one speaks English acting as the + foreigner, one acts as interpreter. Then change roles. This is a + good interpreting training method and is good for studying from + one another. In addition, it may improve the responding ability and + speed of students. The advanced stage of this method is simultaneous + interpretation. + + 听译法-角色互换: + 三人一组,模拟翻译实战.一人将汉语,一人将英语,扮演老外,一人作翻 + 译.练习一段时间后互换角色.这是一种非常好的翻译训练方法,也是很 + 好的相互学习, + 取长补短的方法.而且可大大提高反应速度和能力.此法的高级阶段为同 + 声传译,我们可以在听广播或看电视或开会时,把所听内容口译英文. + + F. Oral composition and 3-minute training method: This method is + suitable for intense training. Making an oral composition about a + certain topic for one minute the first time and record the composition + on tape at the same time. Then listen to the composition and find + out the room for improvement. Then make the same composition for two + minutes for the second time and also record it. And at last repeat + the above-mentioned for three minutes. + + 口语作文和3分钟训练法:此法适用于强化训练.找好一个题目作一分钟的 + 口语作文,同时将其录音.听录音,找出不足和错误,就此题目再作两分钟的 + 的口语作文,同样录音,再听并找出不足与进步,继续作三分钟口语作文.这 + 是高级口语训练,效果不俗. + + G. Retelling exercise: Retell some articles or English stories in + our own words. + + 复述练习:用自己的话口语复述我们所听的英语故事或文章. + + H. If possible, we may read some English tongue twisters loudly and + quickly with one or two cakes of candy in our mouth (just as the + Chinese cross-talk actors do.) to train our oral cavity muscle and + tongues suitable for English pronunciation. + + 如果可能我们也可以大声且快速朗读英文绕口令(就象相声演员练嘴),还 + 可以同时口中含块糖以加大强化训练的力度.这样来强我们的口腔肌肉迅 + 速适应英文发音,使我们的口语相当流利,清晰,而且还有自信.例如: + + ☆A big black bug bit the back of a big black bear. The big black + bear bit back the big black bug. + + ☆This fish has a thin fin; That fish has a fat fin; + + This fish is a fish that has a thinner fin than that fish. + + I. Paying more attention to phrases and small words as one major + shortcoming of Chinese English (especially Chinese oral English) is + that Chinese students tend to use big words in their oral language, + but the idiomatic oral English is abundant with short, active and + vivid phrases. And most of such phrases are made of small words. + + 特别注意短语(词组)和小词的运用,中国式的英语尤其是口语一个很大的 + 缺点就是中国学生喜欢用大词,而真正地道的英语口语确是充满着短小, + 活泼,生动的短语,富有生气.而这些短语大部分有小词构成. + + J. Oral English has its own features, but it is closely combined + with other aspects of English, for example, writing may make oral + English precise and accurate. + + 口语随自有特色,但与英语的其它方面紧密相连.比如,经常练习写作,可 + 是口语精密,准确. + + 2. Listening comprehension:(听力) + + A. We may improve our aural ability by speaking English in the + native and idiomatic way. The pronunciation, intonation and sentence + structure should not be in Chinese style. + + 可以通过讲地道的口语来提高听力.发音,语调和句子结构请不要中国化. + 既然能说出来,当然能听懂.当然这样作有点难. + + B. Keeping a relaxed, natural and steady mood when listening to + some materials. Namely, to establish self-confidence and to develop + excellent psychological quality are essential in the improvement of + aural ability. + + 在作听力练习时,力求保持放松,自然和稳定的心态.即建立自信心和培养 + 良好的心理素质在听力提高中致关重要. + + C. We may make some simple notes while listening, for examples, + the names of people and places, time, age, distance, occupation, + figures and so on to get a better understanding of the content. + + 在作听力练习时,我们可以作些简单的笔记,例如人名,地名,时间,年龄, + 职业,数字等以便更好地理解材料.当然还要以听为主. + + D. Catching the drift of the content instead of understanding every + word and never waste too much time on single words. + + 作听力练习要重材料大意, 而不要力求听懂每个词 + ,不要在单个词上浪费太多时间. + + E. Pay close attention to CONCESSION and TRANSITION so as to correctly + understand the attitudes of the speakers. The following words are + most important: even though, even so, in spite of, unless, although, + no matter, however, whatever, no, nor, neither…nor, but…. + + 密切注意听力材料中的让步与转折以便正确把握说话人的态度.特别关注这些词: + even though, even so, in spite of, unless, although, no matter, + however, whatever, no, nor, neither…nor, but…. + + F. If we may learn by heart new words by listening some word tapes, + the results must be satisfactory. + + 在背记生词时,如果能听词汇磁带,那么对听力提高也很有好处. + + 3.Reading skills:(阅读) + + a. Intensive Reading: When we read the intensive articles, we should + make notes of the new words and phrases and good sentences. After + reading them, we may ask ourselves some questions about them by using + such words: Who, What, Why, When and Where. Then try to answer them + in our own words. + + 精读:在精读课文时,我们要把生词,词组,句型做成笔记.读后要试着用这些 + 疑问词提问自己:谁,什么,何时,何地且努力用自己的话来回答. + + b. Extensive reading: We must train our ability to scan, skip and + read fast. Namely, the ability to catch the key words, the topic + sentences and the drift of the articles. + + 泛读:要培养浏览,跳读和快读的能力.即抓住关键词,主题句和中心大意的能力. + + c. Reading speed: Three ways to improve our reading speed: 1) Reading + the articles from the beginning to the end without intervals so to + catch the rough idea of the articles on the whole. Never waste too + much time on some new words and single sentences. 2)We may keep + time when reading articles.3) When reading articles, we can point + at the words with our finger or pen point and our eyes move with + the finger quickly so that we are able to read very fast. + + 阅读速度:三种方法提高我们的阅读速度:1.先从头至尾不间断地通读课文 + 以抓住课文大意.不要在单个词或单句上浪费太多时间.2.阅读时计时.3.阅 + 读时用手指或笔尖指向文章字句并快速移动来迫使我们的眼睛快速随手指 + 或笔尖移动来强化我们的阅读速度. + + d. Newspaper as good reading materials can widen our sight and richen + our knowledge. + + 多读报,多受益:开阔视野,丰富知识,学习流行词语和英语最新发展. + + 4.Writing skills.( 写作) + + a. We have to accumulate abundant materials before we write something, + say, learning by heart crowds of articles. + + 写作需要有很多素材,积累素材很重要.要多背课文. + + b. Try to express one meaning in various ways. + + 努力用多种方式表达一种意思. + + c. Keeping English diary if possible. + + 写英语日记 . + + a) Prepare some new words, expressions and good sentences to be used + before writing something. + + 在写作前准备一些要用的好词汇,好句子. + + b) We may also make some English pen pals to establish English + communication relationship through some media like newspaper and + magazines. + + 结交英语笔友,写英文信.这种方法容易坚持,还很有意思.不仿一试,好处多多. + diff --git a/viki/Makefile b/viki/gimp/Makefile similarity index 80% copy from viki/Makefile copy to viki/gimp/Makefile index 69f74ee..9040027 100644 --- a/viki/Makefile +++ b/viki/gimp/Makefile @@ -10,9 +10,12 @@ # output html to this directory, NO extra spaces at the end! HTMLDIR = /work/web.arrow/viki/ # SUBDIRS = lpi vim dpkg dev # sub dirs -SUBDIRS = misc -CSS_NAME = moon.css # the css file to copy over, located in $(CSS_PATH) -TGZ = murj_viki.tar.gz # backup all your data into this archieve +# SUBDIRS:=arm buildroot busybox english gimp gtk humanism +# SUBDIRS+=kernel mips misc mysql ncurses php playground +# SUBDIRS+=qemu tex uboot utils wiki z_draft + +CSS_NAME = ${TOP_CSS_NAME} # the css file to copy over, located in $(CSS_PATH) +TGZ = arrow_viki.tar.gz # backup all your data into this archieve ### in most cases, you need not modify the followings ### # @@ -51,7 +54,8 @@ $(TGZ) : subdirs: $(MAKEFILE) $(SUBDIRS) %/Makefile : Makefile - cp --reply=yes Makefile $@; +# cp --reply=yes Makefile $@; + /bin/cp -i Makefile $@; $(SUBDIRS): cd $@ && $(MAKE) HTMLDIR=$(HTMLDIR)/$@ diff --git a/viki/Makefile b/viki/gtk/Makefile similarity index 80% copy from viki/Makefile copy to viki/gtk/Makefile index 69f74ee..9040027 100644 --- a/viki/Makefile +++ b/viki/gtk/Makefile @@ -10,9 +10,12 @@ # output html to this directory, NO extra spaces at the end! HTMLDIR = /work/web.arrow/viki/ # SUBDIRS = lpi vim dpkg dev # sub dirs -SUBDIRS = misc -CSS_NAME = moon.css # the css file to copy over, located in $(CSS_PATH) -TGZ = murj_viki.tar.gz # backup all your data into this archieve +# SUBDIRS:=arm buildroot busybox english gimp gtk humanism +# SUBDIRS+=kernel mips misc mysql ncurses php playground +# SUBDIRS+=qemu tex uboot utils wiki z_draft + +CSS_NAME = ${TOP_CSS_NAME} # the css file to copy over, located in $(CSS_PATH) +TGZ = arrow_viki.tar.gz # backup all your data into this archieve ### in most cases, you need not modify the followings ### # @@ -51,7 +54,8 @@ $(TGZ) : subdirs: $(MAKEFILE) $(SUBDIRS) %/Makefile : Makefile - cp --reply=yes Makefile $@; +# cp --reply=yes Makefile $@; + /bin/cp -i Makefile $@; $(SUBDIRS): cd $@ && $(MAKE) HTMLDIR=$(HTMLDIR)/$@ diff --git a/viki/gtk/gtk.viki b/viki/gtk/gtk.viki new file mode 100644 index 0000000..1c06437 --- /dev/null +++ b/viki/gtk/gtk.viki @@ -0,0 +1,6 @@ +- glade学习 +- gtk程序编译: gcc -o gtk gtk.c `pkg-config --cflags gtk+-2.0` `pkg-config --libs gtk+-2.0` + +[[http://www.ibm.com/developerworks/cn/linux/l-gtk/part2/index.html | 应用GTK+编程(IBM dev) ]] + +[[gtk_faq | gtk+faq ]] diff --git a/viki/Makefile b/viki/humanism/Makefile similarity index 80% copy from viki/Makefile copy to viki/humanism/Makefile index 69f74ee..9040027 100644 --- a/viki/Makefile +++ b/viki/humanism/Makefile @@ -10,9 +10,12 @@ # output html to this directory, NO extra spaces at the end! HTMLDIR = /work/web.arrow/viki/ # SUBDIRS = lpi vim dpkg dev # sub dirs -SUBDIRS = misc -CSS_NAME = moon.css # the css file to copy over, located in $(CSS_PATH) -TGZ = murj_viki.tar.gz # backup all your data into this archieve +# SUBDIRS:=arm buildroot busybox english gimp gtk humanism +# SUBDIRS+=kernel mips misc mysql ncurses php playground +# SUBDIRS+=qemu tex uboot utils wiki z_draft + +CSS_NAME = ${TOP_CSS_NAME} # the css file to copy over, located in $(CSS_PATH) +TGZ = arrow_viki.tar.gz # backup all your data into this archieve ### in most cases, you need not modify the followings ### # @@ -51,7 +54,8 @@ $(TGZ) : subdirs: $(MAKEFILE) $(SUBDIRS) %/Makefile : Makefile - cp --reply=yes Makefile $@; +# cp --reply=yes Makefile $@; + /bin/cp -i Makefile $@; $(SUBDIRS): cd $@ && $(MAKE) HTMLDIR=$(HTMLDIR)/$@ diff --git a/viki/humanism/chess-play.viki b/viki/humanism/chess-play.viki new file mode 100644 index 0000000..bc8897f --- /dev/null +++ b/viki/humanism/chess-play.viki @@ -0,0 +1,40 @@ +=====棋经十三篇===== + +==== 【论局篇第一】夫万物之数,从一而起。局之路,三百六十有一。 ==== +一者,生数之主,据其极而运四方也。三百六十,以象周天之数。分而为四,以象四时。隅各九十路,以象其日。外周七二路,以象其候。枯棋三百六十,白黑相半,以法阴阳。局之线道,谓之枰。线道之间,谓之□(上四下卦)。局方而静,棋圆而动。自古及今,弈者无同局。《传》曰:“日日新。”故宜用意深而存虑精,以求其胜负之由,则至其所未至矣。 + +==== 【得算篇第二】棋者,以正合其势,以权制其敌。 ==== +故计定于内而势成于外。战未合而算胜者,得算多也。算不胜者,得算少也。战已合而不知胜负者,无算也。兵法曰:“多算胜,少算不胜,而况于无算乎?由此观之,胜负见矣。” + +==== 【权舆篇第三】权舆者,弈棋布置,务守纲格。 ==== +先于四隅分定势子,然后拆二斜飞,下势子一等。立二可以拆三,立三可以拆四,与势子相望可以拆五。近不必比,远不必乖。此皆古人之论,后学之规,舍此改作,未之或知。诗曰:“靡不有初,鲜克有终。” + +==== 【合战篇第四】博弈之道,贵乎谨严。 ==== +高者在腹,下者在边,中者占角,此棋家之常然。法曰:宁输数子,勿失一先。有先而后,有后而先。击左则视右,攻后则瞻前。两生勿断,皆活勿连。阔不可太疏,密不可太促。与其恋子以求生,不若弃子而取势,与其无事而强行,不若因之而自补。彼众我寡,先谋其生。我众彼寡,务张其势。善胜者不争,善阵者不战。善战者不败,善败者不乱。夫棋始以正合,终以奇胜。必也,四顾其地,牢不可破,方可出人不意,掩人不备。凡敌无事而自补者,有侵袭之意也。弃小而不就者,有图大之心也。随手而下者,无谋之人也。不思而应者,取败之道也。诗云:“惴惴小心,如临于谷。” + +==== 【虚实篇第五】夫弈棋,绪多则势分,势分则难救。 ==== +投棋勿逼,逼则使彼实而我虚。虚则易攻,实则难破。临时变通,宜勿执一。《传》曰:“见可而进,知难而退。” + +==== 【自知篇第六】夫智者见于未萌,愚者暗于成事。 ==== +故知己之害而图彼之利者,胜。知可以战不可以战者,胜。识众寡之用者,胜。以虞待不虞者,胜。以逸待劳者,胜。不战而屈人者,胜。《老子》曰:“自知者明。” + +==== 【审局篇第七】夫弈棋布势,务相接连。 ==== +自始至终,着着求先。临局离争,雌雄未决,毫厘不可以差焉。局势已赢,专精求生。局势已弱,锐意侵绰。沿边而走,虽得其生者,败。弱而不伏者,愈屈。躁而求胜者,多败。两势相违,先蹙其外。势孤援寡,则勿走。机危阵溃,则勿下。是故棋有不走之走,不下之下。误人者多方,成功者一路而已。能审局者多胜。《易》曰:“穷则变,变则通,通则久。” + +==== 【度情篇第八】人生而静,其情难见;感物而动,然后可辨。 ==== +推之于棋,胜败可得而先验。持重而廉者多得,轻易而贪者多丧。不争而自保者多胜,务杀而不顾者多败。因败而思者,其势进;战胜而骄者,其势退。求己弊不求人之弊者,益;攻其敌而不知敌之攻己者,损。目凝一局者,其思周;心役他事者,其虑散。行远而正者吉,机浅而诈者凶。能畏敌者强,谓人莫己若者亡。意旁通者高,心执一者卑。语默有常,使敌难量。动静无度,招人所恶。《诗》云:“他人之心,予时度之。” + +==== 【斜正篇第九】或曰:“棋以变诈为务,劫杀为名,岂非诡道耶?”予曰:“不然。” ==== +《易》云:“师出以律,否藏凶。”兵本不尚诈,谋言诡行者,乃战国纵横之说。棋虽小道,实与兵合。故棋之品甚繁,而弈之者不一。得品之下者,举无思虑,动则变诈。或用手以影其势,或发言以泄其机。得品之上者,则异于是。皆沉思而远虑,因形而用权。神游局内,意在子先。图胜于无朕,灭行于未然。岂假言辞喋喋,手势翩翩者哉?《传》曰:“正而不谲。”其是之谓欤? + +==== 【洞微篇第十】凡棋有益之而损者,有损之而益者。 ==== +有侵而利者,有侵而害者。有宜左投者,有宜右投者。有先着者,有后着者。有紧□(上山下辟)者,有慢行者。粘子勿前,弃子思后。有始近而终远者,有始少而终多者。欲强外先攻内,欲实东先击西。路虚而无眼,则先觑。无害于他棋,则做劫。饶路则宜疏,受路则勿战。择地而侵,无碍而进。此皆棋家之幽微也,不可不知也。《易》曰:“非天下之至精,其孰能与于此。” + +==== 【名数篇第十一】夫弈棋者,凡下一子,皆有定名。 ==== +棋之形势、死生、存亡,因名而可见。有冲,有斡,有绰,有约,有飞,有关,有[答刂],有粘,有顶,有尖,有觑,有门,有打,有断,有行,有捺,有立,有点,有聚,有跷,有夹,有拶,有□(上山下辟),有刺,有勒,有扑,有征,有劫,有持,有杀,有松,有 □(上般下木)。围棋之名,三十有二,围棋之人,意在可周。临局变化,远近纵横,吾不得而知也。用[亻幸]取胜,难逃此名。《传》曰:“必也,正名乎棋!” + +==== 【品格篇第十二】夫围棋之品有九。 ==== +一曰入神,二曰坐照,三曰具体,四曰通幽,五曰用智,六曰小巧,七曰斗力,八曰若愚,九曰守拙。九品之外不可胜计,未能入格,今不复云。《传》曰:“生而知之者,上也;学而知之者,次也;困而学之又其次也。” + +==== 【杂说篇第十三】夫棋边不如角,角不如腹。 ==== +约轻于捺,捺轻于□(上山下辟)。夹有虚实,打有情伪。逢绰多约,遇拶多粘。大眼可赢小眼,斜行不如正行。两关对直则先觑,前途有碍则勿征。施行未成,不可先动。角盘曲四,局终乃亡。直四扳六,皆是活棋,花聚透点,多无生路。十字不可先纽,势子在心,勿打角图。弈不欲数,数则怠,怠则不精。弈不欲疏,疏则忘,忘则多失。胜不言,败不语。振廉让之风者,君子也;起忿怒之色者,小人也。高者无亢,卑者无怯。气和而韵舒者,喜其将胜也。心动而色变者,忧其将败也。赧莫赧于易,耻莫耻于盗。妙莫妙于用松,昏莫昏于复劫。凡棋直行三则改,方聚四则非。胜而路多,名曰赢局;败而无路,名曰输筹。皆筹为溢,停路为□(上艹下巾)。打筹不得过三,淘子不限其数。劫有金井、辘轳,有无休之势,有交递之图。弈棋者不可不知也。凡棋有敌手,有半先,有先两,有桃花五,有北斗七。夫棋者有无之相生,远近之相成,强弱之相形,利害之相倾,不可不察也。是以安而不泰,存而不骄。安而泰则危,存而骄则亡。《易》曰:“君子安而不忘危,存而不忘亡。” \ No newline at end of file diff --git a/viki/humanism/encourage-study.viki b/viki/humanism/encourage-study.viki new file mode 100644 index 0000000..bc38c02 --- /dev/null +++ b/viki/humanism/encourage-study.viki @@ -0,0 +1,29 @@ +=====荀子第一·劝学===== + +君子曰:学不可以已。青,取之于蓝,而青于蓝;冰,水为之,而寒于水。木 直中绳,揉以为轮,其曲中规,虽有槁暴,不复挺者,〔车柔〕使之然也。故木受 绳则直,金就砾则利。君子博学而日参省乎己,则知明而行无过矣。 + +故不登高山,不知天之高也;不临深〔奚谷〕,不知地之厚也;不闻先王之遗 言,不知学问之大也。于越夷貉之子,生而同声,长而异俗,教使之然也。诗曰: “嗟尔君子,无恒安息。靖恭尔位,好是正直。神之听之,介尔景福。”神莫大于 化道,福莫长于无祸。 + +吾尝终日而思矣,不如须臾之所学也。吾尝〔足支〕而望矣,不如登高之博见 也。登高而招,臂非加长也,而见者远。顺风而呼,声非加疾也,而闻者彰。假舆 马者,非利足也,而致千里。**假舟辑者,非能水也,而绝江河。君子生非异也,善假于物也。** + +南方有鸟焉,名曰“蒙鸠”,以羽为巢,而编之以发,系之苇苕。风至苕折, 卵破子死。巢非不完也,所系者然也。西方有木焉,名曰“射干”,茎长四寸,生 于高山之上,而临百仞之渊。木茎非能长也,所立者然也。蓬生麻中,不扶而直。 〖白沙在涅,与之俱黑。〗兰槐之根是为芷,其渐之□(异体“修”加三点水), 君子不近,庶人不服。其质非不美也,所渐者然也。故君子居必择乡,游必就士, 所以防邪僻而近中正也。 + +物类之起,必有所始。荣辱之来,必象其德。肉腐出虫,鱼枯生蠹。怠慢忘身 ,祸灾乃作。强自取柱,柔自取束。邪秽在身,怨之所构。施薪若一,火就燥也。 平地若一,水就湿也。草木畴生,禽兽群焉,物各从其类也。是故质的张而弓矢至 焉,林木茂而斧斤至焉,树成荫而众鸟息焉,醯酸而蚋聚焉。故言有召祸也,行有 招辱也,君子慎其所立乎! + +积土成山,风雨兴焉。积水成渊,蛟龙生焉。积善成德,而神明自得,圣心备 焉。故不积跬步,无以至千里;不积小流,无以成江海。骐骥一跃,不能十步;驽 马十驾,功在不舍。锲而舍之,朽木不折;锲而不舍,金石可镂。蚓无爪牙之利, 筋骨之强,上食埃土,下饮黄泉,用心一也。蟹六跪而二螯,非蛇□(“擅”换虫 旁)之穴无可寄托者,用心躁也。是故无冥冥之志者,无昭昭之明。无〔忄昏〕〔 忄昏〕之事者,无赫赫之功。行衢道者不至,事两君者不容。目不能两视而明,耳 不能两听而聪。□(“腾”中“马”换“虫”)蛇无足而飞,梧鼠五枝而穷。诗曰 :“尸鸠在桑,其子七兮。淑人君子,其仪一兮。其仪一兮,心如结兮。”故君子 结于一也。 + +昔者瓠巴鼓瑟而流【沉】鱼出听,伯牙鼓琴而六马仰秣。故声无小而不闻,行 无隐而不形。玉在山而草木润,渊生珠而崖不枯。为善不积邪?安有不闻者乎! 学恶乎始?恶乎终?曰:其数则始乎诵经,终乎读礼。其义则始乎为士,终乎 为圣人。真积力久则入,学至乎没而后止也。故学数有终,若其义则不可须臾舍也 。为之,人也;舍之,禽兽也。故书者,政事之纪也。诗者,中声之所止也。礼者 ,法之大分,群类之纲纪也。故学至乎礼而止矣。夫是之谓道德之极。礼之敬文也 ,乐之中和也,诗书之博也,春秋之微也,在天地之间者毕矣。 + +君子之学也,入乎耳,箸乎心,布乎四体,形乎动静。端而言,蠕而动,一可 以为法则。小人之学也,入乎耳,出乎口,口耳之间则四寸耳,曷足以美七尺之躯 哉!古之学者为己,今之学者为人。君子之学也,以美其身。小人之学也,以为禽 犊。故不问而告谓之傲,问一而告二谓之〔口赞〕。傲,非也;〔口赞〕,非也; 君子如向矣。 + +学莫便乎近其人。礼乐法而不说,诗书故而不切,春秋简而不速。方其人之习 君子之说,则尊以遍矣,周于世矣。故曰:学莫便乎近其人。 + +学之经莫速乎好其人,隆礼次之。上不能好其人,下不能隆礼,安特将学杂识 志顺诗书而已耳!则末世穷年,不免为陋儒而已。将原先王,本仁义,则礼正其经 纬蹊径也。若挈裘领,诎五指而顿之,顺者不可胜数也。不道礼宪,以诗书为之, 譬之犹以指测河也,以戈舂黍也,以锥飧壶也,不可以得之矣。故隆礼,虽未明, 法士也;不隆礼,虽察辩,散儒也。 + +问苦者,勿告也。告苦者,勿问也。说苦者,勿听也。有争气者,勿与辩也。 故必由其道至,然后接之,非其道则避之。故礼恭,而后可与言道之方;辞顺,而 后可与言道之理;色从,而后可与言道之致。故未可与言而言谓之傲,可与言而不 言谓之隐,不观气色而言谓之瞽。故君子不傲不隐不瞽,谨顺其身。诗曰:“匪交 匪舒,天子所予。”此之谓也。 + +百发失一,不足谓善射。千里跬步不至,不足谓善御。伦类不通,仁义不一, 不足谓善学。学也者,固学一之也。一出焉,一入焉,涂巷之人也。其善者少,不 善者多,桀纣盗跖也。全之尽之,然后学者也。 + +君子知夫不全不粹之不足以为美也,故诵数以贯之,思索以通之,为其人以处 之,除其害者以持养之。使目非是无欲见也,使耳非是无欲闻也,使口非是无欲言 也,使心非是无欲虑也。及至其致好之也,目好之五色,耳好之五声,口好之五味 ,心利之有天下。是故权利不能倾也,群众不能移也,天下不能荡也。生乎由是, 死乎由是,夫是之谓德操。德操然后能定。能定然后能应。能定能应,夫是谓之成 人。天见其明,地见其光,君子贵其全也。 + +(莫些生僻字用常见通假字代替。〖〗表校补。【】表校正。) diff --git a/viki/humanism/start.viki b/viki/humanism/start.viki new file mode 100644 index 0000000..a7eab36 --- /dev/null +++ b/viki/humanism/start.viki @@ -0,0 +1 @@ +== human diff --git a/viki/Makefile b/viki/kernel/Makefile similarity index 80% copy from viki/Makefile copy to viki/kernel/Makefile index 69f74ee..9040027 100644 --- a/viki/Makefile +++ b/viki/kernel/Makefile @@ -10,9 +10,12 @@ # output html to this directory, NO extra spaces at the end! HTMLDIR = /work/web.arrow/viki/ # SUBDIRS = lpi vim dpkg dev # sub dirs -SUBDIRS = misc -CSS_NAME = moon.css # the css file to copy over, located in $(CSS_PATH) -TGZ = murj_viki.tar.gz # backup all your data into this archieve +# SUBDIRS:=arm buildroot busybox english gimp gtk humanism +# SUBDIRS+=kernel mips misc mysql ncurses php playground +# SUBDIRS+=qemu tex uboot utils wiki z_draft + +CSS_NAME = ${TOP_CSS_NAME} # the css file to copy over, located in $(CSS_PATH) +TGZ = arrow_viki.tar.gz # backup all your data into this archieve ### in most cases, you need not modify the followings ### # @@ -51,7 +54,8 @@ $(TGZ) : subdirs: $(MAKEFILE) $(SUBDIRS) %/Makefile : Makefile - cp --reply=yes Makefile $@; +# cp --reply=yes Makefile $@; + /bin/cp -i Makefile $@; $(SUBDIRS): cd $@ && $(MAKE) HTMLDIR=$(HTMLDIR)/$@ diff --git a/viki/kernel/ldd3/start.viki b/viki/kernel/ldd3/start.viki new file mode 100644 index 0000000..e63988e --- /dev/null +++ b/viki/kernel/ldd3/start.viki @@ -0,0 +1,15 @@ +====== LINUX DEVICE DRIVERS ====== +===== An Introduction to Device Drivers ===== + - The Role of the Device Driver + - Splitting the Kernel + - Classes of Devices and Modules + - Security Issues + - Version Numbering + - License Terms + - Joining the Kernel Development Community + - Overview of the Book + +===== Building and Running Modules ===== + +===== Char Drivers ===== + diff --git a/viki/kernel/start.viki b/viki/kernel/start.viki new file mode 100644 index 0000000..bc0c0e2 --- /dev/null +++ b/viki/kernel/start.viki @@ -0,0 +1,5 @@ +====== Linux kernel ====== +One of the many advantages of free operating systems, as typified by Linux, is that their internals are open for all to view. + + * [[kernel:ldd3:start | Linux Device drivers (book) ]] + * [[kernel:study_howto | 内核学习计划 ]] diff --git a/viki/kernel/study-howto.viki b/viki/kernel/study-howto.viki new file mode 100644 index 0000000..70b594f --- /dev/null +++ b/viki/kernel/study-howto.viki @@ -0,0 +1,31 @@ +====内核学习的重要环节==== +预习,听讲,复习,作业,应用。 +---- + +====代码学习步骤==== + - 头文件中结构体学习, + - 源文件依次全部浏览, + - 源文件依流程分支查看, + - 依结构体定义和参数传递理清层次关系, + - 用心回想全部流程,贯穿全文,理解全意。 + +====源文件查看方式==== + - 了解数据结构 + - 查看函数使用,定义,实现,明白大意, + - 结构体在源程序中的使用之意,层次明晰, + - 复看全文,巩固加深。 +\\ +---- +\\ +要清远近点线面,本质思维清主线。 + +气定神闲处百事,规划思考定成绩。 + +====聪明==== + - 久视看清晰, + - 叩齿164, + - 眼保天天播, + - 按十入睡,七时起, + - 午睡二十注休息, + - 暝记于心多练习, + - 思考学习要用心。 diff --git a/viki/Makefile b/viki/mips/Makefile similarity index 80% copy from viki/Makefile copy to viki/mips/Makefile index 69f74ee..9040027 100644 --- a/viki/Makefile +++ b/viki/mips/Makefile @@ -10,9 +10,12 @@ # output html to this directory, NO extra spaces at the end! HTMLDIR = /work/web.arrow/viki/ # SUBDIRS = lpi vim dpkg dev # sub dirs -SUBDIRS = misc -CSS_NAME = moon.css # the css file to copy over, located in $(CSS_PATH) -TGZ = murj_viki.tar.gz # backup all your data into this archieve +# SUBDIRS:=arm buildroot busybox english gimp gtk humanism +# SUBDIRS+=kernel mips misc mysql ncurses php playground +# SUBDIRS+=qemu tex uboot utils wiki z_draft + +CSS_NAME = ${TOP_CSS_NAME} # the css file to copy over, located in $(CSS_PATH) +TGZ = arrow_viki.tar.gz # backup all your data into this archieve ### in most cases, you need not modify the followings ### # @@ -51,7 +54,8 @@ $(TGZ) : subdirs: $(MAKEFILE) $(SUBDIRS) %/Makefile : Makefile - cp --reply=yes Makefile $@; +# cp --reply=yes Makefile $@; + /bin/cp -i Makefile $@; $(SUBDIRS): cd $@ && $(MAKE) HTMLDIR=$(HTMLDIR)/$@ diff --git a/viki/Makefile b/viki/misc/Makefile similarity index 80% copy from viki/Makefile copy to viki/misc/Makefile index 69f74ee..9040027 100644 --- a/viki/Makefile +++ b/viki/misc/Makefile @@ -10,9 +10,12 @@ # output html to this directory, NO extra spaces at the end! HTMLDIR = /work/web.arrow/viki/ # SUBDIRS = lpi vim dpkg dev # sub dirs -SUBDIRS = misc -CSS_NAME = moon.css # the css file to copy over, located in $(CSS_PATH) -TGZ = murj_viki.tar.gz # backup all your data into this archieve +# SUBDIRS:=arm buildroot busybox english gimp gtk humanism +# SUBDIRS+=kernel mips misc mysql ncurses php playground +# SUBDIRS+=qemu tex uboot utils wiki z_draft + +CSS_NAME = ${TOP_CSS_NAME} # the css file to copy over, located in $(CSS_PATH) +TGZ = arrow_viki.tar.gz # backup all your data into this archieve ### in most cases, you need not modify the followings ### # @@ -51,7 +54,8 @@ $(TGZ) : subdirs: $(MAKEFILE) $(SUBDIRS) %/Makefile : Makefile - cp --reply=yes Makefile $@; +# cp --reply=yes Makefile $@; + /bin/cp -i Makefile $@; $(SUBDIRS): cd $@ && $(MAKE) HTMLDIR=$(HTMLDIR)/$@ diff --git a/viki/misc/about.viki b/viki/misc/about.viki new file mode 100644 index 0000000..b99c549 --- /dev/null +++ b/viki/misc/about.viki @@ -0,0 +1,11 @@ + +^ sercomm ^^ +|Arrow Zhang | Sercomm(Suzhou)R&D Center | +|SBU-III-1 || +|Embedded Linux System Engineer 5F No 26, Xinghai Street,|| +| |Suzhou Industrial Park, | +| |Jiangsu, China. Zip:215021 | +| |Tel: 0086-512-6761-2332-1307 | +| |Fax: 0086-512-6762-2332 | +|http://arrow.bplaced.net |Arrow_zhang@sdc.sercomm.com | + diff --git a/viki/misc/algorithm.viki b/viki/misc/algorithm.viki new file mode 100644 index 0000000..a61015b --- /dev/null +++ b/viki/misc/algorithm.viki @@ -0,0 +1,2 @@ +====== 算法分析 ====== + - 快速排序 diff --git a/viki/misc/arrow.viki b/viki/misc/arrow.viki new file mode 100644 index 0000000..4d1b8d6 --- /dev/null +++ b/viki/misc/arrow.viki @@ -0,0 +1,36 @@ +**学习的重要环节** + +预习, +听讲, +复习, +作业, +应用。 + +**代码学习步骤** + +1,头文件中结构体学习, +2,源文件依次全部浏览, +3,源文件依流程分支查看, +4,依结构体定义和参数传递理清层次关系, +5,用心回想全部流程,贯穿全文,理解全意。 + +**源文件查看方式** + +1,了解数据结构 +2,查看函数使用,定义,实现,明白大意, +3,结构体在源程序中的使用之意,层次明晰, +4,复看全文,巩固加深。 + +要看清远近点线面,本质思维弄清主线。 + +气定神闲处百事,规划思考定成绩。 + +**聪明** + +1,久视看清晰, +2,叩齿164, +3,眼保天天播, +4,按十入睡,七时起, +5,午睡二十注休息, +6,暝记于心多练习, +7,思考学习要用心。 diff --git a/viki/misc/git.viki b/viki/misc/git.viki new file mode 100644 index 0000000..01be4bd --- /dev/null +++ b/viki/misc/git.viki @@ -0,0 +1,12 @@ +==git usage== + - git-init + - git-send-pack host://dir HEAD + - git-clone + - ssh-keygen/ssh-agent/ssh-add + - git-checkout -b branchname + - git-branch name + - git-send-pack url localbranchname + - git-checkout --track -b XX + - git-pull url branch_remote + - git-reset --hard HEAD + diff --git a/viki/misc/mysqladmin.viki b/viki/misc/mysqladmin.viki new file mode 100644 index 0000000..41ec8df --- /dev/null +++ b/viki/misc/mysqladmin.viki @@ -0,0 +1 @@ +[[http://phpmyadmin.arrow.bplaced.net | phpmyadmin ]] diff --git a/viki/misc/notes.viki b/viki/misc/notes.viki new file mode 100644 index 0000000..2afb05a --- /dev/null +++ b/viki/misc/notes.viki @@ -0,0 +1,2 @@ +====== 随记 ===== + - 8M jffs2: mkfs.jffs2 -e 0x10000 -o dst.bin -d src_dir diff --git a/viki/misc/notice.viki b/viki/misc/notice.viki new file mode 100644 index 0000000..735abce --- /dev/null +++ b/viki/misc/notice.viki @@ -0,0 +1,26 @@ +=====文档===== + - 内核学习探讨之方法论 + - 内核结构学习之主要架构 + - 内核编程实践之驱动程序 + - 应用程序设计架构规划 + - 网络应用程序学习之网络数据传输 + - 应用程序设计之数据互通 + - 功能扩充之内核修改 + - 功能扩充之应用程序修改 + - 需求适应之功能分析与实现 + - 程序设计之风格规定 + +=====源码资源===== + - 应用软件库 + - kernel源码库 + - 系统配置指导 + +=====系统软件===== + - svn git cvs ip tcpdump vim sed grep emacs ..... + +===== 任务 ===== + - 建立http web server + - 开发其cgi + - 文档发布其学习心得 + - 实践开发项目 + - 实践开发产品 diff --git a/viki/misc/remembrance-enhance.viki b/viki/misc/remembrance-enhance.viki new file mode 100644 index 0000000..caa2511 --- /dev/null +++ b/viki/misc/remembrance-enhance.viki @@ -0,0 +1,20 @@ + +=====提高记忆力===== + - 咀嚼 + - 平和心态 + - 手按耳,眼与发间两穴位 + - 睡眠 + - 少用电子产品 + - 聊天 + - 补充糖分 + - 考眼力的游戏 + - 健身 + - 经常使用左肢 + - 弹琴 + - 提高责任心 + - 外语 + - 心算 + - 牛奶 + - 鸡蛋 + - 花生 + - 橘子 diff --git a/viki/misc/screen.viki b/viki/misc/screen.viki new file mode 100644 index 0000000..4f7eb37 --- /dev/null +++ b/viki/misc/screen.viki @@ -0,0 +1,22 @@ +=====compile the screen for arm embedded===== + - compile screen application \\ CC=arm-linux-gcc ./configure --host=arm --prefix=/opt/build_arm_nofpu/staging_dir + - config the embedded system + +copy /etc/termcap(obsolete) + +copy /usr/share/terminfo/v/vt102(if our $TERM is vt102) + +echo "" > /var/run/utmp + +make sure we have library "/tmp/libncurses.so.5", maybe other version. + +mknod /dev/pts/0 c 136 0 + +mknod /dev/pts/1 c 136 1 + +mknod /dev/pts/2 c 136 2 + +mknod /dev/pts/3 c 136 3 + +we can use "screen" now, e.g. "screen -S test" + diff --git a/viki/misc/sshd.viki b/viki/misc/sshd.viki new file mode 100644 index 0000000..4f425fd --- /dev/null +++ b/viki/misc/sshd.viki @@ -0,0 +1,13 @@ +=====compile the openssh-4.3p1 for arm 1026EJ-S===== + - install openssl-0.9.8e for toolchain, "CC=arm-linux-gcc ./Configure --host=arm-linux --prefix=$(TOOLCHAIN) os/compiler:arm-linux-gcc && make && make install". + - install openssh-4.3p1 "CC=arm-linux-gcc ./configure --prefix=$(TOOLCHAIN) --host=arm-linux --sysconfdir=/etc/ssh && make". + - replace "$LIBS"(Makefile for openssh) "-lcrypto" with "/tmp/git/openssl/openssl-0.9.8e/libcrypto.a", and append "/tmp/git/openssl/openssl-0.9.8e/libssl.a" into "$LIBS" if the toolchain libssl is not match with the correct. + - do "arm-linux-strip sshd ssh-keygen scp", and copy them to the target $(TARGET_DIR)/usr/{s}bin. + - create file "/etc/ssh/sshd_config", + - run "ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N '' ". + - run "ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N '' ". + - run "ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N '' ". + - "mkdir /var/empty". + - "mknod /dev/ttyp0 c 3 0"(or link ttyp0 to /dev/pty/s0). + - "mknod /dev/ttyp1 c 3 1"(or more). + - "/usr/sbin/sshd"(start it success). diff --git a/viki/misc/start.viki b/viki/misc/start.viki new file mode 100644 index 0000000..aa3ab9b --- /dev/null +++ b/viki/misc/start.viki @@ -0,0 +1,3 @@ +====== miscellaneous ====== + - [[misc:algorithm | 算法分析 ]] + - [[misc:xdm | xdm 远程桌面 ]] \ No newline at end of file diff --git a/viki/misc/tcpdump.viki b/viki/misc/tcpdump.viki new file mode 100644 index 0000000..b6ebcb1 --- /dev/null +++ b/viki/misc/tcpdump.viki @@ -0,0 +1,7 @@ +=====compile the tcpdump and libpcap===== + - export MYCC=mips_fp_le-gcc(or export MYCC=arm-linux-gcc) + - compile the libpcap \\ CC=$(MYCC) ac_cv_linux_vers=2.6.11.12 ./configure --host=mips --prefix=/opt/hardhat/devkit/mips/fp_le --with-pcap=linux --disable-ipv6 --disable-smb + - compile the tcpdump \\ CC=$(MYCC) ./configure --host=mips --prefix=/opt/hardhat/devkit/mips/fp_le --with-pcap=linux --disable-ipv6 --disable-smb + - now we can use command "tcpdump" to capture packets. + - tcpdump -D: will display the netdevices + - tcpdump -n -XX -i eth0 -s 32 "ether host 00:xx:xx:xx:xx:xx" diff --git a/viki/misc/wine.viki b/viki/misc/wine.viki new file mode 100644 index 0000000..646a1db --- /dev/null +++ b/viki/misc/wine.viki @@ -0,0 +1,32 @@ +======wine设置====== +=====wine字体设置===== +首先wine自己的系统中必须有中文字体,我的Ubuntu系统中已经安装了宋体,这也是Windows Vista之前的几个版本的系统使用的中文字体,所以: + +cd ~/.wine/drive_c/windows/fonts +ln -s /usr/share/fonts/truetype/simsun.ttf simsun.ttc + +当然,也可以将该字体复制到fonts目录,这里直接建立连接,省空间。 +然后修改wine的注册表: + +vi ~/.wine/system.reg + +找到“[System\\CurrentControlSet\\Hardware Profiles\\Current\\Software\\Fonts]”,将其中的““LogPixels”=dword:00000060”改成 ““LogPixels”=dword:00000070“。 + +再找到”[Software\\Microsoft\\Windows NT\\CurrentVersion\\FontSubstitutes] xxxx“项,将其中的”MS Shell Dlg“相关的两项修改成如下内容(即更换字体为宋体): + +“MS Shell Dlg”=”SimSun” +“MS Shell Dlg 2″=”SimSun” + +然后: + +vi ~/.wine/drive_c/windows/win.ini + +将”Desktop“块修改成如下内容(即增大字体): + +[Desktop] +menufontsize=13 +messagefontsize=13 +statusfontsize=13 +IconTitleSize=13 + +经过这番折腾,大部分情况下,中文显示应该就正常了 \ No newline at end of file diff --git a/viki/misc/xdm.viki b/viki/misc/xdm.viki new file mode 100644 index 0000000..ec82186 --- /dev/null +++ b/viki/misc/xdm.viki @@ -0,0 +1,197 @@ +====== xdm +=====我的修改===== + * xdm config + +diff --git a/xdm/.Xaccess.swp b/xdm/.Xaccess.swp +deleted file mode 100644 +index 47fa26d..0000000 +Binary files a/xdm/.Xaccess.swp and /dev/null differ +diff --git a/xdm/Xaccess b/xdm/Xaccess +index 580409c..addbcdf 100644 +--- a/xdm/Xaccess ++++ b/xdm/Xaccess +@@ -46,7 +46,7 @@ + # right hand sides can match. + # + +-#* #any host can get a login window ++* #any host can get a login window + + # + # To hardwire a specific terminal to a specific host, you can +diff --git a/xdm/Xsession b/xdm/Xsession +index 1fd8654..21e1b94 100755 +--- a/xdm/Xsession ++++ b/xdm/Xsession +@@ -46,3 +46,4 @@ else + fi + exec /usr/bin/xsm + fi ++# $HOME/.xinitrc +diff --git a/xdm/xdm-config b/xdm/xdm-config +index 0407cfd..69f1c69 100644 +--- a/xdm/xdm-config ++++ b/xdm/xdm-config +@@ -38,4 +38,4 @@ DisplayManager*loginmoveInterval: 10 + + ! SECURITY: do not listen for XDMCP or Chooser requests + ! Comment out this line if you want to manage X terminals with xdm +-DisplayManager.requestPort: 0 ++! DisplayManager.requestPort: 0 + + + * inittab for xdm without daemon + +id:5:initdefault: +... +x:5:respawn:/usr/bin/xdm +#NOT x:5:respawn:/usr/bin/xdm -nodaemon + + * xsesstion file config + +#!/bin/sh +export XMODIFIERS="@im=SCIM" +export XIM=scim +export XIM_PROGRAM=scim +export GTK_IM_MODULE=scim +export QT_IM_MODULE=scim +export GTK_IM_MODULE=scim +export QT_IM_MODULE=scim +export GDK_USE_XFT=1 +export LANG=zh_CN.UTF-8 +export LC_ALL=zh_CN.UTF-8 +XDM_PATH=/bin:/usr/bin:/sbin:/usr/sbin:/opt/kde/bin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/opt/qt/bin +ARROW_PATH=$HOME/.bin/shell:/usr/local/bin:/usr/local/sbin:/bin:/usr/games +A_TOOL_PATH=/work/.opt/mv_tools/bin +#A_TOOL_PATH=$TOOL_PATH:/opt/extra/bin/ +#A_TOOL_PATH=$TOOL_PATH:/opt/brcm/hndtools-mipsel-linux/bin +#A_TOOL_PATH=$TOOL_PATH:/opt/brcm/hndtools-mipsel-uclibc/bin +#A_TOOL_PATH=$TOOL_PATH:/opt/hardhat/devkit/mips/fp_le/bin +#A_TOOL_PATH=$TOOL_PATH:/opt/mipsel-linux-uclibc/bin +#A_TOOL_PATH=$TOOL_PATH:/opt/BRECIS/i686-pc-linux-gnu-x-mipsisa32-elf-newlib/bin +#A_TOOL_PATH=$TOOL_PATH:/work/.opt/build_arm_nofpu/staging_dir/bin/ +#A_TOOL_PATH=$TOOL_PATH:/work/.opt/virata/tools_v10.1c/redhat-3-x86/bin +#A_TOOL_PATH=$TOOL_PATH:/work/.opt/utils_work +#A_TOOL_PATH=$TOOL_PATH:/work/.opt/iad6358/bin/ +export PATH=$ARROW_PATH:$A_TOOL_PATH$XDM_PATH + +userresources=$HOME/.Xresources +usermodmap=$HOME/.Xmodmap +sysresources=/etc/X11/xinit/.Xresources +sysmodmap=/etc/X11/xinit/.Xmodmap + +# merge in defaults and keymaps + +if [ -f $sysresources ]; then + xrdb -merge $sysresources +fi + +if [ -f $sysmodmap ]; then + xmodmap $sysmodmap +fi + +if [ -f $userresources ]; then + xrdb -merge $userresources +fi + +if [ -f $usermodmap ]; then + xmodmap $usermodmap +fi +# start some nice programs +xset s 90000 +xset s noblank s 24000 2400 s expose +#xsetroot -solid SteelBlue +killall -9 ssh-agent +ssh-agent > /tmp/.ssh_agent_q && source /tmp/.ssh_agent_q && rm -f /tmp/.ssh_agent_q +arrow-xinit & +#xv -root -quit ~/.wallpaper/a.png +#fvwm2 +# fvwm-themes-start +#startkde +#fvwm-themes-start +ion3 +#pwm3 + + * arrow-xinit shell script is + +#!/bin/bash +sleep 6 +scim -d +exit 0 + +=====服务器端:===== + * 修改X字体服务器脚本: /etc/rc.d/init.d/xfs , 改变端口 , + +daemon xfs -droppriv -daemon -port -1 + +改成: + +daemon xfs -droppriv -daemon -port 7100 + + * 修改X访问权限 : /etc/X11/xdm/Xaccess, + +#* # any host can get a login window + +去掉#: + +* # any host can get a login window + + * 修改 /etc/X11/gdm/gdm.conf. 激活 XDMCP( X Display Manager Control +Protocol,X显示监控协议) +这样能监听远端X请求 . +改变: + +[xdmcp] +Enable=0 + +到: + +Enable=1 + +确定 "Port=177" 在最后一行. + * 修改 /etc/inittab : (如果你的Linux已经设为X登录,略去此项) + +id:3:initdefault: + +到: + +id:5:initdefault: + + * 修改 /etc/X11/XServers ,加入下面几行取得4个xdm 登录(X Display +Manager)或者 +gdm(GNOME X display manager) +进程,可以允许四个不同用户登录,当然你可以允许更多 +用户 . + +:0 A local /usr/X11R6/bin/X :0 +:1 B local /usr/X11R6/bin/X :1 +:2 C local /usr/X11R6/bin/X :2 +:3 D local /usr/X11R6/bin/X :3 + + * 找到 /etc/X11/xdm/Xsetup_0 ,chmod 755 使该文件非root也可执行. + * 7.修改 /etc/X11/XF86Config ,改: + +FontPath "unix:-1" + +到: + +FontPath "unix:7100" + + * 8.加以下行到/etc/inittab末尾: + +x:5:respawn:/usr/bin/gdm + +=====客户端===== + * Linux +Linux下的本地X Server通过网络XDMCP启动有三种方式: +Direct query(直接询问),Broadcast(广播)和Indirect query(间接询问)三种. +直接询问直接建立和服务器的通讯,广播则发播询问并和第一个回应建立通讯, +间接询问是通过特定主机间接建立和X服务器的通讯. +一般运行X在直接询问模式下只要简单键入: + +X -quiet -query the.host.address <--键入X服务器的IP或主机名 + +就可以取得和在本地同样的X登录画面了. +=====windows下登陆工具===== +可以使用 *Xmanager* + diff --git a/viki/Makefile b/viki/mysql/Makefile similarity index 80% copy from viki/Makefile copy to viki/mysql/Makefile index 69f74ee..9040027 100644 --- a/viki/Makefile +++ b/viki/mysql/Makefile @@ -10,9 +10,12 @@ # output html to this directory, NO extra spaces at the end! HTMLDIR = /work/web.arrow/viki/ # SUBDIRS = lpi vim dpkg dev # sub dirs -SUBDIRS = misc -CSS_NAME = moon.css # the css file to copy over, located in $(CSS_PATH) -TGZ = murj_viki.tar.gz # backup all your data into this archieve +# SUBDIRS:=arm buildroot busybox english gimp gtk humanism +# SUBDIRS+=kernel mips misc mysql ncurses php playground +# SUBDIRS+=qemu tex uboot utils wiki z_draft + +CSS_NAME = ${TOP_CSS_NAME} # the css file to copy over, located in $(CSS_PATH) +TGZ = arrow_viki.tar.gz # backup all your data into this archieve ### in most cases, you need not modify the followings ### # @@ -51,7 +54,8 @@ $(TGZ) : subdirs: $(MAKEFILE) $(SUBDIRS) %/Makefile : Makefile - cp --reply=yes Makefile $@; +# cp --reply=yes Makefile $@; + /bin/cp -i Makefile $@; $(SUBDIRS): cd $@ && $(MAKE) HTMLDIR=$(HTMLDIR)/$@ diff --git a/viki/mysql/mysql.viki b/viki/mysql/mysql.viki new file mode 100644 index 0000000..9575e50 --- /dev/null +++ b/viki/mysql/mysql.viki @@ -0,0 +1,234 @@ +=====MySQL 手动安装方法与中文解决方案===== + +花了1天,在Debian Etch Linux上成功安装了MySQL 5.0.27 icc版本,并使用JDBC测试中文成功! + +中文问题的关键是全部使用UTF-8编码,MySQL 5发布版支持UTF-8,但默认为latin1,Java在内部使用的全部是Unicode,因此要保证JSP页面以UTF-8编码,JDBC驱动采用官方Connector4J 5.0.4,在Resin 3.1/Spring 2.0/Hibernate 3.2环境下测试中文正常。 + + +1. 下载"mysql-standard-5.0.27-linux-i686-icc-glibc23.tar.gz",推荐ICC版本,据称比GCC性能提高10-20% + +2. 复制到/usr/local/,解压:tar zxvf mysql-standard-5.x....tar.gz + +3. 添加用户和组mysql: + +groupadd mysql + +useradd -g mysql mysql + +4. 创建符号连接:/usr/local # ln -s mysql-standard-5.x... mysql + +5. cd mysql,当前目录改为/usr/local/mysql/ + +6. 运行脚步初始化数据库:./scripts/mysql_install_db --user=mysql + +7. 设置权限: + +/usr/local/mysql # chown -R root . + +/usr/local/mysql # chown -R mysql data + +/usr/local/mysql # chgrp -R mysql + + +-------------------------------------------------------------------------------- + +8. 根据需要创建并修改/etc/my.cnf,参考配置: + +[mysqld] + +# 设置默认为INNODB表,支持事务: + +default-storage-engine=INNODB + +# 设置默认的字符集UTF-8: + +character-set-server=utf8 + +collation-server=utf8_general_ci + + +default-character-set=utf8 + +# 禁用bdb: + +skip-bdb + +9. 启动MySQL: + +/usr/local/mysql/bin # ./mysqld_safe --user=mysql & + +10. 初始化root口令: + +/usr/local/mysql/bin # ./mysqladmin -u root -p password "password-of-root" + +Enter password: <输入旧口令,直接按Enter> + + +-------------------------------------------------------------------------------- +11. 以root登录创建数据库: +/usr/local/mysql # ./mysql -u root -p + +Enter password: password-of-root + +12. 创建一个新用户: + +mysql> create user test identified by 'test-password'; + +13. 创建一个新数据库: + +mysql> create database testdb default character set utf8 default collate utf8_general_ci; + +务必指定字符集和排序方式,均为UTF-8,这样才能保证创建的表也使用UTF-8。 + + +14. 赋予test用户从localhost访问testdb的权限,并使用口令: + +mysql> grant all on testdb.* to test@localhost identified by 'test-password'; + +注意:要使用JDBC从远程连接MySQL,就必须正确设置test用户权限,MySQL的访问权限由用户名,客户端机器名和口令共同组成,上例表示仅允许test用户在本机(localhost)通过口令连接MySQL。 + + +-------------------------------------------------------------------------------- + +15. 停止MySQL服务器: + +/usr/local/mysql/bin # ./mysqladmin -u root -p shutdown + +Enter password: password-of-root + +STOPPING server from pid file /usr/local/mysql/data/debian.pid + +xxx mysqld ended +中文秘籍: +/etc/my.cnf中所有与编码相关的设置均要设定为UTF-8,参考步骤8。 + +按以下步骤调试: + +mysql> status; +注意characterset相关值,必须保证全部为utf8,否则,修改/etc/my.cnf,参考步骤8。 + +mysql> show variables like '%char%'; +除了character_set_filesystem显示为binary外,其余应该全部显示为utf8,若非utf8,修改/etc/my.cnf,参考步骤8。 + +mysql> show variables like '%collation%'; +显示应该全部为utf8_general_ci,否则,修改/etc/my.cnf,参考步骤8。 + +mysqlshow -u root -p -i database-name +作用:显示数据库详细信息,如果你没有看到utf8_general_ci,而是latin_swedish_ci,说明数据库编码非UTF-8,中文肯定不正常,删之,然后参考步骤13以UTF-8重新创建数据库。 MySQL 手动安装方法与中文解决方案 + +花了1天,在Debian Etch Linux上成功安装了MySQL 5.0.27 icc版本,并使用JDBC测试中文成功! + +中文问题的关键是全部使用UTF-8编码,MySQL 5发布版支持UTF-8,但默认为latin1,Java在内部使用的全部是Unicode,因此要保证JSP页面以UTF-8编码,JDBC驱动采用官方Connector4J 5.0.4,在Resin 3.1/Spring 2.0/Hibernate 3.2环境下测试中文正常。 + + +1. 下载"mysql-standard-5.0.27-linux-i686-icc-glibc23.tar.gz",推荐ICC版本,据称比GCC性能提高10-20% + +2. 复制到/usr/local/,解压:tar zxvf mysql-standard-5.x....tar.gz + +3. 添加用户和组mysql: + +groupadd mysql + +useradd -g mysql mysql + +4. 创建符号连接:/usr/local # ln -s mysql-standard-5.x... mysql + +5. cd mysql,当前目录改为/usr/local/mysql/ + +6. 运行脚步初始化数据库:./scripts/mysql_install_db --user=mysql + +7. 设置权限: + +/usr/local/mysql # chown -R root . + +/usr/local/mysql # chown -R mysql data + +/usr/local/mysql # chgrp -R mysql + + +-------------------------------------------------------------------------------- + +8. 根据需要创建并修改/etc/my.cnf,参考配置: + +[mysqld] + +# 设置默认为INNODB表,支持事务: + +default-storage-engine=INNODB + +# 设置默认的字符集UTF-8: + +character-set-server=utf8 + +collation-server=utf8_general_ci + + +default-character-set=utf8 + +# 禁用bdb: + +skip-bdb + +9. 启动MySQL: + +/usr/local/mysql/bin # ./mysqld_safe --user=mysql & + +10. 初始化root口令: + +/usr/local/mysql/bin # ./mysqladmin -u root -p password "password-of-root" + +Enter password: <输入旧口令,直接按Enter> + + +-------------------------------------------------------------------------------- +11. 以root登录创建数据库: +/usr/local/mysql # ./mysql -u root -p + +Enter password: password-of-root + +12. 创建一个新用户: + +mysql> create user test identified by 'test-password'; + +13. 创建一个新数据库: + +mysql> create database testdb default character set utf8 default collate utf8_general_ci; + +务必指定字符集和排序方式,均为UTF-8,这样才能保证创建的表也使用UTF-8。 + + +14. 赋予test用户从localhost访问testdb的权限,并使用口令: + +mysql> grant all on testdb.* to test@localhost identified by 'test-password'; + +注意:要使用JDBC从远程连接MySQL,就必须正确设置test用户权限,MySQL的访问权限由用户名,客户端机器名和口令共同组成,上例表示仅允许test用户在本机(localhost)通过口令连接MySQL。 + + +-------------------------------------------------------------------------------- + +15. 停止MySQL服务器: + +/usr/local/mysql/bin # ./mysqladmin -u root -p shutdown + +Enter password: password-of-root + +STOPPING server from pid file /usr/local/mysql/data/debian.pid + +xxx mysqld ended +中文秘籍: +/etc/my.cnf中所有与编码相关的设置均要设定为UTF-8,参考步骤8。 + +按以下步骤调试: + +mysql> status; +注意characterset相关值,必须保证全部为utf8,否则,修改/etc/my.cnf,参考步骤8。 + +mysql> show variables like '%char%'; +除了character_set_filesystem显示为binary外,其余应该全部显示为utf8,若非utf8,修改/etc/my.cnf,参考步骤8。 + +mysql> show variables like '%collation%'; +显示应该全部为utf8_general_ci,否则,修改/etc/my.cnf,参考步骤8。 + +mysqlshow -u root -p -i database-name +作用:显示数据库详细信息,如果你没有看到utf8_general_ci,而是latin_swedish_ci,说明数据库编码非UTF-8,中文肯定不正常,删之,然后参考步骤13以UTF-8重新创建数据库。 + diff --git a/viki/Makefile b/viki/ncurses/Makefile similarity index 80% copy from viki/Makefile copy to viki/ncurses/Makefile index 69f74ee..9040027 100644 --- a/viki/Makefile +++ b/viki/ncurses/Makefile @@ -10,9 +10,12 @@ # output html to this directory, NO extra spaces at the end! HTMLDIR = /work/web.arrow/viki/ # SUBDIRS = lpi vim dpkg dev # sub dirs -SUBDIRS = misc -CSS_NAME = moon.css # the css file to copy over, located in $(CSS_PATH) -TGZ = murj_viki.tar.gz # backup all your data into this archieve +# SUBDIRS:=arm buildroot busybox english gimp gtk humanism +# SUBDIRS+=kernel mips misc mysql ncurses php playground +# SUBDIRS+=qemu tex uboot utils wiki z_draft + +CSS_NAME = ${TOP_CSS_NAME} # the css file to copy over, located in $(CSS_PATH) +TGZ = arrow_viki.tar.gz # backup all your data into this archieve ### in most cases, you need not modify the followings ### # @@ -51,7 +54,8 @@ $(TGZ) : subdirs: $(MAKEFILE) $(SUBDIRS) %/Makefile : Makefile - cp --reply=yes Makefile $@; +# cp --reply=yes Makefile $@; + /bin/cp -i Makefile $@; $(SUBDIRS): cd $@ && $(MAKE) HTMLDIR=$(HTMLDIR)/$@ diff --git a/viki/ncurses/ncurses.viki b/viki/ncurses/ncurses.viki new file mode 100644 index 0000000..36ab00c --- /dev/null +++ b/viki/ncurses/ncurses.viki @@ -0,0 +1 @@ +=====ncurses===== diff --git a/viki/Makefile b/viki/php/Makefile similarity index 80% copy from viki/Makefile copy to viki/php/Makefile index 69f74ee..9040027 100644 --- a/viki/Makefile +++ b/viki/php/Makefile @@ -10,9 +10,12 @@ # output html to this directory, NO extra spaces at the end! HTMLDIR = /work/web.arrow/viki/ # SUBDIRS = lpi vim dpkg dev # sub dirs -SUBDIRS = misc -CSS_NAME = moon.css # the css file to copy over, located in $(CSS_PATH) -TGZ = murj_viki.tar.gz # backup all your data into this archieve +# SUBDIRS:=arm buildroot busybox english gimp gtk humanism +# SUBDIRS+=kernel mips misc mysql ncurses php playground +# SUBDIRS+=qemu tex uboot utils wiki z_draft + +CSS_NAME = ${TOP_CSS_NAME} # the css file to copy over, located in $(CSS_PATH) +TGZ = arrow_viki.tar.gz # backup all your data into this archieve ### in most cases, you need not modify the followings ### # @@ -51,7 +54,8 @@ $(TGZ) : subdirs: $(MAKEFILE) $(SUBDIRS) %/Makefile : Makefile - cp --reply=yes Makefile $@; +# cp --reply=yes Makefile $@; + /bin/cp -i Makefile $@; $(SUBDIRS): cd $@ && $(MAKE) HTMLDIR=$(HTMLDIR)/$@ diff --git a/viki/php/php.viki b/viki/php/php.viki new file mode 100644 index 0000000..770a6a9 --- /dev/null +++ b/viki/php/php.viki @@ -0,0 +1 @@ +=====php===== diff --git a/viki/Makefile b/viki/playground/Makefile similarity index 80% copy from viki/Makefile copy to viki/playground/Makefile index 69f74ee..9040027 100644 --- a/viki/Makefile +++ b/viki/playground/Makefile @@ -10,9 +10,12 @@ # output html to this directory, NO extra spaces at the end! HTMLDIR = /work/web.arrow/viki/ # SUBDIRS = lpi vim dpkg dev # sub dirs -SUBDIRS = misc -CSS_NAME = moon.css # the css file to copy over, located in $(CSS_PATH) -TGZ = murj_viki.tar.gz # backup all your data into this archieve +# SUBDIRS:=arm buildroot busybox english gimp gtk humanism +# SUBDIRS+=kernel mips misc mysql ncurses php playground +# SUBDIRS+=qemu tex uboot utils wiki z_draft + +CSS_NAME = ${TOP_CSS_NAME} # the css file to copy over, located in $(CSS_PATH) +TGZ = arrow_viki.tar.gz # backup all your data into this archieve ### in most cases, you need not modify the followings ### # @@ -51,7 +54,8 @@ $(TGZ) : subdirs: $(MAKEFILE) $(SUBDIRS) %/Makefile : Makefile - cp --reply=yes Makefile $@; +# cp --reply=yes Makefile $@; + /bin/cp -i Makefile $@; $(SUBDIRS): cd $@ && $(MAKE) HTMLDIR=$(HTMLDIR)/$@ diff --git a/viki/playground/playground.viki b/viki/playground/playground.viki new file mode 100644 index 0000000..505936b --- /dev/null +++ b/viki/playground/playground.viki @@ -0,0 +1,66 @@ +====== PlayGround ====== +**test**{{:arm.tcpdump.tar.gz|arm.tcpdump}} +//italic// +__下划线__ + +#include +int main() +{ + return 0; +} + +删除线 +====== 标题 H1 ====== +===== 标题 H2 ===== +==== 标题 H3 ==== +=== 标题 H4 === +== 标题 H5 == +[[内部链接]] +[[http://example.com|外部链接]] + - 数字列表项目 + - 数字列表项目 + * 普通列表项目 * 普通列表项目 +---- + +DELETEME +À + --- //[[arrowworld@gmail.com|arrow]] 2008/08/08 10:07// + + + +/* copyleft (C) GPL3 {{{2 + * Filename: z.c + * + * Author: arrow + * Created at: Thu Aug 7 17:35:08 2008 + * }}}*/ +/*header files {{{1*/ +#include +/*}}}*/ + +/*declaration {{{1*/ +#define xx(a, b, c); do { + c = a + b; +} while (0); +/*}}}*/ + +/*functions {{{1*/ +int main(int argc, char *argv[]) +{ + int a; + + xx(3, 5, a); +/* a = (x = 3 + 5, x);*/ + printf("a = %d\n", a); + return 0; +} + +/* vim:fdm=marker:ts=8:ft=c:norl:fdl=1: + * }}}*/ + + + + +{{NEWPAGE}} + + diff --git a/viki/Makefile b/viki/qemu/Makefile similarity index 83% copy from viki/Makefile copy to viki/qemu/Makefile index 69f74ee..9d5e624 100644 --- a/viki/Makefile +++ b/viki/qemu/Makefile @@ -10,9 +10,12 @@ # output html to this directory, NO extra spaces at the end! HTMLDIR = /work/web.arrow/viki/ # SUBDIRS = lpi vim dpkg dev # sub dirs -SUBDIRS = misc -CSS_NAME = moon.css # the css file to copy over, located in $(CSS_PATH) -TGZ = murj_viki.tar.gz # backup all your data into this archieve +# SUBDIRS = arm buildroot busybox english gimp gtk humanism +# SUBDIRS = kernel mips misc mysql ncurses php playground +# SUBDIRS = qemu tex uboot utils wiki z_draft + +CSS_NAME = ${TOP_CSS_NAME} # the css file to copy over, located in $(CSS_PATH) +TGZ = arrow_viki.tar.gz # backup all your data into this archieve ### in most cases, you need not modify the followings ### # diff --git a/viki/qemu/qemu.viki b/viki/qemu/qemu.viki new file mode 100644 index 0000000..b2ed21b --- /dev/null +++ b/viki/qemu/qemu.viki @@ -0,0 +1 @@ +=====qemu===== diff --git a/viki/start.viki b/viki/start.viki new file mode 100644 index 0000000..245cc3e --- /dev/null +++ b/viki/start.viki @@ -0,0 +1,28 @@ +====== Embedded linux ====== +//天地之道,博也、厚也、高也、明也、悠也、久也。 // + +===== kernel ===== + * [[kernel:start | 内核知识 ]] + * [[kernel:study_howto | 内核学习计划 ]] + + +===== uboot ===== + * [[uboot:start | uboot知识 ]] + * [[uboot:uboot_s3c44b0x | uboot移植到S3C44B0X经历 ]] + + +===== humanism ===== + * [[humanism:start | 人文知识 ]] + * [[humanism:chess_play | 棋经十三篇 ]] + * [[humanism:encourage_study | 荀子.劝学 ]] + + +===== misc ===== + * [[misc:start | miscellaneous列表 ]] + * [[misc:git | git 使用 ]] + * [[misc:screen | screen 的交叉编译 ]] + * [[misc:remembrance_enhance | 如何提高记忆力 ]] + * [[misc:sshd | sshd 的交叉编译 ]] + * [[misc:notice | 个人提醒 ]] + * [[misc:notes | 备忘(未归类) ]] + * [[misc:about | 关于 ]] diff --git a/viki/Makefile b/viki/tex/Makefile similarity index 83% copy from viki/Makefile copy to viki/tex/Makefile index 69f74ee..9d5e624 100644 --- a/viki/Makefile +++ b/viki/tex/Makefile @@ -10,9 +10,12 @@ # output html to this directory, NO extra spaces at the end! HTMLDIR = /work/web.arrow/viki/ # SUBDIRS = lpi vim dpkg dev # sub dirs -SUBDIRS = misc -CSS_NAME = moon.css # the css file to copy over, located in $(CSS_PATH) -TGZ = murj_viki.tar.gz # backup all your data into this archieve +# SUBDIRS = arm buildroot busybox english gimp gtk humanism +# SUBDIRS = kernel mips misc mysql ncurses php playground +# SUBDIRS = qemu tex uboot utils wiki z_draft + +CSS_NAME = ${TOP_CSS_NAME} # the css file to copy over, located in $(CSS_PATH) +TGZ = arrow_viki.tar.gz # backup all your data into this archieve ### in most cases, you need not modify the followings ### # diff --git a/viki/tex/start.viki b/viki/tex/start.viki new file mode 100644 index 0000000..079b887 --- /dev/null +++ b/viki/tex/start.viki @@ -0,0 +1,100 @@ +[[http://www.go2linux.org/installing-and-starting-with-latex | refer to]] +To create the document we first declare the document type and the letter type (at least) + +\documentclass[10pt]{article} + +The document will 10pt letter, and will be an article, you can also define the size of paper here: + +\documentclass[10pt,letterpaper,titlepage]{article} + +Or make it two column (like books) + +\documentclass[10pt,letterpaper,twocolumn,titlepage]{article} + +After that we can go with the author title and date of the document. + +\author{Guillermo Garr\'{o}n} + +\title{Hello World} + +\date{November, 2007} + +From here with all that defined we can start writing the document itself. + +\begin{document} + +This is the control sequence to start the document, + +\maketitle{} + +To insert the title on the document + +\newpage + +To start a new page for the document. + +We can use sections, subsections, subsubsections, bullets and numbering, here are the control sequences for that. + +\section{Part 1} + +\subsection{Part 1.1} + +\subsubsection{Part 1.1.1} + +These are the main sections of a simple document. + +To use bullets + +\begin{itemize} +\item First item +\item Second item +\end{itemize} + +And to use numbering + +\begin{enumerate} +\item First item +\item Second item +\end{eenumerate} + +To add comments you need to insert % and the rest of the line will be taken as comment. + +This is a sample document and its result in PDF + +\documentclass[10pt,letterpaper,titlepage]{article} + +\author{Guillermo Garr\'{o}n} + +\title{Hello World} + +\date{November, 2007} + +\begin{document} +\maketitle{} +\newpage + +\section{Introduction to LaTeX} +LaTeX is a document markup language and document preparation system for the TeX typesetting program. Within the typesetting system.\\ + +LaTeX{} has lots of advantages + +\begin{enumerate} +\item Standard documentes +\item Can be viewed by others with free PDF applications +\end{enumerate} + +\end{document} + +To make this file a pdf file create your document as TXT file with .tex extension, then enter these commands. + +latex my_first_latex.tex + +The output will be my_first_latex.dvi + +dvipdf my_first_latex.dvi + +The output will my_first_latex.pdf + +Go to the index + + diff --git a/viki/Makefile b/viki/uboot/Makefile similarity index 83% copy from viki/Makefile copy to viki/uboot/Makefile index 69f74ee..9d5e624 100644 --- a/viki/Makefile +++ b/viki/uboot/Makefile @@ -10,9 +10,12 @@ # output html to this directory, NO extra spaces at the end! HTMLDIR = /work/web.arrow/viki/ # SUBDIRS = lpi vim dpkg dev # sub dirs -SUBDIRS = misc -CSS_NAME = moon.css # the css file to copy over, located in $(CSS_PATH) -TGZ = murj_viki.tar.gz # backup all your data into this archieve +# SUBDIRS = arm buildroot busybox english gimp gtk humanism +# SUBDIRS = kernel mips misc mysql ncurses php playground +# SUBDIRS = qemu tex uboot utils wiki z_draft + +CSS_NAME = ${TOP_CSS_NAME} # the css file to copy over, located in $(CSS_PATH) +TGZ = arrow_viki.tar.gz # backup all your data into this archieve ### in most cases, you need not modify the followings ### # diff --git a/viki/uboot/start.viki b/viki/uboot/start.viki new file mode 100644 index 0000000..84057f1 --- /dev/null +++ b/viki/uboot/start.viki @@ -0,0 +1,3 @@ +====== uboot学习 ====== + * [[uboot:uboot_mips_run | mips系统在qemu上运行 ]] + * [[uboot:uboot_s3c44b0x | uboot移植到S3C44B0X经历 ]] diff --git a/viki/uboot/uboot-mips-run.viki b/viki/uboot/uboot-mips-run.viki new file mode 100644 index 0000000..c174a2a --- /dev/null +++ b/viki/uboot/uboot-mips-run.viki @@ -0,0 +1,27 @@ +====== how to run mips on qemu ====== +* MIPS BIOS not found on startup(deal with error) + +[ralf@box qemu]$ qemu-system-mips -kernel /tftboot/192.168.0.1/vmlinux.bin -m 16 -nographic + (qemu) mips_r4k_init: start + mips_r4k_init: load BIOS '/usr/local/share/qemu/mips_bios.bin' size 131072 + qemu: could not load MIPS bios '/usr/local/share/qemu/mips_bios.bin' +[ralf@box qemu]$ dd if=/dev/zero of=/usr/local/share/qemu/mips_bios.bin bs=1024 count=128 + + +* run qemu + +$ insmod kqemu.ko +$ qemu-img create -f qcow disk.img 128M +$ qemu -hda disk.img -cdrom /root/cflinux-1.0.iso -boot d + + +* gdbserver for qemu + +# cd /opt +# mkdir -p arm-gdb/build +# cd arm-gdb/build +# /opt/gdb-6.6/configure --host=i386-linux --target=mips-linux-uclibc --prefix=/opt/mips-gdb +# make +# make install + +ref:(http://blog.csdn.net/hansel/archive/2007/10/18/1830543.aspx) diff --git a/viki/uboot/uboot-s3c44b0x.viki b/viki/uboot/uboot-s3c44b0x.viki new file mode 100644 index 0000000..3ec3a99 --- /dev/null +++ b/viki/uboot/uboot-s3c44b0x.viki @@ -0,0 +1,488 @@ +=====uboot移植到S3C44B0X开发板的经历===== + +Sam Fei (email: samfei@163.com) +(1) 事情来由 +几个月前从朋友那里拿到了一块参考Micetek EV44b0-II开发板设计的板子, +对其bootloader MBL感觉很不错.朋友说可能是移植u-boot的.但Micetek并 +没有提供MBL的源代码, 因此当时没有仔细去研究. 最近公司准备想做基于 +S3C44B0X CPU的产品,因此购买了杭州立宇泰公司(www.hzlitai.com.cn)的 +armsys-c及armsys-b开发板和.armsys提供的 bootloader是其公司自己开 +发的bootloader,觉得其USB这一块做的还可以,但利用USB下载调试uclinux +是非常麻烦的,操作很不爽,其bootloader也不提供网络下载调试.因此自己 +计划移植u-boot. + +(2) 开始 +由于没有接触过u-boot,因此第一步要做的就是google一些资料. +u-boot官方网站:http://sourceforge.net/projects/u-boot(比较慢) +http://u-boot.sourceforge.net/这个快一些. + +DENX U-Boot及Linux使用手册: +http://coosign.blogchina.com/coosign/1318487.html, 这是一遍翻译的文 +档.主要介绍了u-boot编译及使用的命令.但没有涉及新板子的移植流程. + +根据上面手册中的说明,下载了最新的u-boot代码,命令: +#cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/u-boot login +#cvs -z6 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/u-boot co -P u-boot + +到board目录查了一下: +#cd u-boot +#cd board +#find . -e!xec grep -l 44B0 {} \; +结果是: +./dave/B2/B2.c +B2网站是: http://www.dave-tech.it,初初看了B2开发板的介绍,但不详细. +包括使用的网络芯片等都没有介绍. + +google "u-boot 移植"后查到一篇文章: +"收集了一些关于U-BOOT的文章" +http://www.bloghome.cn/index.php?op=ViewArticle&articleId=2111&blogId=390 + +里面搜集了不少关于u-boot移植的问题. +里面介绍了"U-Boot 在44B0X 开发板上的移植以及代码分析"的内容,仔细看 +了看.发现其移植的版本比较低,但对了解u-boot结构是满不错的,因为这个 +版本不支持44B0X,因此完全是支持新CPU的移植.了解到make XX_config是 +在Makefile中定义的.另外"MPC8xx的U-Boot移植体会(ZT) "这一篇对u-boot +介绍满详细的.但对移植工作只做了理论性和经验性介绍,没有具体的操作步骤. +"基于Atmel at91rm9200的armlinux的bootloader启动代码分析 +" http://www.linuxfans.org/nuke/modules.php?name=News&file=print&sid=2765 +里面介绍了u-boot移植到at91rm9200上的情况,可以参考一下. + +另外就是仔细阅读u-boot下的README文件. + +(3) 编译一把 +了相关的资料,心动不如行动.先编译一把看看情况.既然只有B2开发板 +是S3C44B0X CPU的,因此先编译一下B2开发 +板看看. 具体: +#cd u-boot +#make B2_config +#make +结果顺利,成功编译. + +(4) 开始动手移植 +我以B2板子的程序做为模板来做. +#cd board +#cp -r dave wx (自己取个公司名wx) +#cd wx +#mv B2 wx20 (自己取个板子名wx20) +#cd wx20 +# mv B2.c wx20.c +修改Makefile及wx20.c, 主要是B2改成wx20. + +增加配置文件: +#cd include/configs +#cp B2.h wx20.h +修改Makefile配置文件,增加wx20_config. +1432 wx20_config : unconfig +1433 @./mkconfig $(@:_config=) arm s3c44b0 wx20 wx +[注:前面的数字是文件行号,以下一样]. +将board/wx目录下和wx20.h文件中的B2改成wx20或WX20. + +这里其实是最重要的步骤,就是根据硬件的情况来修改相关的参数.由于对 +硬件板子的情况不是太了解,因此此时最需要的就是耐心地看看硬件资料. +主要修改的地方有: +include/configs/wx20.h ---- 配置文件,大部分参数是这里配置的. +board/wx/wx20/lowlevel_init.S -- 内存参数配置 +cpu/s3c44b0/serial.c -- 串口配置 +cpu/s3c44b0/start.S -- 程序入口 + +如果此时配置全部正确了,那么我们就简单的很了.(如果你用我的patch的 +话,就是如此了!)那么我也就不会仔细再去研究u-boot其他部分了. 困难就 +是你学习的最好机会! + +(5) 开始编译 +经过简单的参数修改,编译成功.然后下载u-boot.bin(二进制格式). 此时 +你可以用nm看一下u-boot(elf格式)的内容,会有所收获的. + +然后用armsys的bootloader将u-boot.bin调入到内存0xc100000运行.结果 +可想而知,串口没有任何显示,而且死机.bootloader也必须断电重起. + +(6) u-boot流程 +原因是比较明显的,就是参数和硬件没有符合.因此接下来做的事情就是仔 +细阅读S3C44B0 CPU的硬件资料,包括内存配置,串口配置这些.我觉得要让 +串口出信息,最主要的就是CPU的初始化,内存配置和串口配置.另外就是了 +解u-boot程序运行流程,这个对了解需要设置的参数是非常有帮助的.我这 +里大致说一下u-boot运行流程. +入口: cpu/s3c44b0/start.S +主要是CPU初始化( cpu_init_crit ), 调内存配置函数( lowlevel_init ), +然后判断u-boot是否从flash运行,如果是就把u-boot代码拷贝到TEXT_BASE定 +义的地方.然后转到start_armboot. + +start_armboot: lib_arm/board.c +进行各种初始化设置,主要有: +cpu_init CPU相关的设置, 具体在./cpu/s3c44b0/cpu.c中. +board_init 板子相关的设置, 具体在board/wx/wx20/wx20.c 中 +interrupt_init中断设置,我们没有用,具体在./cpu/s3c44b0/interrupts.c中 +env_init 初始化环境变量, 具体要看用什么介质来存储环境变量,如果用 +flash来存贮, 程序在common/env_flash.c中. init_baudrate 设置baud参数 +serial_init 串口初始化, 具体在cpu/s3c44b0/serial.c. +console_init_f 控制台设置, 具体在./common/console.c + +display_banner 显示标题. +dram_init 可用内存配置, 具体在./board/wx/wx20/wx20.c. +flash_init flash初始化,具体./drivers/cfi_flash.c. + +接下来就是环境变量初始化, 网络初始化,最后到main_loop,可以运行各种命令. +(7) 主要参数修改 +经过一段时间调试,终于串口出东西了,这段时间犯了一个小错误,走了一段 +冤枉路.其实配置参数可能早已正确,但串口老是乱码,原因是自己的u-boot.bin +传下来时目录搞错了,结果老是运行错误的u-boot.bin.这段时间里主要改的参数有: + +include/configs/wx20.h: +#define CONFIG_S3C44B0_CLOCK_SPEED 64 +CPU主频,armsys板的是64M +#define PHYS_SDRAM_1 0x0c000000 /* SDRAM Bank #1 */ +B2板子里的定义是错误的.还有RAM大小,flash大小需要修改,跟B2板不同. + +#define CONFIG_DRIVER_RTL8019 +#define RTL8019_BASE 0x08000000 +配置rtl8019AS网络芯片. + +#define CFG_LOAD_ADDR 0x0c008000 /* default load address */ +uclinux运行入口地址 + +lowlevel_init.S: +MEMORY_CONFIG: +.long 0x11010102 +.long 0x600 +.long 0x7ffc +.long 0x7ffc +.long 0x7ffc +.long 0x7ffc +.long 0x2610 +.long 0x18000 +.long 0x18000 +.long 0x960459 +.long 0x10 +.long 0x20 +.long 0x20 +由于对armsys硬件不是太了解,没有办法,只得看armsys bootloader程序,但 +每个版本又有差别.因此是用AXD调试看bootlaoder启动后0x1c80000中的值定的. + +cpu/s3c44b0/serial.c: +#elif CONFIG_S3C44B0_CLOCK_SPEED==64 +divisor = 34; +串口设置,这个也是根据bootloader里的公式计算出来的.这里只定义了115200 +得值,其他没有去设置. + +cpu/s3c44b0/start.S: +ldr r1, =PLLCON + +#if CONFIG_S3C44B0_CLOCK_SPEED==66 +ldr r0, =0x34031 /* 66MHz (Quartz=11MHz) */ +#elif CONFIG_S3C44B0_CLOCK_SPEED==75 +ldr r0, =0x610c1 /*B2: Xtal=20mhz Fclk=75MHz */ +#elif CONFIG_S3C44B0_CLOCK_SPEED==64 +ldr r0, =((M_DIV<<12)+(P_DIV<<4)+S_DIV) //Fin=8MHz,Fout=64MHz +#else +# error CONFIG_S3C44B0_CLOCK_SPEED undefined +#endif +PLLCON的值,也是根据bootlaoder的公式. + +board/wx/wx20/wx20.c +主要是PORT配置,具体我不知道有没有影响. + + +(8) 关于u-boot入口的疑问 +由于开始串口没有出内容,因此对u-boot入口产生怀疑.在网上也找到一 +个帖子,碰到同样疑问的人: +http://www.linuxforum.net/forum/showflat.php?Cat=&Board= +embedded&Number=563322&page=0&view=collapsed&sb=5&o=0&fpart= + +" 链接得到的起始地址为什么是TEXT_BASE,而不是0呢,所以现在只能 +够下载到ram中运行,但是无法烧写道flash中跑,这是怎么回事呢? +u- boot中应该是start.S中的这段代码在flash中运行吧,后面就把自 +身拷贝到ram中TEXT_BASE地址处,为什么在链接文件中指定的 _start +的起始地址为0x00000000呢? " + +后来我理解了: +“链接得到的起始地址为什么是TEXT_BASE,而不是0呢,” +因为u_boot如果从flash运行的话,那么它会将自己的代码拷贝到RAM中, +然后运行。u-boot开始部分代码与编译的入口没有关系,而主要的代码是 +在RAM中运行,因此编译的入口地址是TEXT_BASE.因此u-boot既可以flash +运行,也可以ram运行。 + +“为什么在链接文件中指定的_start的起始地址为0x00000000呢?” +lds文件中的起始地址为0x00000000是不起作用的,由-TTEXT_BASE参数替代的。 + +刚开始比较疑惑的原因是对: +126 relocate: /* relocate U-Boot to RAM */ +127 adr r0, _start /* r0 <- current position of code */ +adr这条指令没有理解正确,因为把它想成mv r0,_start了,实际上adr这 +里的_start是相对的,如果从flash运行的话,r0就是0, 如果从ram运行 +的话,r0就是C100000。 + +(9) u-boot显示信息 +经过上面的努力,我们终于可以看到u-boot的庐山真面目了.当然这还不 +是最终的结果.但至少离胜利不远了.现在我们可以用printf来调试了.此 +时全部是通过armsys bootloader下载u-boot.bin到0xc100000运行. + +现在显示信息是: +Plese wait a moment to start running...i am samfei! +iamsam! + + +U-Boot 1.1.3 (Jul 1 2005 - 13:46:03) + +U-Boot code: 0C100000 -> 0C11A73C BSS: -> 0C11ECF4 +RAM Configuration: +Bank #0: 0c000000 8 MB +[flash_get_size, 224] Entering ... +[flash_get_size, 232] value=bf +[flash_get_size, 255] value=234b +Flash: 2 MB +*** Warning - bad CRC, using default environment + +In: serial +Out: serial +Err: serial +MAC: 26:26:26:26:26:26 +Hit any key to stop autoboot: 0 +=> + +(10) 希望环境变量存贮到flash +B2板缺省的定义是把环境变量存贮到EEPROM上,虽然armsys上也有,但我 +也搞不清楚它的硬件配置,因此希望把环境变量存贮到flash上. + +增加配置: include/configs/wx20.h (从evb4510.h中学来!) +79 #define CONFIG_COMMANDS ( CONFIG_CMD_DFL | \ +80 CFG_CMD_DATE | \ +81 CFG_CMD_ELF | \ +82 CFG_CMD_NET | \ +83 CFG_CMD_ENV|CFG_CMD_FLASH ) +173 #define CFG_ENV_IS_IN_FLASH +174 #undef CFG_ENV_IS_NOWHERE +175 +176 #define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x20000) /* environment start address */ +177 #define CFG_ENV_SECT_SIZE 0x10000 /* Total Size of Environment Sector */ + +编译运行, 并操作setenv, saveenv, printenv. 看起来正常. +=> setenv ipaddr 192.168.1.100 +=> saveenv +Saving Environment to Flash... +Un-Protected 1 sectors +Erasing Flash... +done +Erased 1 sectors +Writing to Flash... done +Protected 1 sectors +e printenv + +但重新启动机器后,参数没有起作用,还是缺省的.仔细看了环境变量的程 +序,发现是由于ENV_IS_EMBEDDED定义造成的,而此变量定义是在./tools/envcrc.c中: +# if (CFG_ENV_ADDR >= CFG_MONITOR_BASE) && \ +((CFG_ENV_ADDR + CFG_ENV_SIZE) <= (CFG_MONITOR_BASE + CFG_MONITOR_LEN)) +# define ENV_IS_EMBEDDED 1 +# endif + +因此在wx20.h中增加了: +#define CFG_MONITOR_BASE PHYS_SDRAM_1 (我还没搞清楚这个变量干啥的.) +主要是去除ENV_IS_EMBEDDED的定义。 + +结果确实准备使用flash的环境变量,但每次总是说标志头错误,经过仔细调试, +最终发现flash写出现错误,原因是我忘了修改wx/common/flash.c中的 +CONFIG_B2为CONFIG_WX20. 修改后就正常了. + +(11) arm-linux和arm-elf +上面调试一直是arm-elf,原因是以前有问题时怀疑编译器问题而修改了,因 +此没有改变。改用arm-linux编译后: + +U-Boot 1.1.3 (Jul 3 2005 - 07:01:36) + +U-Boot code: 0C100000 -> 0C117DA0 BSS: -> 0C11C0F0 +RAM Configuration: +Bank #0: 0c000000 8 MB +env_init flash_addr=20000 +flash_addr=20000 env_ptr=20000 env_ptr->data=bootargs=setenv bootargs root=/dev/ram +ip=192.168.1.100:::::eth0:off ether=25,0,0,0,eth0 ethaddr=00:50:c2:1e:af:fb +envptr->crc=1470de2 1470de2 +buffer->crc=1470de2 +[flash_get_size, 224] Entering ... +[flash_get_size, 232] value=bf +[flash_get_size, 255] value=234b +Flash: 2 MB +env_ptr=20000 +gd->env_addr=20004 gd->env_valid=1 +env_relocate[211] offset = 0x0 +env_relocate[229] malloced ENV at 00000000 +In: +Out: +Err: + +死机!!! + +然后改回arm-elf编译: +U-Boot 1.1.3 (Jul 3 2005 - 07:04:48) + +U-Boot code: 0C100000 -> 0C119B98 BSS: -> 0C11DCD8 +RAM Configuration: +Bank #0: 0c000000 8 MB +env_init flash_addr=20000 +flash_addr=20000 env_ptr=20000 env_ptr->data=bootargs=setenv bootargs root=/dev/ram +ip=192.168.1.100:::::eth0:off ether=25,0,0,0,eth0 ethaddr=00:50:c2:1e:af:fb +envptr->crc=1470de2 1470de2 +buffer->crc=1470de2 +[flash_get_size, 224] Entering ... +[flash_get_size, 232] value=bf +[flash_get_size, 255] value=234b +Flash: 2 MB +env_ptr=20000 +gd->env_addr=20004 gd->env_valid=1 +env_relocate[211] offset = 0x0 +env_relocate[229] malloced ENV at 0c0dfc08 +In: serial +Out: serial +Err: serial +rtl8019 MAC: 2a:2a:2a:2a:2a:2a +Hit any key to stop autoboot: 0 +=> + +正常!因此最好是用arm-elf编译. 我在看网上查资料时记得有人说过"用arm-linux编译时, +malloc返回0,而改成arm-elf编译时就好了".有个印象,具体帖子不记得在哪里了.所以后来我 +就一直使用arm-elf编译,没有再去试arm-linux编译. + +(12) 网卡调试 +剩下来的事情就是调网络了.根据上面配置rtl8019as后,网络仍然不同,然后参考uclinux驱动 +中的寄存器定义修改,网络就可以了.具体修改是: +drivers/rtl8019.h +36 #define ETH_ADDR_SFT (8) +37 #define EI_SHIFT(x) ((x)< tftpboot +eth_init...00:50:c2:1e:af:fb +TFTP from server 192.168.1.25; our IP address is 192.168.1.100 +Filename 'image.bin'. +Load address: 0xc008000 +Loading: +################################################################# +################################################################# +################################################################# +################################################################# +################################################################# +################################################################# +############################### +死机! + +原因是我们现在的u-boot入口地址是C100000,而uclinux内核大约2M,因此load过来就冲突了. +因此我们把u-boot的入口地址改成C300000,具体修改在board/wx/wx20/config.mk: +TEXT_BASE = 0x0C300000 +重新编译运行就可以了. + +(14) 设置自动运行uclinux +刚才我们是用命令load uclinux并执行的.自动运行需要设置bootcmd环境变量: +=> setenv bootcmd "tftpboot; go 0xc008000" ==》设置错误 +## Starting application at 0x0C008000 ... +=> setenv bootcmd "tftpboot\; go 0xc008000" ==》需要有个\ +=> saveenv + +重新开机运行u-boot: +Hit any key to stop autoboot: 0 +Unknown command '"tftpboot' - try 'help' +## Starting application at 0x0C008000 ... +结果还是不能自动下载uclinux和运行.经过调试才发现在设置bootcmd时多加了引号造成的! +正确的设法是: +=> setenv bootcmd tftpboot \; go 0xc008000 ==》正确的设置 + +此时可以成功自动下载uclinux和运行了. + + +(15) flash运行 +刻录到flash后,运行uclinux出现问题,运行到:uclinux 开中断后就死机,提示: +Linux version 2.4.24-uc0 (root@samfei) (gcc version 2.95.3 20010315 (release)(ColdFire +patches - 20010318 from http://fiddes.net/coldfire/)(uClinux XIP and shared lib patches +from http://www.snapgear.com/)) #46 áù 7?? 2 15:52:55 CST 2005 +Processor: Samsung S3C44B0X revision 0 +Architecture: S3C44B0X +On node 0 totalpages: 2048 +zone(0): 0 pages. +zone(1): 2048 pages. +zone(2): 0 pages. +Kernel command line: root=/dev/rom0 init=/linuxrc + +前面一直用armsys的bootloader,将u-boot下载到0xc300000运行,然后再load linux到0xc0080000运 +行,正常.而将u-boot刻录到flash后运行不正常,经过调试uclinux,到init/main.c中 sti()函数后出 +现死机.因此怀疑中断向量设置问题. + +将cpu/s3c44b0/start.S中代码修改成; +40 .globl _start +41 _start: b reset +42 /* +43 add pc, pc, #0x0c000000 +44 add pc, pc, #0x0c000000 +45 add pc, pc, #0x0c000000 +46 add pc, pc, #0x0c000000 +47 add pc, pc, #0x0c000000 +48 add pc, pc, #0x0c000000 +49 add pc, pc, #0x0c000000 +50 */ +51 LDR PC, Undefined_Addr +52 LDR PC, SWI_Addr +53 LDR PC, Prefetch_Addr +54 LDR PC, Abort_Addr +55 LDR PC,RESERVE_Addr +56 LDR PC, IRQ_Addr +57 /* subs pc,lr,#4*/ +58 LDR PC, IRQ_Addr +59 /* subs pc,lr,#4*/ + +114 Undefined_Addr: +115 .word 0x0c000004 +116 SWI_Addr: +117 .word 0x0c000008 +118 Prefetch_Addr: +119 .word 0x0c00000C +120 Abort_Addr: +121 .word 0x0c000010 +122 RESERVE_Addr: +123 .word 0x0c000014 +124 IRQ_Addr: +125 .word 0x0c000018 +126 FIQ_Addr: +127 .word 0x0c00001C +128 +129 /* +130 * the actual reset code +131 */ +132 +133 reset: +后编译,刻录,然后运行.正常了!!! + +(16) 补丁制作和测试 +[root@samfei u-boot]# make distclean +[root@samfei 44b0]# mv u-boot u-boot.wx +[root@samfei 44b0]# cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/u-boot login +Logging in to server:anonymous@cvs.sourceforge.net:2401/cvsroot/u-boot +CVS password: +[root@samfei 44b0]# cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net: +/cvsroot/u-boot co -P u-boot +cvs checkout: Updating u-boot +U u-boot/CHANGELOG +U u-boot/COPYING +U u-boot/CREDITS +U u-boot/MAINTAINERS +。。。。。。 + +[root@samfei 44b0]# diff -Naur u-boot u-boot.wx > uboot-wx-20050703.patch +[root@samfei 44b0]# vi uboot-wx-20050703.patch +去掉没有用的文件.做补丁的好处就是自己可以很清楚的知道哪些文件修改了! +做完了,别忘了测试一下. + +[root@samfei 44b0]# cd u-boot +[root@samfei u-boot]# patch -p1 < ../uboot-wx-20050703.patch +[root@samfei u-boot]# make wx20_config +[root@samfei u-boot]# make + +(17) 后记 +写这份材料化了不少时间.由于在调试的时候记录了大部分的调试信息,因此不 +用费脑筋去回忆.写完了这个经历,非常开心..一则自己可以温故而知新,二则就 +是与人共享啊.在开源的世界里,与人共享应该是件很快乐的一件事情. +目前micetek的板子坏了,手上没有,等我拿到板子再将u-boot移植上去.那时就 +不用那么麻烦了.呵呵. + diff --git a/viki/Makefile b/viki/utils/Makefile similarity index 83% copy from viki/Makefile copy to viki/utils/Makefile index 69f74ee..9d5e624 100644 --- a/viki/Makefile +++ b/viki/utils/Makefile @@ -10,9 +10,12 @@ # output html to this directory, NO extra spaces at the end! HTMLDIR = /work/web.arrow/viki/ # SUBDIRS = lpi vim dpkg dev # sub dirs -SUBDIRS = misc -CSS_NAME = moon.css # the css file to copy over, located in $(CSS_PATH) -TGZ = murj_viki.tar.gz # backup all your data into this archieve +# SUBDIRS = arm buildroot busybox english gimp gtk humanism +# SUBDIRS = kernel mips misc mysql ncurses php playground +# SUBDIRS = qemu tex uboot utils wiki z_draft + +CSS_NAME = ${TOP_CSS_NAME} # the css file to copy over, located in $(CSS_PATH) +TGZ = arrow_viki.tar.gz # backup all your data into this archieve ### in most cases, you need not modify the followings ### # diff --git a/viki/Makefile b/viki/wiki/Makefile similarity index 83% copy from viki/Makefile copy to viki/wiki/Makefile index 69f74ee..9d5e624 100644 --- a/viki/Makefile +++ b/viki/wiki/Makefile @@ -10,9 +10,12 @@ # output html to this directory, NO extra spaces at the end! HTMLDIR = /work/web.arrow/viki/ # SUBDIRS = lpi vim dpkg dev # sub dirs -SUBDIRS = misc -CSS_NAME = moon.css # the css file to copy over, located in $(CSS_PATH) -TGZ = murj_viki.tar.gz # backup all your data into this archieve +# SUBDIRS = arm buildroot busybox english gimp gtk humanism +# SUBDIRS = kernel mips misc mysql ncurses php playground +# SUBDIRS = qemu tex uboot utils wiki z_draft + +CSS_NAME = ${TOP_CSS_NAME} # the css file to copy over, located in $(CSS_PATH) +TGZ = arrow_viki.tar.gz # backup all your data into this archieve ### in most cases, you need not modify the followings ### # diff --git a/viki/wiki/dokuwiki.viki b/viki/wiki/dokuwiki.viki new file mode 100644 index 0000000..9104819 --- /dev/null +++ b/viki/wiki/dokuwiki.viki @@ -0,0 +1,67 @@ +====== DokuWiki ====== + +[[doku>wiki:dokuwiki|{{wiki:dokuwiki-128.png }}]] DokuWiki is a standards compliant, simple to use [[wp>Wiki]], mainly aimed at creating documentation of any kind. It is targeted at developer teams, workgroups and small companies. It has a simple but powerful [[wiki:syntax]] which makes sure the datafiles remain readable outside the Wiki and eases the creation of structured texts. All data is stored in plain text files -- no database is required. + +Read the [[doku>wiki:manual|DokuWiki Manual]] to unleash the full power of DokuWiki. + +===== Download ===== + +DokuWiki is available at http://www.splitbrain.org/go/dokuwiki + + +===== Read More ===== + +All documentation and additional information besides the [[syntax|syntax description]] is maintained in the DokuWiki at [[doku>wiki:dokuwiki|wiki.splitbrain.org]]. + +**About DokuWiki** + + * [[doku>wiki:features|A feature list]] :!: + * [[doku>wiki:users|Happy Users]] + * [[doku>wiki:press|Who wrote about it]] + * [[doku>wiki:blogroll|What Bloggers think]] + * [[http://www.wikimatrix.org/show/DokuWiki|Compare it with other wiki software]] + +**Installing DokuWiki** + + * [[doku>wiki:requirements|System Requirements]] + * [[http://www.splitbrain.org/go/dokuwiki|Download DokuWiki]] :!: + * [[doku>wiki:changes|Change Log]] + * [[doku>wiki:Install|How to install or upgrade]] :!: + * [[doku>wiki:config|Configuration]] + +**Using DokuWiki** + + * [[wiki:syntax|Wiki Syntax]] + * [[doku>wiki:manual|The manual]] :!: + * [[doku>wiki:FAQ|Frequently Asked Questions (FAQ)]] + * [[doku>wiki:glossary|Glossary]] + * [[http://search.dokuwiki.org|Search for DokuWiki help and documentation]] + +**Customizing DokuWiki** + + * [[doku>wiki:tips|Tips and Tricks]] + * [[doku>wiki:tpl:templates|How to create and use templates]] + * [[doku>wiki:plugins|Installing plugins]] + * [[doku>wiki:development|Development Resources]] + +**DokuWiki Feedback and Community** + + * [[doku>wiki:mailinglist|Join the mailing list]] :!: + * [[doku>wiki:forum|Check out the user forum]] + * [[doku>wiki:irc|Talk to other users in the IRC channel]] + * [[http://bugs.splitbrain.org/index.php?project=1|Submit bugs and feature wishes]] + * [[http://www.wikimatrix.org/forum/viewforum.php?id=10|Share your experiences in the WikiMatrix forum]] + * [[doku>wiki:thanks|Some humble thanks]] + + +===== Copyright ===== + +2004-2008 (c) Andreas Gohr ((Please do not contact me for help and support -- use the [[doku>wiki:mailinglist|mailinglist]] or [[http://forum.dokuwiki.org|forum]] instead)) + +The DokuWiki engine is licensed under [[http://www.gnu.org/licenses/gpl.html|GNU General Public License]] Version 2. If you use DokuWiki in your company, consider [[doku>wiki:donate|donating]] a few bucks ;-). + +The content published in the DokuWiki at http://www.splitbrain.org/dokuwiki/ is licensed under the [[http://creativecommons.org/licenses/by-nc-sa/2.0/|Creative Commons Attribution-NonCommercial-ShareAlike License]] Version 2.0. + +An exception is made for the content which distributed in the download tarball((files inside the ''data'' directory -- eg: ''dokuwiki.txt'', ''syntax.txt'', ''dokuwiki-128.png'')) which is, for compatibility reasons, licensed under the GNU General Public License Version 2 as well. + +Not sure what this means? See the [[doku>wiki:faq:license|FAQ on the Licenses]]. diff --git a/viki/wiki/syntax.viki b/viki/wiki/syntax.viki new file mode 100644 index 0000000..42a2226 --- /dev/null +++ b/viki/wiki/syntax.viki @@ -0,0 +1,420 @@ +====== Formatting Syntax ====== + +[[wiki:DokuWiki]] supports some simple markup language, which tries to make the datafiles to be as readable as possible. This page contains all possible syntax you may use when editing the pages. Simply have a look at the source of this page by pressing the //Edit this page// button at the top or bottom of the page. If you want to try something, just use the [[playground:playground|playground]] page. The simpler markup is easily accessible via [[doku>wiki:quickbuttons|quickbuttons]], too. + +===== Basic text formatting ===== + +DokuWiki supports **bold**, //italic//, __underlined__ and ''monospaced'' texts. Of course you can **__//''combine''//__** all these. + + DokuWiki supports **bold**, //italic//, __underlined__ and ''monospaced'' texts. + Of course you can **__//''combine''//__** all these. + +You can use subscript and superscript, too. + + You can use subscript and superscript, too. + +You can mark something as deleted as well. + + You can mark something as deleted as well. + +**Paragraphs** are created from blank lines. If you want to **force a newline** without a paragraph, you can use two backslashes followed by a whitespace or the end of line. + +This is some text with some linebreaks\\ Note that the +two backslashes are only recognized at the end of a line\\ +or followed by\\ a whitespace \\this happens without it. + + This is some text with some linebreaks\\ Note that the + two backslashes are only recognized at the end of a line\\ + or followed by\\ a whitespace \\this happens without it. + +You should use forced newlines only if really needed. + +===== Links ===== + +DokuWiki supports multiple ways of creating links. + +==== External ==== + +External links are recognized automagically: http://www.google.com or simply www.google.com - You can set Linknames, too: [[http://www.google.com|This Link points to google]]. Email addresses like this one: are recognized, too. + + DokuWiki supports multiple ways of creating links. External links are recognized + automagically: http://www.google.com or simply www.google.com - You can set + Linknames, too: [[http://www.google.com|This Link points to google]]. Email + addresses like this one: are recognized, too. + +==== Internal ==== + +Internal links are created by using square brackets. You can either just give a [[doku>wiki:pagename]] or use an additional [[doku>wiki:pagename|Title Text]]. Wiki pagenames are converted to lowercase automatically, special characters are not allowed. + + Internal links are created by using square brackets. You can either just give + a [[pagename]] or use an additional [[pagename|Title Text]]. Wiki pagenames + are converted to lowercase automatically, special chars are not allowed. + +You can use [[wiki:namespaces]] by using a colon in the pagename. + + You can use [[wiki:namespaces]] by using a colon in the pagename. + +For details about namespaces see [[doku>wiki:namespaces]]. + +Linking to a specific section is possible, too. Just add the section name behind a hash character as known from HTML. This links to [[syntax#internal|this Section]]. + + This links to [[syntax#internal|this Section]]. + +Notes: + + * Links to [[wiki:syntax|existing pages]] are shown in a different style from [[wiki:nonexisting]] ones. + * DokuWiki does not use [[wp>CamelCase]] to automatically create links by default, but this behaviour can be enabled in the [[doku>wiki:config]] file. Hint: If DokuWiki is a link, then it's enabled. + * When a section's heading is changed, its bookmark changes, too. So don't rely on section linking too much. + +==== Interwiki ==== + +DokuWiki supports [[doku>wiki:interwiki|Interwiki]] links. These are quick links to other Wikis. For example this is a link to Wikipedia's page about Wikis: [[wp>Wiki]]. + + DokuWiki supports [[doku>wiki:interwiki|Interwiki]] links. These are quick links to other Wikis. + For example this is a link to Wikipedia's page about Wikis: [[wp>Wiki]]. + + +==== Windows Shares ==== + +Windows shares like [[\\server\share|this]] are recognized, too. Please note that these only make sense in a homogenous user group like a corporate [[wp>Intranet]]. + + Windows Shares like [[\\server\share|this]] are recognized, too. + +Notes: + + * For security reasons direct browsing of windows shares only works in Microsoft Internet Explorer per default (and only in the "local zone"). + * For Mozilla and Firefox it can be enabled through the config option [[http://www.mozilla.org/quality/networking/docs/netprefs.html#file|security.checkloaduri]] but this is not recommended. + * See [[dokubug>151]] for more info. + +==== Image Links ==== + +You can also use an image to link to another internal or external page by combining the syntax for links and [[#images_and_other_files|images]] (see below) like this: + + [[http://www.php.net|{{wiki:dokuwiki-128.png}}]] + +[[http://www.php.net|{{wiki:dokuwiki-128.png}}]] + +Please note: The image formatting is the only formatting syntax accepted in link names. + +The whole [[#images_and_other_files|image]] and [[#links|link]] syntax is supported (including image resizing, internal and external images and URLs and interwiki links). + +===== Footnotes ===== + +You can add footnotes ((This is a footnote)) by using double parentheses. + + You can add footnotes ((This is a footnote)) by using double parentheses. + +===== Sectioning ===== + +You can use up to five different levels of headlines to structure your content. If you have more than three headlines, a table of contents is generated automatically -- this can be disabled by including the string ''~~NOTOC~~'' in the document. + +==== Headline Level 3 ==== +=== Headline Level 4 === +== Headline Level 5 == + + ==== Headline Level 3 ==== + === Headline Level 4 === + == Headline Level 5 == + +By using four or more dashes, you can make a horizontal line: + +---- + +===== Images and other files ===== + +You can include external and internal [[doku>wiki:images]] with curly brackets. Optionally you can specify the size of them. + +Real size: {{wiki:dokuwiki-128.png}} + +Resize to given width: {{wiki:dokuwiki-128.png?50}} + +Resize to given width and height: {{wiki:dokuwiki-128.png?200x50}} + +Resized external image: {{http://de3.php.net/images/php.gif?200x50}} + + Real size: {{wiki:dokuwiki-128.png}} + Resize to given width: {{wiki:dokuwiki-128.png?50}} + Resize to given width and height: {{wiki:dokuwiki-128.png?200x50}} + Resized external image: {{http://de3.php.net/images/php.gif?200x50}} + + +By using left or right whitespaces you can choose the alignment. + +{{ wiki:dokuwiki-128.png}} + +{{wiki:dokuwiki-128.png }} + +{{ wiki:dokuwiki-128.png }} + + {{ wiki:dokuwiki-128.png}} + {{wiki:dokuwiki-128.png }} + {{ wiki:dokuwiki-128.png }} + +Of course, you can add a title (displayed as a tooltip by most browsers), too. + +{{ wiki:dokuwiki-128.png |This is the caption}} + + {{ wiki:dokuwiki-128.png |This is the caption}} + +If you specify a filename (external or internal) that is not an image (''gif, jpeg, png''), then it will be displayed as a link instead. + +For linking an image to another page see [[#Image Links]] above. + +===== Lists ===== + +Dokuwiki supports ordered and unordered lists. To create a list item, indent your text by two spaces and use a ''*'' for unordered lists or a ''-'' for ordered ones. + + * This is a list + * The second item + * You may have different levels + * Another item + + - The same list but ordered + - Another item + - Just use indention for deeper levels + - That's it + + + * This is a list + * The second item + * You may have different levels + * Another item + + - The same list but ordered + - Another item + - Just use indention for deeper levels + - That's it + + +===== Smileys ===== + +DokuWiki converts commonly used [[wp>emoticon]]s to their graphical equivalents. More smileys can be placed in the ''smiley'' directory and configured in the ''conf/smileys.conf'' file. Here is an overview of Smileys included in DokuWiki. + + * 8-) %% 8-) %% + * 8-O %% 8-O %% + * :-( %% :-( %% + * :-) %% :-) %% + * =) %% =) %% + * :-/ %% :-/ %% + * :-\ %% :-\ %% + * :-? %% :-? %% + * :-D %% :-D %% + * :-P %% :-P %% + * :-O %% :-O %% + * :-X %% :-X %% + * :-| %% :-| %% + * ;-) %% ;-) %% + * ^_^ %% ^_^ %% + * :?: %% :?: %% + * :!: %% :!: %% + * LOL %% LOL %% + * FIXME %% FIXME %% + * DELETEME %% DELETEME %% + +===== Typography ===== + +[[DokuWiki]] can convert simple text characters to their typographically correct entities. Here is an example of recognized characters. + +-> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r) +"He thought 'It's a man's world'..." + + +-> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r) +"He thought 'It's a man's world'..." + + +Please note: These conversions can be turned off through a [[doku>wiki:config#typography|config option]] and a [[doku>wiki:entities|pattern file]]. + +===== Quoting ===== + +Some times you want to mark some text to show it's a reply or comment. You can use the following syntax: + + I think we should do it + + > No we shouldn't + + >> Well, I say we should + + > Really? + + >> Yes! + + >>> Then lets do it! + +I think we should do it + +> No we shouldn't + +>> Well, I say we should + +> Really? + +>> Yes! + +>>> Then lets do it! + +===== Tables ===== + +DokuWiki supports a simple syntax to create tables. + +^ Heading 1 ^ Heading 2 ^ Heading 3 ^ +| Row 1 Col 1 | Row 1 Col 2 | Row 1 Col 3 | +| Row 2 Col 1 | some colspan (note the double pipe) || +| Row 3 Col 1 | Row 2 Col 2 | Row 2 Col 3 | + +Table rows have to start and end with a ''|'' for normal rows or a ''^'' for headers. + + ^ Heading 1 ^ Heading 2 ^ Heading 3 ^ + | Row 1 Col 1 | Row 1 Col 2 | Row 1 Col 3 | + | Row 2 Col 1 | some colspan (note the double pipe) || + | Row 3 Col 1 | Row 2 Col 2 | Row 2 Col 3 | + +To connect cells horizontally, just make the next cell completely empty as shown above. Be sure to have always the same amount of cell separators! + +Vertical tableheaders are possible, too. + +| ^ Heading 1 ^ Heading 2 ^ +^ Heading 3 | Row 1 Col 2 | Row 1 Col 3 | +^ Heading 4 | no colspan this time | | +^ Heading 5 | Row 2 Col 2 | Row 2 Col 3 | + +As you can see, it's the cell separator before a cell which decides about the formatting: + + | ^ Heading 1 ^ Heading 2 ^ + ^ Heading 3 | Row 1 Col 2 | Row 1 Col 3 | + ^ Heading 4 | no colspan this time | | + ^ Heading 5 | Row 2 Col 2 | Row 2 Col 3 | + +Note: Vertical spans (rowspan) are not possible. + +You can align the table contents, too. Just add at least two whitespaces at the opposite end of your text: Add two spaces on the left to align right, two spaces on the right to align left and two spaces at least at both ends for centered text. + +^ Table with alignment ^^^ +| right| center |left | +|left | right| center | +| xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | + +This is how it looks in the source: + + ^ Table with alignment ^^^ + | right| center |left | + |left | right| center | + | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | + +===== Non-parsed Blocks ===== + +You can include non-parsed blocks into your documents by either indenting them by at least two spaces (like used for the previous examples) or by using the tags ''code'' or ''file''. + + +This is preformatted code all spaces are preserved: like <-this + + + +This is pretty much the same, but you could use it to show that you quoted a file. + + +To let the parser ignore an area completely (ie. do no formatting on it), enclose the area either with ''nowiki'' tags or even simpler, with double percent signs ''%%''. + + +This is some text which contains addresses like this: http://www.splitbrain.org and **formatting**, but nothing is done with it. + + +See the source of this page to see how to use these blocks. + +===== Syntax Highlighting ===== + +[[DokuWiki]] can highlight sourcecode, which makes it easier to read. It uses the [[http://qbnz.com/highlighter/|GeSHi]] Generic Syntax Highlighter -- so any language supported by GeSHi is supported. The syntax is the same like in the code block in the previous section, but this time the name of the used language is inserted inside the tag. Eg. ''''. + + +/** + * The HelloWorldApp class implements an application that + * simply displays "Hello World!" to the standard output. + */ +class HelloWorldApp { + public static void main(String[] args) { + System.out.println("Hello World!"); //Display the string. + } +} + + +The following language strings are currently recognized: //abap actionscript-french, actionscript, ada, apache, applescript, asm, asp, autoit, bash, basic4gl, blitzbasic, bnf, caddcl, cadlisp, cfdg, cfm, c_mac, c, cpp, cpp-qt, csharp, css, delphi, diff, div, dos, dot, d, eiffel, fortran, freebasic, genero, gml, groovy, haskell, html, idl, ini, inno, io, java5, java, javascript, latex, lisp, lua, m68k, matlab, mirc, mpasm, mysql, nsis, objc, ocaml-brief, ocaml, oobas, oracle8, pascal, perl, per, php-brief, php, plsql, python, qbasic, rails, reg, robots, ruby, sas, scheme, sdlbasic, smalltalk, smarty, sql, tcl, text, thinbasic, tsql, vbnet, vb, vhdl, visualfoxpro, winbatch, xml, xpp, z80// + + +===== RSS/ATOM Feed Aggregation ===== +[[DokuWiki]] can integrate data from external XML feeds. For parsing the XML feeds, [[http://simplepie.org/|SimplePie]] is used. All formats understood by SimplePie can be used in DokuWiki as well. You can influence the rendering by multiple additional space separated parameters: + +^ Parameter ^ Description ^ +| any number | will be used as maximum number items to show, defaults to 8 | +| reverse | display the last items in the feed first | +| author | show item authors names | +| date | show item dates | +| description| show the item description. If [[doku>wiki:config#htmlok|HTML]] is disabled all tags will be stripped | +| //n//[dhm] | refresh period, where d=days, h=hours, m=minutes. (e.g. 12h = 12 hours). | + +The refresh period defaults to 4 hours. Any value below 10 minutes will be treated as 10 minutes. [[DokuWiki]] will generally try to supply a cached version of a page, obviously this is inappropriate when the page contains dynamic external content. The parameter tells [[DokuWiki]] to re-render the page if it is more than //refresh period// since the page was last rendered. + +**Example:** + + {{rss>http://slashdot.org/index.rss 5 author date 1h }} + +{{rss>http://slashdot.org/index.rss 5 author date 1h }} + + +===== Embedding HTML and PHP ===== + +You can embed raw HTML or PHP code into your documents by using the ''html'' or ''php'' tags like this: + + +This is some inline HTML + + +

And this is some block HTML

+ +
+ + +This is some inline HTML + + +

And this is some block HTML

+ + + + +echo 'A logo generated by PHP:'; +echo 'PHP Logo !'; +echo '(generated inline HTML)'; + + +echo ''; +echo ''; +echo '
The same, but inside a block level element:PHP Logo !
'; +
+
+ + +echo 'A logo generated by PHP:'; +echo 'PHP Logo !'; +echo '(inline HTML)'; + + +echo ''; +echo ''; +echo '
The same, but inside a block level element:PHP Logo !
'; +
+ +**Please Note**: HTML and PHP embedding is disabled by default in the configuration. If disabled, the code is displayed instead of executed. + +===== Control Macros ===== + +Some syntax influences how DokuWiki renders a page without creating any output it self. The following control macros are availble: + +^ Macro ^ Description | +| %%~~NOTOC~~%% | If this macro is found on the page, no table of contents will be created | +| %%~~NOCACHE~~%% | DokuWiki caches all output by default. Sometimes this might not be wanted (eg. when the %%%% syntax above is used), adding this macro will force DokuWiki to rerender a page on every call | + +===== Syntax Plugins ===== + +DokuWiki's syntax can be extended by [[doku>wiki:plugins|Plugins]]. How the installed plugins are used is described on their appropriate description pages. The following syntax plugins are available in this particular DokuWiki installation: + +~~INFO:syntaxplugins~~ diff --git a/viki/Makefile b/viki/zdraft/Makefile similarity index 83% copy from viki/Makefile copy to viki/zdraft/Makefile index 69f74ee..9d5e624 100644 --- a/viki/Makefile +++ b/viki/zdraft/Makefile @@ -10,9 +10,12 @@ # output html to this directory, NO extra spaces at the end! HTMLDIR = /work/web.arrow/viki/ # SUBDIRS = lpi vim dpkg dev # sub dirs -SUBDIRS = misc -CSS_NAME = moon.css # the css file to copy over, located in $(CSS_PATH) -TGZ = murj_viki.tar.gz # backup all your data into this archieve +# SUBDIRS = arm buildroot busybox english gimp gtk humanism +# SUBDIRS = kernel mips misc mysql ncurses php playground +# SUBDIRS = qemu tex uboot utils wiki z_draft + +CSS_NAME = ${TOP_CSS_NAME} # the css file to copy over, located in $(CSS_PATH) +TGZ = arrow_viki.tar.gz # backup all your data into this archieve ### in most cases, you need not modify the followings ### # diff --git a/viki/zdraft/auth.viki b/viki/zdraft/auth.viki new file mode 100644 index 0000000..8987618 --- /dev/null +++ b/viki/zdraft/auth.viki @@ -0,0 +1,21 @@ + + function authenticate() { + header('WWW-Authenticate: Basic realm="Test Authentication System"'); + header('HTTP/1.0 401 Unauthorized'); + echo "You must enter a valid login ID and password to access this resource\n"; + exit; + } + if (!isset($_SERVER['PHP_AUTH_USER']) || + ($_POST['SeenBefore'] == 1 && $_POST['OldAuth'] == $_SERVER['PHP_AUTH_USER'])) { + authenticate(); + } + else { + echo "

Welcome: {$_SERVER['PHP_AUTH_USER']}
"; + echo "Old: {$_REQUEST['OldAuth']}"; + echo "

\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + } +
diff --git a/viki/zdraft/playground.viki b/viki/zdraft/playground.viki new file mode 100644 index 0000000..a1b330f --- /dev/null +++ b/viki/zdraft/playground.viki @@ -0,0 +1,16 @@ + + +$res = `ls /`; +echo $res; + +ok + + + +ok + + + +$res = `ls data/pages`; +echo $res; + \ No newline at end of file -- 2.11.4.GIT