Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Compiling with --virtio fails...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
bedtime
n00b
n00b


Joined: 19 Dec 2012
Posts: 71

PostPosted: Mon Jun 26, 2017 11:01 am    Post subject: [SOLVED] Compiling with --virtio fails... Reply with quote

When I issue this command:

Code:
genkernel --virtio  --menuconfig all


I get:

Code:
genkernel --virtio  --menuconfig all
* Gentoo Linux Genkernel; Version 3.4.52.4
* Running with options: --virtio --menuconfig all

* Using genkernel.conf from /etc/genkernel.conf
* Sourcing arch-specific config.sh from /usr/share/genkernel/arch/x86_64/config.sh ..
* Sourcing arch-specific modules_load from /usr/share/genkernel/arch/x86_64/modules_load ..

* Linux Kernel 4.8.17-hardened-r2 for x86_64...
* .. with config file /etc/kernels/kernel-config-x86_64-4.8.17-hardened-r2
* kernel: Using config from /etc/kernels/kernel-config-x86_64-4.8.17-hardened-r2
* kernel: >> Running mrproper...
*         >> Running oldconfig...
* kernel: >> Cleaning...
* kernel: >> Invoking menuconfig...
* ERROR: Failed to compile the "prepare" target...
*
* -- Grepping log... --
*
*COMMAND: make  -j2 -j1 CC="gcc" LD="ld" AS="as" ARCH="x86" menuconfig
*COMMAND: make  -j2 CC="gcc" LD="ld" AS="as" ARCH="x86" prepare
*  HOSTCC  scripts/kconfig/conf.o
*  HOSTLD  scripts/kconfig/conf
*scripts/kconfig/conf  --silentoldconfig Kconfig
*.config:4805:warning: override: reassigning to symbol VIRTIO_PCI
*--
*PCI driver for virtio devices (VIRTIO_PCI) [Y/n/m/?] y
*  Support for legacy virtio draft 0.9.X and older devices (VIRTIO_PCI_LEGACY) [Y/n/?] (NEW) aborted!
*
*Console input/output is redirected. Run 'make oldconfig' to update configuration.
*
*make[2]: *** [scripts/kconfig/Makefile:38: silentoldconfig] Error 1
*make[1]: *** [Makefile:548: silentoldconfig] Error 2
*--
* Running with options: --virtio --menuconfig all
* Using genkernel.conf from /etc/genkernel.conf
* Sourcing arch-specific config.sh from /usr/share/genkernel/arch/x86_64/config.sh ..
* Sourcing arch-specific modules_load from /usr/share/genkernel/arch/x86_64/modules_load ..
*
* ERROR: Failed to compile the "prepare" target...
*
* -- End log... --
*
* Please consult /var/log/genkernel.log for more information and any
* errors that were reported above.
*
* Report any genkernel bugs to bugs.gentoo.org and
* assign your bug to genkernel@gentoo.org. Please include
* as much information as you can in your bug report; attaching
* /var/log/genkernel.log so that your issue can be dealt with effectively.
*
* Please do *not* report compilation failures as genkernel bugs!
*
tux /usr/src/linux # make oldconfig
scripts/kconfig/conf  --oldconfig Kconfig
.config:4805:warning: override: reassigning to symbol VIRTIO_PCI
*
* Restart config...
*
*
* Virtio drivers
*
PCI driver for virtio devices (VIRTIO_PCI) [Y/n/m/?] y
  Support for legacy virtio draft 0.9.X and older devices (VIRTIO_PCI_LEGACY) [Y/n/?] (NEW) y
Virtio balloon driver (VIRTIO_BALLOON) [Y/n/m/?] y
Virtio input driver (VIRTIO_INPUT) [N/m/y/?] n
Platform bus driver for memory mapped virtio devices (VIRTIO_MMIO) [Y/n/m/?] y
  Memory mapped virtio devices parameter parsing (VIRTIO_MMIO_CMDLINE_DEVICES) [N/y/?] (NEW) n
#
# configuration written to .config
#


It compiles fine without '--virtio' appeneded, but in order to run this Hardened Gentoo VM with spice, I need to configure it with virtio parameters, so this is a VM image we are talking about, and the compiling is being done in the VM and not on my baremetal system. My Fedora VM image works fine with spice, as it already has virtio support prebuilt into the kernel. The Gentoo VM works fine when not run in spice, and I am obviously able to run it and compile the kernel to execute these commands.

Here is what I am compiling with:

Code:
  │ │    <M> PCI driver for virtio devices                                        │ │ 
  │ │    [*]   Support for legacy virtio draft 0.9.X and older devices            │ │ 
  │ │    <M> Virtio balloon driver                                                │ │ 
  │ │    < > Virtio input driver                                                  │ │ 
  │ │    < > Platform bus driver for memory mapped virtio devices


Code:
  │ │    <M>   Virtio block driver                                                │ │ 


Code:
  │ │    <M>   virtio-scsi support                                                │ │ 



If you need any other info, please ask! Also, I can run this VM in snapshot or persistent mode, so if it messes up, I can easily revert, so don't be shy! :)


*** SOLVED ***

The trick was that I didn't need to use the '--virtio' parameter, but I needed to turn off 'automatic setup' for Grsecurity in the kernel so that I could enable paravirtualisation and some other features and turn the aforementioned modules into built-ins.

All fixed and running now. Thanks guys, couldn't have done it without you! :P ... :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum