Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Custom Kernel and Drivers + Virtualization
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
rabcor
Apprentice
Apprentice


Joined: 05 Apr 2012
Posts: 200

PostPosted: Mon May 26, 2014 11:55 am    Post subject: [Solved] Custom Kernel and Drivers + Virtualization Reply with quote

Long story short, I've been playing around with the concept of VGA-Passthrough.

I have a very specific setup in mind, but I need to be able to use and update a highly customized kernel (Gentoos strongest point right?) this involves both custom configurations and a patch (ACS Override)

I will also need to patch the Nvidia proprietary drivers which I have absolutely no idea how to do so.

This is specifically what I'm trying to do with the above.

How do I apply these patches in gentoo? Is there any way to automate the process so I don't have to worry about it when I update the kernel/drivers?
_________________
This picture was my biggest reason for ever trying Gentoo <3


Last edited by rabcor on Fri May 30, 2014 4:37 pm; edited 3 times in total
Back to top
View user's profile Send private message
rabcor
Apprentice
Apprentice


Joined: 05 Apr 2012
Posts: 200

PostPosted: Fri May 30, 2014 10:55 am    Post subject: Reply with quote

Come on guys, nobody? I really need to get this done :(

I've never really done patching before, not by hand anyhow
_________________
This picture was my biggest reason for ever trying Gentoo <3
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 1791
Location: Berlin, Germany

PostPosted: Fri May 30, 2014 11:11 am    Post subject: Reply with quote

It's called "Applying non-standard patches" and is documented in the handbook: http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=3&chap=6#doc_chap6

Basically, you copy your patch to an aptly named subdirectory of /etc/portage/patches and it will be applied automatically. A few packages don't support it though.
Back to top
View user's profile Send private message
rabcor
Apprentice
Apprentice


Joined: 05 Apr 2012
Posts: 200

PostPosted: Fri May 30, 2014 11:32 am    Post subject: Reply with quote

Thanks! That's super easy. The Nvidia driver patch just simply worked. But the ACS override patch fails when I try to emerge gentoo-sources. Could someone help me find out exactly where it fails?

I copied it from the page starting at

Quote:

----
Documentation/kernel-parameters.txt | 10 +++
...


This is the output
Code:

***** ACS_Override.patch *****
PWD: /var/tmp/portage/sys-kernel/gentoo-sources-3.14.4/work/linux-3.14.4-gentoo

==============================

PATCH COMMAND:  patch -p0 -g0 -E --no-backup-if-mismatch  < '/etc/portage/patches/sys-kernel/gentoo-sources/ACS_Override.patch'

==============================
can't find file to patch at input line 9
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|---
| Documentation/kernel-parameters.txt |   10 +++
| drivers/pci/quirks.c                |  102 +++++++++++++++++++++++++++++++++++
| 2 files changed, 112 insertions(+)
|diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
|index 47bb23c..a60e6ad 100644
|--- a/Documentation/kernel-parameters.txt
|+++ b/Documentation/kernel-parameters.txt
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 30
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
|index 0369fb6..c7609f6 100644
|--- a/drivers/pci/quirks.c
|+++ b/drivers/pci/quirks.c
--------------------------
No file to patch.  Skipping patch.
patch unexpectedly ends in middle of line
1 out of 1 hunk ignored

patch program exited with status 1


I have no idea what to do here

It fails at these lines: (but thats the only thing I really know, I don't know how to fix this)
Code:

9: @@ -2349,6 +2349,16 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
30: @@ -3292,11 +3292,113 @@ struct pci_dev *pci_get_dma_source(struct pci_dev *dev)

_________________
This picture was my biggest reason for ever trying Gentoo <3
Back to top
View user's profile Send private message
rabcor
Apprentice
Apprentice


Joined: 05 Apr 2012
Posts: 200

PostPosted: Fri May 30, 2014 4:38 pm    Post subject: Reply with quote

Solved it, anyone interested can find my updated ACS Override patch here.

My first time making a patch with diff, but it seems to have worked :wink: all I have to do now is test it, and for this I need to recompile a bit.
_________________
This picture was my biggest reason for ever trying Gentoo <3
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