diff options
author | Richard Yao <ryao@gentoo.org> | 2012-05-19 20:47:29 +0000 |
---|---|---|
committer | Richard Yao <ryao@gentoo.org> | 2012-05-19 20:47:29 +0000 |
commit | bc92cfdd6f444f3a0b2770f07f909ff6d692194e (patch) | |
tree | 2ffe38a99ec4439f3ccedd37df45ac741dff5d73 /sys-freebsd/virtio-kmod | |
parent | Fix bash syntax == to POSIX = wrt #416659 by Richard Yao (diff) | |
download | gentoo-2-bc92cfdd6f444f3a0b2770f07f909ff6d692194e.tar.gz gentoo-2-bc92cfdd6f444f3a0b2770f07f909ff6d692194e.tar.bz2 gentoo-2-bc92cfdd6f444f3a0b2770f07f909ff6d692194e.zip |
New package.
(Portage version: 2.1.10.49/cvs/Linux x86_64)
Diffstat (limited to 'sys-freebsd/virtio-kmod')
-rw-r--r-- | sys-freebsd/virtio-kmod/ChangeLog | 10 | ||||
-rw-r--r-- | sys-freebsd/virtio-kmod/Manifest | 4 | ||||
-rw-r--r-- | sys-freebsd/virtio-kmod/files/pkg-message | 22 | ||||
-rw-r--r-- | sys-freebsd/virtio-kmod/metadata.xml | 8 | ||||
-rw-r--r-- | sys-freebsd/virtio-kmod/virtio-kmod-0.228301.ebuild | 65 |
5 files changed, 109 insertions, 0 deletions
diff --git a/sys-freebsd/virtio-kmod/ChangeLog b/sys-freebsd/virtio-kmod/ChangeLog new file mode 100644 index 000000000000..2cf7e477515d --- /dev/null +++ b/sys-freebsd/virtio-kmod/ChangeLog @@ -0,0 +1,10 @@ +# ChangeLog for sys-freebsd/virtio-kmod +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/virtio-kmod/ChangeLog,v 1.1 2012/05/19 20:47:29 ryao Exp $ + +*virtio-kmod-0.228301 (19 May 2012) + + 19 May 2012; <richard@gentoo.org> +files/pkg-message, +metadata.xml, + +virtio-kmod-0.228301.ebuild: + New package. + diff --git a/sys-freebsd/virtio-kmod/Manifest b/sys-freebsd/virtio-kmod/Manifest new file mode 100644 index 000000000000..04d206e584e3 --- /dev/null +++ b/sys-freebsd/virtio-kmod/Manifest @@ -0,0 +1,4 @@ +AUX pkg-message 684 RMD160 da9b9023e4aae1485ee2bc24672b68a8c43750da SHA1 233313e81151a551a076a14875b804cf63a647da SHA256 06f89ecca2745a367c883e8e92af10097717807b5bcde619d5e3c3e39a372dae +DIST virtio-0.228301.tar.gz 47262 RMD160 15d6a2f710322cfbc405c56d58ca32c20c1b1e7e SHA1 0d73f1a888ace0fc01c48f750f355ee25f98c06a SHA256 022b05ce98a88096aacc331fb7ba122d935432a87100fcba6a3b3d7e9e9aa0d6 +EBUILD virtio-kmod-0.228301.ebuild 1497 RMD160 b2708fdac9caa214b9850af4c9b95878362a575c SHA1 8cdea54b09746973c72f7ed6eed5e88f505ca885 SHA256 330e9df1a2e932e801ba9df1d1e0f9cb7ed9889658b4a5e8c3adf9353e7a2881 +MISC metadata.xml 228 RMD160 7f4566d402fa232a1d2bb22589d7fe8cc72a241c SHA1 9a2f59b4e342ac0f1e064255f59b0bdec32ab1a9 SHA256 a317cd066ed83c5b5acf9d49869cb2f153499bb90cee389334bee9781534f5e8 diff --git a/sys-freebsd/virtio-kmod/files/pkg-message b/sys-freebsd/virtio-kmod/files/pkg-message new file mode 100644 index 000000000000..6b628d3de91a --- /dev/null +++ b/sys-freebsd/virtio-kmod/files/pkg-message @@ -0,0 +1,22 @@ +To use these modules, add loading lines in /boot/loader.conf: + +virtio_load="YES" +virtio_pci_load="YES" +virtio_blk_load="YES" +if_vtnet_load="YES" +virtio_balloon_load="YES" + +Also, edit fstab and make openrc start vtnet0 instead of em0: + +# sed -i.bak -Ee 's|/dev/ada?|/dev/vtbd|' /etc/fstab +# mv /etc/init.d/em0 /etc/init.d/vtnet0 + +and enable virtio devices in host's domain.xml: + +- <target dev='hda' bus='ide'/> ++ <target dev='vda' bus='virtio'/> +... +- <model type='e1000'/> +- <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> ++ <model type='virtio'/> ++ <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> diff --git a/sys-freebsd/virtio-kmod/metadata.xml b/sys-freebsd/virtio-kmod/metadata.xml new file mode 100644 index 000000000000..e63e3c3865da --- /dev/null +++ b/sys-freebsd/virtio-kmod/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>ryao@gentoo.org</email> + <name>Richard Yao</name> + </maintainer> +</pkgmetadata> diff --git a/sys-freebsd/virtio-kmod/virtio-kmod-0.228301.ebuild b/sys-freebsd/virtio-kmod/virtio-kmod-0.228301.ebuild new file mode 100644 index 000000000000..5c0bf71aa072 --- /dev/null +++ b/sys-freebsd/virtio-kmod/virtio-kmod-0.228301.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/virtio-kmod/virtio-kmod-0.228301.ebuild,v 1.1 2012/05/19 20:47:29 ryao Exp $ + +EAPI=4 + +inherit bsdmk flag-o-matic + +DESCRIPTION="Virtio drivers from FreeBSD Ports' emulators/virtio-kmod." +HOMEPAGE="http://www.freshports.org/emulators/virtio-kmod/" +SRC_URI="mirror://freebsd/ports/local-distfiles/kuriyama/virtio-${PV}.tar.gz" + +SLOT="0" +KEYWORDS="~x86-fbsd ~amd64-fbsd" +IUSE="custom-cflags +debug" +LICENSE="BSD-2" + +DEPEND=">=sys-freebsd/freebsd-sources-8.2" +RDEPEND="" + +QA_TEXTRELS="*" +RESTRICT="strip" +S="${WORKDIR}" + +NEEDSUBDIRS="conf contrib dev/pci geom kern net netinet netinet6 sys tools vm + x86 i386 amd64" + +src_unpack() { + default + CPIO_ARGS="-dump" + + # When hardlinks are possible, use them to avoid copies when FEATURES=userpriv + test $UID != 0 && export CPIO_ARGS+=l + + cd /usr/src/sys/ + for d in $NEEDSUBDIRS; do + find $d ! -name @ | cpio --quiet "${CPIO_ARGS}" "${WORKDIR}" + done + +} + +src_compile() { + + use debug && export DEBUG_FLAGS="-g" + use custom-cflags || strip-flags + append-cflags "-I${WORKDIR}" + + cd "${WORKDIR}/modules/virtio" + mkmake SYSDIR="${WORKDIR}" LDFLAGS="$(raw-ldflags)" || die "mkmake failed" + +} + +src_install() { + # Upstream does not provide an install target + dodir /boot/modules + cp "${WORKDIR}"/modules/virtio/*/*.ko{,.symbols} "${ED}/boot/modules" +} + +pkg_postinst() { + # Update linker.hints file + /usr/sbin/kldxref "${EPREFIX}/boot/modules" + + # Print message from FreeBSD Ports + elog "$(cat "${FILESDIR}/pkg-message")" +} |