码迷,mamicode.com
首页 > 系统相关 > 详细

用linux源码构建xen的domU

时间:2014-06-03 13:49:58      阅读:394      评论:0      收藏:0      [点我收藏+]

标签:c   class   blog   a   http   ext   

linux源码版本linux-3.14,可以从https://www.kernel.org/获取。

由于已经有了dom0(fedora19),现在需要安装domU,domU可以用xen源码自带的miniOS,这个os是xen客户机的最小系统,有机会一定安装一下试试。这次我配置安装的是linux。

参考xen的wiki页 http://wiki.xenproject.org/wiki/Mainline_Linux_Kernel_Configs

 

Configuring the Kernel for domU Support


 

获取linux源码之后,make menuconfig

NOTE0: Make sure you have correct CPU type (Processor Family) set in the kernel configuration, Xen Dom0 options won‘t show up at all if you have too old CPU selected (too old means a CPU that doesn‘t support PAE; Pentium Pro was the first CPU to have PAE).

选择 Processor type and features -> Processor family -> core2

接着往下

NOTE1: If you‘re building 32 bit version of the kernel, you first need to enable PAE support, since Xen only supports 32 bit PAE kernels nowadays. Xen kernel build options won‘t show up at all before you‘ve enabled PAE for 32 bit builds (Processor type and features -> High Memory Support (64GB) -> PAE (Physical Address Extension) Support). PAE is not needed for 64 bit kernels.

由于我编译64位内核,所以这一条忽略。

接下来开始配置:

第一条忽略。

看到第二条

Enable these core options (Processor type and features| Paravirtualized guest support]

  1. CONFIG_HYPERVISOR_GUEST=y (3.10+ only)
  2. CONFIG_PARAVIRT=y
  3. CONFIG_XEN=y
  4. CONFIG_PARAVIRT_GUEST=y
  5. CONFIG_PARAVIRT_SPINLOCKS=y

menuconfig没有出现Paravirtualized guest support,只能手动编辑.config文件。

看到hypervisor被注释了

bubuko.com,布布扣

我们去掉注释,赋值为y,保存,退出。

接着继续make menuconfig,选择Processor type and features -> Linux guest support

对了,上面没有出现的Paravirtualized guest support选项,在这里变成了Linux guest support选项,进入该选项,配置如下

bubuko.com,布布扣

往下

And Xen pv console device support (Device Drivers|Character devices

  1. CONFIG_HVC_DRIVER=y
  2. CONFIG_HVC_XEN=y

这条不用做,打开.config搜索这个选项可以看到这条已经自动配置好了。

下一步

And Xen disk and network support (Device Drivers|Block devices and Device Drivers|Network device support)

  1. CONFIG_XEN_FBDEV_FRONTEND=y
  2. CONFIG_XEN_BLKDEV_FRONTEND=y
  3. CONFIG_XEN_NETDEV_FRONTEND=y

这一步也不用做。。

下一步,确认一下已经配置好。

And the rest (Device Drivers|Xen driver support)

  1. CONFIG_XEN_PCIDEV_FRONTEND=y
  2. CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
  3. CONFIG_XEN_FBDEV_FRONTEND=y
  4. CONFIG_XEN_XENBUS_FRONTEND=y
  5. CONFIG_XEN_SAVE_RESTORE=y
  6. CONFIG_XEN_GRANT_DEV_ALLOC=m

下一步,改.config的以下选项。

And for tmem support:

  1. CONFIG_XEN_TMEM=y
  2. CONFIG_CLEANCACHE=y
  3. CONFIG_FRONTSWAP=y
  4. CONFIG_XEN_SELFBALLOONING=y

 

Building the kernel


 

 

 

 

用linux源码构建xen的domU,布布扣,bubuko.com

用linux源码构建xen的domU

标签:c   class   blog   a   http   ext   

原文地址:http://www.cnblogs.com/huahaofeng/p/3759801.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!