程序14-18 linux/include/linux/config.h
1 #ifndef _CONFIG_H
2 #define _CONFIG_H
3
4 /*
5 * Defines for what uname() should return
6 */
/*
* 定义uname()函数应该返回的值。
*/
7 #define UTS_SYSNAME "Linux"
8 #define UTS_NODENAME "(none)" /* set by sethostname() */
9 #define UTS_RELEASE "" /* patchlevel */
10 #define UTS_VERSION "0.12"
11 #define UTS_MACHINE "i386" /* hardware type */
12
13 /* Don't touch these, unless you really know what your doing. */
/* 请不要随意修改下面定义值,除非你知道自己正在干什么。 */
14 #define DEF_INITSEG 0x9000 // 引导扇区程序将被移动到的段值。
15 #define DEF_SYSSEG 0x1000 // 引导扇区程序把系统模块加载到内存的段值。
16 #define DEF_SETUPSEG 0x9020 // setup程序所处内存段位置。
17 #define DEF_SYSSIZE 0x3000 // 内核系统模块默认最大节数(16字节=1节)。
18
19 /*
20 * The root-device is no longer hard-coded. You can change the default
21 * root-device by changing the line ROOT_DEV = XXX in boot/bootsect.s
22 */
/*
* 根文件系统设备已不再是硬编码的了。通过修改boot/bootsect.s文件中行
* ROOT_DEV = XXX,你可以改变根设备的默认设置值。
*/
23
24 /*
25 * The keyboard is now defined in kernel/chr_dev/keyboard.S
26 */
/*
* 现在键盘类型被放在kernel/chr_dev/keyboard.S程序中定义。
*/
27
28 /*
29 * Normally, Linux can get the drive parameters from the BIOS at
30 * startup, but if this for some unfathomable reason fails, you'd
31 * be left stranded. For this case, you can define HD_TYPE, which
32 * contains all necessary info on your harddisk.
33 *
34 * The HD_TYPE macro should look like this:
35 *
36 * #define HD_TYPE { head, sect, cyl, wpcom, lzone, ctl}
37 *
38 * In case of two harddisks, the info should be sepatated by
39 * commas:
40 *
41 * #define HD_TYPE { h,s,c,wpcom,lz,ctl },{ h,s,c,wpcom,lz,ctl }
42 */
/*
* 通常,Linux能够在启动时从BIOS中获取驱动器德参数,但是若由于未知原因
* 而没有得到这些参数时,会使程序束手无策。对于这种情况,你可以定义HD_TYPE,
* 其中包括硬盘的所有信息。
*
* HD_TYPE宏应该象下面这样的形式:
*
* #define HD_TYPE { head, sect, cyl, wpcom, lzone, ctl}
*
* 对于有两个硬盘的情况,参数信息需用逗号分开:
*
* #define HD_TYPE { h,s,c,wpcom,lz,ctl }, {h,s,c,wpcom,lz,ctl }
*/
43 /*
44 This is an example, two drives, first is type 2, second is type 3:
45
46 #define HD_TYPE { 4,17,615,300,615,8 }, { 6,17,615,300,615,0 }
47
48 NOTE: ctl is 0 for all drives with heads<=8, and ctl=8 for drives
49 with more than 8 heads.
50
51 If you want the BIOS to tell what kind of drive you have, just
52 leave HD_TYPE undefined. This is the normal thing to do.
53 */
/*
* 下面是一个例子,两个硬盘,第1个是类型2,第2个是类型3:
*
* #define HD_TYPE { 4,17,615,300,615,8 }, {6,17,615,300,615,0 }
*
* 注意:对应所有硬盘,若其磁头数<=8,则ctl等于0,若磁头数多于8个,
* 则ctl=8。
*
* 如果你想让BIOS给出硬盘的类型,那么只需不定义HD_TYPE。这是默认操作。
*/
54
55 #endif
56