1 |
commit: fd38ac4fb57ca9bc95ab9511c6948d326bdf48de |
2 |
Author: Daniel Robbins <drobbins <AT> funtoo <DOT> org> |
3 |
AuthorDate: Sun Nov 12 03:24:10 2017 +0000 |
4 |
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 15 03:05:17 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=fd38ac4f |
7 |
|
8 |
Add --hyperv option for Microsoft Hyper-V. Enable within kernel image to ensure modules are available early at boot. |
9 |
|
10 |
doc/genkernel.8.txt | 3 +++ |
11 |
gen_cmdline.sh | 8 +++++++- |
12 |
gen_configkernel.sh | 15 +++++++++++++++ |
13 |
gen_determineargs.sh | 1 + |
14 |
4 files changed, 26 insertions(+), 1 deletion(-) |
15 |
|
16 |
diff --git a/doc/genkernel.8.txt b/doc/genkernel.8.txt |
17 |
index a0c638e..7c653eb 100644 |
18 |
--- a/doc/genkernel.8.txt |
19 |
+++ b/doc/genkernel.8.txt |
20 |
@@ -303,6 +303,9 @@ INITIALIZATION |
21 |
*--*[*no-*]*iscsi*:: |
22 |
Includes or excludes iSCSI support |
23 |
|
24 |
+*--*[*no-*]*hyperv*:: |
25 |
+ Includes or excludes Microsoft Hyper-V support |
26 |
+ |
27 |
*--*[*no-*]*ssh*:: |
28 |
Includes or excludes SSH (dropbear) support for remote LUKS keys. |
29 |
|
30 |
|
31 |
diff --git a/gen_cmdline.sh b/gen_cmdline.sh |
32 |
index 83b3829..1091d4d 100755 |
33 |
--- a/gen_cmdline.sh |
34 |
+++ b/gen_cmdline.sh |
35 |
@@ -114,7 +114,9 @@ longusage() { |
36 |
echo " --no-multipath Exclude Multipath support" |
37 |
echo " --iscsi Include iSCSI support" |
38 |
echo " --no-iscsi Exclude iSCSI support" |
39 |
- echo " --ssh Include SSH (dropbear) support" |
40 |
+ echo " --hyperv Include Microsoft Hyper-V support" |
41 |
+ echo " --no-hyperv Exclude Microsoft Hyper-V support" |
42 |
+ echo " --ssh Include SSH (dropbear) support" |
43 |
echo " --no-ssh Exclude SSH (dropbear) support" |
44 |
echo " --bootloader=grub Add new kernel to GRUB configuration" |
45 |
echo " --linuxrc=<file> Specifies a user created linuxrc" |
46 |
@@ -404,6 +406,10 @@ parse_cmdline() { |
47 |
CMD_ISCSI=`parse_optbool "$*"` |
48 |
print_info 2 "CMD_ISCSI: ${CMD_ISCSI}" |
49 |
;; |
50 |
+ --hyperv|--no-hyperv) |
51 |
+ CMD_ISCSI=`parse_optbool "$*"` |
52 |
+ print_info 2 "CMD_HYPERV: ${CMD_HYPERV}" |
53 |
+ ;; |
54 |
--ssh|--no-ssh) |
55 |
CMD_SSH=`parse_optbool "$*"` |
56 |
print_info 2 "CMD_SSH: ${CMD_SSH}" |
57 |
|
58 |
diff --git a/gen_configkernel.sh b/gen_configkernel.sh |
59 |
index 26e4610..697c478 100755 |
60 |
--- a/gen_configkernel.sh |
61 |
+++ b/gen_configkernel.sh |
62 |
@@ -219,6 +219,21 @@ config_kernel() { |
63 |
kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_SCSI_ISCSI_ATTRS" "${cfg_CONFIG_SCSI_ISCSI_ATTRS}" |
64 |
fi |
65 |
|
66 |
+ # Make sure HyperV modules are enabled in the kernel, if --hyperv |
67 |
+ if isTrue ${CMD_HYPERV} |
68 |
+ then |
69 |
+ kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_HYPERV" "y" |
70 |
+ kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_HYPERV_UTILS" "y" |
71 |
+ kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_HYPERV_BALLOON" "y" |
72 |
+ kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_HYPERV_STORAGE" "y" |
73 |
+ kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_HYPERV_NET" "y" |
74 |
+ kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_HYPERV_KEYBOARD" "y" |
75 |
+ kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_PCI_HYPERV" "y" |
76 |
+ kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_FB_HYPERV" "y" |
77 |
+ kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_HID_HYPERV_MOUSE" "y" |
78 |
+ kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_UIO_HV_GENERIC" "y" |
79 |
+ fi |
80 |
+ |
81 |
if isTrue ${SPLASH} |
82 |
then |
83 |
kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_FB_SPLASH" "y" |
84 |
|
85 |
diff --git a/gen_determineargs.sh b/gen_determineargs.sh |
86 |
index fe9f85b..b686fca 100755 |
87 |
--- a/gen_determineargs.sh |
88 |
+++ b/gen_determineargs.sh |
89 |
@@ -118,6 +118,7 @@ determine_real_args() { |
90 |
set_config_with_override BOOL LVM CMD_LVM |
91 |
set_config_with_override BOOL DMRAID CMD_DMRAID |
92 |
set_config_with_override BOOL ISCSI CMD_ISCSI |
93 |
+ set_config_with_override BOOL HYPERV CMD_HYPERV |
94 |
set_config_with_override BOOL BUSYBOX CMD_BUSYBOX "yes" |
95 |
set_config_with_override BOOL NFS CMD_NFS "yes" |
96 |
set_config_with_override BOOL MICROCODE CMD_MICROCODE |