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檔案的位置,以此為相對位置

2007年7月13日 星期五

以後不會買IBM的小no了

不知道其他地方售後服務怎樣,不過高雄實在不怎麼好,態度很好,技術很差.....
我把小黑送修,因為發現它過熱,風扇不怎麼轉,買不到兩年,不過是一年保的機種,維修要錢了。檢測完說要換整個散熱模組,他們也不想想,這整個模組除了風扇跟sensor會壞外,還有什麼東西會壞,竟然要整個換掉,要價NT$2310,我可以體諒他們的東西都是封在一起的,不能單獨換,但是既然拆了,為什麼不順便清一清了,連我全部都是新的螺絲回來全都變成舊的,誰會在那裡檢查螺絲><"
選擇不維修,回家後拆下來清,風扇就好了。
C小D最生氣的是,有個customer說升級完的BIOS有問題,問能不能替他回復到舊的BIOS,工程師竟然跟他說他們沒有做這樣的服務,因為弄不好主機板會壞掉.......><" 他是小學生吼......軟體去燒firmware遇中斷會有問題,但至少技術人員應該要有可以直接寫ROM的機器阿!!!!!最好是會壞拉!!!

他們的技術真的很差,聽說是外包,應該不會再買IBM了,除非發現其他地方維修不錯。

2007年6月30日 星期六

關於新source重編過後舊source重編還是爛的問題

問題:
只有重編servers的部份 ,沒有動到開機的image, 因為有改 Number of boot servers, 所以一定會爛,但重新編old source竟蓋不回來。

原因:
是由於在rs資料夾內的service這個command,當這個command爛掉後,偵測硬體時間的程式起不來,系統時間頓時變成1970年7月1日,使得make 對下的指令不如預期的去蓋掉會爛的的程式。

解決方式:
1.把爛掉的程式先移除,就可順利install->不好。
2.比較好的方式是把編完的程式touch成現在的時間,如此才不會造成檔案時間是錯的那個。

2007年6月19日 星期二

setup virtualbox for minix

Network is down in minix 3.1.2a when it is be installed in virtualbox. But it should work because the NIC of virtualbox is also AMD pcnet.

The template solution is:
1. set qemu_pci=1 in boot monitor, but what I do is to insert hard code to /usr/src/driver/pci/pci.c
2. comment line 631 in /usr/src/driver/lance.c ; it call assert(0), but I don;t know why assert(0) fails, but I think it;s not important. I don;t know why ec->linmem must be zero now, but what I need is network can work, and it does. So I don;t wanna to trace next codes.

what I learn in progress of solving this problem.
1. Linux has a good API in driver programming.
2.Minix's IPC make program more complicate, but u just trust on it, and focus on errors in lance driver.
3.Minix has command "service".
4.U must copy the execution file of driver to /usr/sbin, the Makefile in /usr/src/tools won;t do it for u.
5.virtualbox's chip id of NIC is 79C973, it's not easy to pronounce in Chinese. :)

2007年6月5日 星期二

getsysinfo(SI_MEM_ALLOC) to PM must transfer to VM

現在先將送到pm的訊息轉到vm,之後要改成直接送向vm

2007年5月10日 星期四

memory allocation of minix

設計:
用不同的slot裝不同段的memory

實作:
1.有一個free slot的array ,有不用的memory就要一個slot來放,形成一個hole list, 以
hole_head指向開頭
2.hole list用base address的大小排列,造成每次釋放memory的時間較要求memory久
3.memory分配是以first fit方式進行