星期二, 11月 29, 2005

LinuxBIOS - workrecord

因為board是82845G,但是現有LinuxBIOS沒有支援,所以找找看有沒有相近的:
src/northbridge/intel中有i855pm。其他都是server用的chipset。所以就以這個為reference。
找到mainboard是digitallogic/adl855pc

找LinuxBIOSv1的northbridge,有82860, 82830, 82815ep.
82815ep是SDRAM,所以可能差異比較大。
v1的build process和v2差異很大......所以還是ref i855pm好了....

LinuxBIOSv1的HOWTO說明還需要去download kernel source code,加上pacth後才能使用v1的Makefile來build。
但是LinuxBIOSv3的HOWTO已經沒看到要download kernel source了。難道已經boundle在LinuxBIOSv2的distribution中了? Trace一下build process..

Make的動作是由target下的board開始,/targets/intel/xe7501devkit/xe7501devkit/Makefile..
all: ./linuxbios.rom
normal/linuxbios.rom: cd normal make linuxbios.rom
到board下可以看到normal folder。就是這裡的Makefile...這個Makefile就直接的加入各個.c module。...ldscript的位置,crt0.s....etc。所以這個大概就是root Makefile。

這個Makefile看到crt0S是由CRT0_INCLUDE組合而成?
CRT0_INCLUDE又是由一堆include依序組合?
因為這個makefile也是generate出來的,所以猜CRT0_INCLUDE-->crto.S-->crt0.s 應該是一種assembly的code-gen動作(猜的)

在normal下有Makefile,Makefile.settings。這兩個都是auato-generate出來的。
Makefile.settings中定義了Makefile中使用到的變數,比較重要的有:
CRT0:=$(TOP)/src/arch/$(ARCH)/init/crt0.S.lb
在make時snap output,配合normal/Makefile和Makefile.settings可以看到整個build process
$ make 2 >&1  tee outputfile
Makefile Generator : 從buildtarget script看到,script是在util/newconfig下的python script

沒有留言:

網誌存檔