2007年9月28日 星期五

2007年9月22日 星期六

lab重新佈網路線

因為大章魚先生想把實驗室網路全換成內部可跑1G的,就開始了昨天勞累的一天的工作><"

使用資源:
Amp的cat 5e 線(精準度很高,是很棒的線)
Amp的頭 probest的線 (用料實在,但太粗很難壓)
壓條們
鋼釘
標籤套
鋸子

總共拉24條線,最難的是固定壓條,敲敲打打的,真是累了學弟跟大章魚. 為了節省成本,每條線的編碼是以A,B,0,1編碼, 分別為AA000,AA001,AA011,AA100,AA110,AA111以此類推,使得0跟1的用量一樣. AMP 頭,一個要5元以上

最可怕的釘壓條,還好弄完還滿專業的


AMP線





D-Link DGS-1224T

2007年9月2日 星期日

qemu+minix+bridge+pppoe

在家裡的電腦要透過pppoe上網,無奈minix沒有pppoe,所以當在qemu裏面的minix要透過bridge上網時就要外部有個已撥好pppoe且有架DHCP的server才行.

是不是真的需要另一台server呢?其實不用,用host os就可以了,host os 撥上pppoe後再開啟DHCP,
就會分給tap1 ip了. 為什麼會這樣呢?因為dhcp server 會在br0那邊聽,當tap1送出dhcp request, dhcp server 就會聽到拉!!

2007年8月12日 星期日

note1-interrupt

interrupt是由IC i8259提供, 當irq進來時, 需要irq_handler接序動作, minix3把這個寫在gate_table裏面, 原本應當是如此就可以結束. 但因minix3把所有在gate_table的irq_handler寫成同一個function, 再由傳入的參數(即irq的值)決定call到哪個irq_handler, 因此就在i8259.c內多了一個註冊irq_handler的程式: put_irq_handler, 此function主要有個 array指向所有irq的function, 如果同一個irq有數個handlers, 則以link list連接.
在clock, system裏面用的stack是在程式內定義好的一段區域 k_stktop, 把k_stktop load 到sp, 就可以把_restart填到stack裏面當return address, 所以每次interrupt結束都會跑restart那段程式, run next_ptr.

2007年7月25日 星期三

Thanks to My BIG Octopus

Today I have a "burst device".
What it can do? You can't figure out!!
Actually, it just a reset button on my desk for convenient. It is easy to reset my computer now.
When u must reset ur computer more than ten times a day. It will be necessary to have reset button on ur hand.

2007年7月21日 星期六

using serial port to debug on minix3

Surfing on minix news group, and I find it claim it has serial port output in kernel, but actually it is not complete.
UART, controller for controlling serial port ,game port and ...I didn;t got fimiliar with it.

Implemetation:
I write init_serialport(in kernel/kprintf.c) , it will be called in kernel main function if SERIAL_DEBUG is defined.
Then what kputc()(in kernel/kprintf.c) do is to write one char to register.

Thanks to
http://www.beyondlogic.org/serial/serial.htm#1

2007年7月20日 星期五

如何灌gentoo

1.設定網路
2.用fdisk分割好所要磁區(密切注意 要換type跟開機磁區)
3.用mkreiserfs和mkswap格式化磁區
4.mount到/mnt/gentoo
mount -t proc none /mnt/proc
swapon /dev/hda3
5.用link2 http://cdpa.linux.nsysu.edu.tw下載portage跟stage3
6.解stage3到/mnt/gentoo而 portage到/mnt/gentoo/usr下
7.編輯/mnt/gentoo/etc下面的文件(先不要chroot,因為chroot後沒有vim)
8.chroot 用emerge裝grub跟gentoo-sources(kernel)
9.編kernel(要選cpu跟硬碟,可用dmesg,還有支援的fs)
10.打grub....root(hd0,3)這是grub所在位置.....setup(hd0)裝再此硬碟第一個block
11.修改grub設定檔,要注意檔案在/boot下面 root (hd0,3)表示boot檔案的位置,以此為相對位置