aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2013-03-27 10:55:41 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2013-03-27 10:56:04 -0700
commit7ca70b01c31a7ea22fd5056a4a91738e4a22e43c (patch)
tree2755a7520f50fc3b0bb5161278cdd35472a5a97f
parentAdd ehci-pci to MODULES_USB, needed by 3.8 kernels, see bug #458606 (diff)
downloadgenkernel-hyperv.tar.gz
genkernel-hyperv.tar.bz2
genkernel-hyperv.zip
Bug #463182: Add Hyper-V support, modules/options based on what I see in the kernel. Completely untested.hyperv
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rw-r--r--arch/x86/modules_load3
-rw-r--r--arch/x86_64/modules_load3
-rw-r--r--defaults/modules_load3
-rw-r--r--doc/genkernel.8.txt3
-rwxr-xr-xgen_cmdline.sh6
-rwxr-xr-xgen_configkernel.sh8
-rwxr-xr-xgen_determineargs.sh1
7 files changed, 27 insertions, 0 deletions
diff --git a/arch/x86/modules_load b/arch/x86/modules_load
index 3469170d..2736a4fc 100644
--- a/arch/x86/modules_load
+++ b/arch/x86/modules_load
@@ -30,3 +30,6 @@ MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs fuse"
# Crypto
MODULES_CRYPTO="sha256_generic cbc aes_generic aes_586 aesni-intel xts"
+
+# Hyper-V
+MODULES_HYPERV="hv_vmbus hv_netvsc hv_storvsc hv_timesource hid-hyperv hv_balloon hv_utils"
diff --git a/arch/x86_64/modules_load b/arch/x86_64/modules_load
index c202c308..e81f4e56 100644
--- a/arch/x86_64/modules_load
+++ b/arch/x86_64/modules_load
@@ -29,3 +29,6 @@ MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs fuse"
# Crypto
MODULES_CRYPTO="sha256_generic cbc aes_generic aes-x86_64 aesni-intel xts"
+
+# Hyper-V
+MODULES_HYPERV="hv_vmbus hv_netvsc hv_storvsc hid-hyperv hv_balloon hv_utils"
diff --git a/defaults/modules_load b/defaults/modules_load
index 7229990d..3d372b80 100644
--- a/defaults/modules_load
+++ b/defaults/modules_load
@@ -29,3 +29,6 @@ MODULES_FS="ext2 ext3 ext4 btrfs reiserfs jfs nfs xfs zfs fuse"
# Crypto
MODULES_CRYPTO="sha256_generic cbc aes_generic xts"
+
+# Hyper-V
+MODULES_HYPERV=""
diff --git a/doc/genkernel.8.txt b/doc/genkernel.8.txt
index 4691a981..b3f05371 100644
--- a/doc/genkernel.8.txt
+++ b/doc/genkernel.8.txt
@@ -275,6 +275,9 @@ INITIALIZATION
*--*[*no-*]*iscsi*::
Includes or excludes iSCSI support
+*--*[*no-*]*hyperv*::
+ Includes or excludes Hyper-V support
+
*--bootloader*=*grub*::
Add new kernel to GRUB configuration.
diff --git a/gen_cmdline.sh b/gen_cmdline.sh
index 5503bb56..7d44c239 100755
--- a/gen_cmdline.sh
+++ b/gen_cmdline.sh
@@ -101,6 +101,8 @@ longusage() {
echo " --no-multipath Exclude Multipath support"
echo " --iscsi Include iSCSI support"
echo " --no-iscsi Exclude iSCSI support"
+ echo " --hyperv Include Hyper-V support"
+ echo " --no-hyperv Exclude Hyper-V support"
echo " --bootloader=grub Add new kernel to GRUB configuration"
echo " --linuxrc=<file> Specifies a user created linuxrc"
echo " --busybox-config=<file> Specifies a user created busybox config"
@@ -344,6 +346,10 @@ parse_cmdline() {
CMD_ISCSI=`parse_optbool "$*"`
print_info 2 "CMD_ISCSI: ${CMD_ISCSI}"
;;
+ --hyperv|--no-hyperv)
+ CMD_HYPERV=`parse_optbool "$*"`
+ print_info 2 "CMD_HYPERV: ${CMD_HYPERV}"
+ ;;
--loglevel=*)
CMD_LOGLEVEL=`parse_opt "$*"`
LOGLEVEL="${CMD_LOGLEVEL}"
diff --git a/gen_configkernel.sh b/gen_configkernel.sh
index a69c7130..392de829 100755
--- a/gen_configkernel.sh
+++ b/gen_configkernel.sh
@@ -142,6 +142,14 @@ config_kernel() {
sed -i ${KERNEL_OUTPUTDIR}/.config -e 's/CONFIG_ISCSI_TCP=y/CONFIG_ISCSI_TCP=m/g'
sed -i ${KERNEL_OUTPUTDIR}/.config -e 's/CONFIG_SCSI_ISCSI_ATTRS=y/CONFIG_SCSI_ISCSI_ATTRS=m/g'
fi
+ # Make sure Hyper-V modules are enabled in the kernel, if --hyperv
+ if isTrue ${CMD_HYPERV}
+ then
+ for v in HYPERV HYPERV_UTILS HYPERV_BALLOON HYPERV_STORAGE HYPERV_NET HID_HYPERV_MOUSE ; do
+ sed -i ${KERNEL_OUTPUTDIR}/.config \
+ -e "s/^(\# )?(CONFIG_$v)( is not set|=y|=m)/\2=m/g"
+ done
+ fi
if isTrue ${SPLASH}
then
diff --git a/gen_determineargs.sh b/gen_determineargs.sh
index afc6fe36..cef72fbe 100755
--- a/gen_determineargs.sh
+++ b/gen_determineargs.sh
@@ -114,6 +114,7 @@ determine_real_args() {
set_config_with_override BOOL LVM CMD_LVM
set_config_with_override BOOL DMRAID CMD_DMRAID
set_config_with_override BOOL ISCSI CMD_ISCSI
+ set_config_with_override BOOL HYPERV CMD_HYPERV
set_config_with_override BOOL BUSYBOX CMD_BUSYBOX "yes"
set_config_with_override BOOL UNIONFS CMD_UNIONFS
set_config_with_override BOOL NETBOOT CMD_NETBOOT