|
发信人: JulyClyde (七月), 信区: LinuxApp
标 题: Re: coLinux里怎么编译内核?
发信站: 水木社区 (Fri May 20 21:46:34 2005), 站内
找到一个FAQ条目。先发过来,我慢慢看
Q19. How do I build my own kernel for CoLinux?
The kernel included with CoLinux should work for most people, but some people mi
ght need to roll their own. Here is a quick overview of how to make a Linux-2.4.
27 kernel that works with CoLinux. I'm running Gentoo, and I'm building from wit
hin my coLinux environment, but the general idea should work for everybody.
Set up a development environment with GCC 3.3.3 (or earlier). The 2.4.27 and ear
lier kernel sources won't compile with GCC 3.4.1. Under Gentoo, you can install
GCC 3.3.3 with "emerge '=gcc-3.3.3'", and then you can switch between GCC 3.4.1
and 3.3.3 with gcc-config.
Get 2.4 kernel sources and extract them to /usr/src. CoLinux 0.6.1 was released
against 2.4.26, so that is the safest version, but I've been using 2.4.27 for a
while now with no problems. Under Gentoo, use "emerge vanilla-sources".
Get the coLinux-0.6.1 source tarball. Extract it on your development platform.
Patch the kernel with the coLinux patch:
cd /usr/src/linux
patch -p1 < (extraction-point)/colinux-20040529/patch/linux
Fix anything that didn't patch correctly. On my machine, /Makefile didn't patch
(just edit Makefile and add "-co-0.6.1" at the end of the "EXTRAVERSION = " line
), and drivers/block/Makefile didn't patch (add "obj-$(CONFIG_BLK_DEV_PBD) += co
bd.o" somewhere).
Copy the default config from the coLinux sources:
cd /usr/src/linux
cp (extraction-point)/colinux-20040529/conf/linux-config .config
Configure your kernel as needed with menuconfig ("make menuconfig").
You probably don't want to mess with Processor Type - coLinux can crash if the k
ernel tries to use processor features that coLinux isn't expecting the kernel to
mess with. You can enable /dev/cpu/*/cpuid, but I suggest not messing with anyt
hing else. Make sure to leave COPIC Support enabled.
Under General Setup, don't enable PCI, ISA, EISA, MCA, etc., unless you want coL
inux and Windows to fight over hardware. Do leave Cooperative Mode enabled.
Under Block Devices, leave coLinux block device support enabled.
Under Network Device Support, leave Coooperative Virtual Ethernet driver support
enabled.
Under Console Drivers, leave coLinux Pseudo-VGA text console enabled.
For Gentoo, make sure to enable /proc, /dev, automatically mount /dev, and disab
le /dev/pts.
Apply any other patches as needed. I applied the CIFS VFS patch to replace the d
ated SMBFS module.
make dep && make vmlinux modules modules_install
Back up the vmlinux that was installed with coLinux.
Copy /usr/src/linux/vmlinux to your Windows coLinux directory (overwrite the ori
ginal vmlinux that was installed with coLinux).
Restart coLinux.
【 在 JulyClyde (七月) 的大作中提到: 】
: 刚才编了一个,拷出来到coLinux目录里,结果无法启动
: 上次是谁说的coLinux用的内核就是标准内核的?
: 怎么挂cobd块设备啊?
: ...................
--
在军校上学的平民
※ 来源:·水木社区 newsmth.net·[FROM: 221.14.178.*]
--
[m[1m※ 来源:.天大求实 BBS bbs.tju.edu.cn.[FROM: bbs.tju.edu.cn][m |
|