# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ ETYPE="sources" OKV=${PV/_/-} XEN_V=2.0.6 EXTRAVERSION="-xen0" KV="${OKV}${EXTRAVERSION}" S=${WORKDIR}/linux-${KV} inherit kernel-2 eutils DESCRIPTION="Full sources for the XenLinux kernel" SRC_URI="${KERNEL_URI} http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/xen-${XEN_V}-src.tgz" HOMEPAGE="http://www.kernel.org/ http://xen.sourceforge.net" KEYWORDS="~x86" src_unpack() { unpack linux-${PV}.tar.bz2 mv ${WORKDIR}/linux-${OKV} ${WORKDIR}/linux-${KV} kernel_universal_unpack # Force ARCH to xen, to avoid the problems of people forgetting # to do so when running make echo ARCH=xen | cat - ${S}/Makefile >${S}/XenMakefile mv ${S}/XenMakefile ${S}/Makefile cd ${WORKDIR} unpack xen-${XEN_V}-src.tgz # Copy the Xen files into the kernel tree cp -r xen-2.0/linux-${PV}-xen-sparse/* ${S} rm ${S}/mkbuildtree mkdir ${S}/include/asm-xen/xen-public cp -r xen-2.0/xen/include/public/* ${S}/include/asm-xen/xen-public # Use the default domain 0 config file cp ${S}/arch/xen/configs/xen0_defconfig ${S}/arch/xen/defconfig } pkg_postinst() { kernel_pkg_postinst einfo "The default configuration is for a domain 0 kernel. If you" einfo "wish to compile an unprivileged kernel (for use with a guest" einfo "OS), an altered copy of the source can be made:" einfo " cp -R /usr/src/linux-${KV} /usr/src/linux-${KV/xen0/xenU}" einfo " cd /usr/src/linux-${KV/xen0/xenU}" einfo " cp arch/xen/configs/xenU_defconfig arch/xen/defconfig" einfo " sed -i s/-xen0/-xenU/ Makefile" echo }