QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2399|回复: 4

coLinux里编译内核

[复制链接]
发表于 2005-5-28 21:43:01 | 显示全部楼层 |阅读模式
发信人: 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.*]

--
※ 来源:.天大求实 BBS bbs.tju.edu.cn.[FROM: bbs.tju.edu.cn]
发表于 2005-6-4 14:51:48 | 显示全部楼层
大哥的贴,看不懂也得顶呀
回复

使用道具 举报

 楼主| 发表于 2005-6-5 01:39:55 | 显示全部楼层
[quote:968777d5a4="goshawk168"]大哥的贴,看不懂也得顶呀[/quote]
恶意灌水嘛

PS:转贴的
回复

使用道具 举报

发表于 2005-6-6 10:41:22 | 显示全部楼层
你不是灌水吗?
回复

使用道具 举报

 楼主| 发表于 2005-6-6 23:02:22 | 显示全部楼层
我不灌水能混这么多贴嘛
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-2 08:33 , Processed in 0.073076 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表