How to build own kernel for CoLinux?

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.

http://www.linuxfans.org/bbs/viewthread.php?tid=119238
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值