[PATCH v5 2/4] kernel: add VirtIO device support
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 5 Sep 2010 23:16:24 +0000 (23:16 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 5 Sep 2010 23:16:24 +0000 (23:16 +0000)
Add support for VirtIO-based paravirtualized devices used by various
virtualization platforms.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
SVN-Revision: 22943

package/kernel/modules/virtual.mk

index f988c163c9516cea5d50167ec633a42c610af850..c129820f83528f97814a5665b8ac51d3dd793725 100644 (file)
@@ -7,6 +7,54 @@
 
 VIRTUAL_MENU:=Virtualization Support
 
+
+define KernelPackage/virtio-balloon
+  SUBMENU:=$(VIRTUAL_MENU)
+  TITLE:=VirtIO balloon driver
+  DEPENDS:=@TARGET_x86
+  KCONFIG:=CONFIG_VIRTIO_BALLOON
+  FILES:=$(LINUX_DIR)/drivers/virtio/virtio_balloon.$(LINUX_KMOD_SUFFIX)
+  AUTOLOAD:=$(call AutoLoad,06,virtio-balloon)
+endef
+
+define KernelPackage/virtio-balloon/description
+  Kernel module for VirtIO memory ballooning support
+endef
+
+$(eval $(call KernelPackage,virtio-balloon))
+
+
+define KernelPackage/virtio-net
+  SUBMENU:=$(VIRTUAL_MENU)
+  TITLE:=VirtIO network driver
+  DEPENDS:=@TARGET_x86
+  KCONFIG:=CONFIG_VIRTIO_NET
+  FILES:=$(LINUX_DIR)/drivers/net/virtio_net.$(LINUX_KMOD_SUFFIX)
+  AUTOLOAD:=$(call AutoLoad,50,virtio_net)
+endef
+
+define KernelPackage/virtio-net/description
+ Kernel module for the VirtIO paravirtualized network device
+endef
+
+$(eval $(call KernelPackage,virtio-net))
+
+
+define KernelPackage/virtio-random
+  SUBMENU:=$(VIRTUAL_MENU)
+  TITLE:=VirtIO Random Number Generator support
+  DEPENDS:=@TARGET_x86
+  KCONFIG:=CONFIG_HW_RANDOM_VIRTIO
+  FILES:=$(LINUX_DIR)/drivers/char/hw_random/virtio-rng.$(LINUX_KMOD_SUFFIX)
+  AUTOLOAD:=$(call AutoLoad,09,virtio-rng)
+endef
+
+define KernelPackage/virtio-random/description
+  Kernel module for the VirtIO Random Number Generator
+endef
+
+$(eval $(call KernelPackage,virtio-random))
+
 define KernelPackage/xen-fs
   SUBMENU:=$(VIRTUAL_MENU)
   TITLE:=Xen filesystem