Ga naar inhoud


Handleiding: VDR, CCcam en Xineliboutput


Niels Wagenaar

Aanbevolen berichten

Often I see people talk about how to apply a patch file. These files are sometimes called diff files after the program used to create them. To create one someone took two copies of a source tree and created the DIFFerecnes between them (sometimes they take smaller pieces and diff them). In reality they are the differences in two pieces of text that are used to compile the program(s). In other words its not like an update program you get.

 

When you go to the patch file there are some lines at the top that will indicate how much you need to adjust to apply the patch. Also keep in mind what revisions the patch is for, but surprisingly that isn't as important as you would think. From these you need two switches. These are -p and -F.

 

the switch -p indicates how much of the original lines you need to strip (how deep the file is). To give you an example lets say my mythtv source is in /usr/src/mythtv and I want to apply this patch:

 

Code:

 

Index: libs/libmythtv/eitscanner.cpp

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

--- libs/libmythtv/eitscanner.cpp.orig 2006-09-29 09:37:12.000000000 -0700

+++ libs/libmythtv/eitscanner.cpp 2006-09-29 16:09:15.000000000 -0700

 

 

This indicates the patch will change the file libs/libmythtv/eitscanner.cpp. It aslo tells me it was created from the file libs/libmythtv/eitscanner.cpp.orig.

 

To apply this patch copy the file to the /usr/src/mythv directroy and use -p0 (strip nothing)

 

As another example (the patch coincidently is nearly the same):

Code:

 

diff -ruN mythtv.14471.orig/libs/libmythtv/eitscanner.cpp mythtv.14471/libs/libm

ythtv/eitscanner.cpp

--- mythtv.14471.orig/libs/libmythtv/eitscanner.cpp 2007-09-09 19:02:56.0000

00000 -0500

+++ mythtv.14471/libs/libmythtv/eitscanner.cpp 2007-09-09 19:15:01.000000000 -0

500

 

 

In this I can see the file mythtv.14471/libs/libmythtv/eitscanner.cpp is being changed. On my box I do not have a mythtv.14471 directory so I need to strip this part off. I need to strip off the first part (mythtv.14471) and not the second. (-p1)

 

Next you need to know of the patch you have differs enough from what revision you have checked out. For the above sample you may be patching a file with changes that differ from lines because the file has changes in the repository (the file you have is different from that file). Each patch section looks like this:

 

Code:

 

@@ -216,7 +216,7 @@

}

 

void EITScanner::StartActiveScan(TVRec *_rec, uint max_seconds_per_source,

- bool _ignore_source)

+ bool _ignore_source, bool limit_transports)

{

rec = _rec;

ignore_source = _ignore_source;

 

 

Each of the chunks start and end with @@. This particular chunk is change 7 lines (some versions of diff omit this) in the original file at line 216. The + part repents where the the changed in the changed file. So you could look at the original at line 216 and see the part above that has no + on it. The rest of the lines are used to locate the position of the changes.

 

This particular change will change the line:

bool _ignore_source)

to:

bool _ignore_source, bool limit_transports)

 

The lines around it are the way the patch programs finds the lines. You can effect that detection with the -F switch. It means how many non matching lines can I ignore.

 

For most patches you find here you can simply apply them with a -p switch

e.g. patch -p0 < whatever.diff

 

For some others, depending on how far they are out of sync with the original you need to add -F

e.g. patch -p0 -F3 <whatever.diff

 

If the patch works you should see tings like:

patching file libs/libmythtv/mpeg/dvbstreamdata.cpp

Hunk #1 succeeded at 138 (offset -1 lines).

 

(this is from a different patch then above but the general idea is the it succeeded).

 

If you try to apply a patch to a file that has already been patched the patch program will detect this and give you an warning:

Reversed (or previously applied) patch detected! Assume -R? [n]

 

This means the patch program already found the lines and saw that it was patched. It is asking if you want to revert the patch (back it out). Answering y here would undo the patch. Answering n would do nothing.

 

If the file does not patch correctly you will end up with lines like this:

4 out of 4 hunks ignored -- saving rejects to file libs/libmythtv/mpeg/dvbstreamdata.cpp.rej

 

This means 4 chunks failed and its non patched parts went to the file libs/libmythtv/mpeg/dvbstreamdata.cpp.rej

 

If this happens you have two choices. Either look at the changes that failed and attempt to patch it by hand or wait until an updated patch comes out.

 

Two ways to patch:

 

Manually:

Edit the source file (usually ***.c), using vi or nano or similar text editor. Change each line by hand.

 

Automatically:

Create a file with the changes in the same directory as the source file to be patched and name it patch.diff. This file will have blank spaces on lines that will not be changed, - for lines to be deleted, and + for lines to be added.

Type the following command to perform a test:

Code:

 

patch -p1 -l < patch.diff --dry-run

 

 

If everything works, drop the "--dry-run" command flag to do it for real.

If not, try changing the -p1 option to -p0 or deleting it entirely. (This tells linux how many steps back in the directory tree to look for the file, and it depends on how your .diff file is formatted).

 

I found all this for myself on google in a few seconds, btw. Try "how patch diff linux"

 

ff wat gekopieerd en geplakt.

 

In t kort komt het er op neer dat je de verkeerde patch gebruikt.

Twee mogelijkheden een patch die geschikt is voor jouw driverversie of de "oude" driver versie opsporen.

 

Mythbuntu 12.04

Celeron 220 op Mini-ITX D201GLY2, 1 GB Ram,2x1,5 TB HDD, Digitenne op TerraTec Cinergy, CCcam

Link naar reactie
Delen op andere sites


  • Reacties 640
  • Aangemaakt
  • Laatste reactie

Beste reacties in dit onderwerp

Beste reacties in dit onderwerp

Geplaatste afbeeldingen

Origineel bericht van: Lamko
In t kort komt het er op neer dat je de verkeerde patch gebruikt.
Twee mogelijkheden een patch die geschikt is voor jouw driverversie of de "oude" driver versie opsporen.


Dit verhaal gaat mij boven de pet, wellicht dat er iemand is die mij hiermee kan helpen om de kaart aan de praat te krijgen?

Spiderman

DM800HD ~ OpenPLi

DM7000 ~ OpenPLi

DM500C ~ OpenPLi

WafeFrontier T55

13* - 19,2* - 23,5* - 28,2*

 

Link naar reactie
Delen op andere sites

Ik d8 zal wel moeilijk zijn om de oude driver versie weer te vinden maar hij staat er gewoon bij :

 

De commando regel hg clone moet je niet uitvoeren.

hg clone http://jusst.de/hg/multiproto

 

Maar je moet wget de oude driver versie pakken en dan

wget http://jusst.de/hg/multiproto/archive/fbcc9fa65f56.tar.bz2

Deze versie uitpakken

tar -xvjf fbcc9fa65f56.tar.bz2

 

# Note these are patches against multiproto changeset 9036

# (http://jusst.de/hg/multiproto/archive/fbcc9fa65f56.tar.bz2)

 

En dan de rest zo uitvoeren als je eerst ook gedaan hebt

 

Ik had dat verhaal er neergezet zodat je kon begrijpen hoe patchen werkt. Maar je moet nog even wat langer met linux werken wil je dat allemaal begrijpen.

 

Veel succes zo moet het je wel lukken wink

Mythbuntu 12.04

Celeron 220 op Mini-ITX D201GLY2, 1 GB Ram,2x1,5 TB HDD, Digitenne op TerraTec Cinergy, CCcam

Link naar reactie
Delen op andere sites

Origineel bericht van: Lamko
Ik d8 zal wel moeilijk zijn om de oude driver versie weer te vinden maar hij staat er gewoon bij :

De commando regel hg clone moet je niet uitvoeren.
hg clone http://jusst.de/hg/multiproto

Maar je moet wget de oude driver versie pakken en dan
wget http://jusst.de/hg/multiproto/archive/fbcc9fa65f56.tar.bz2
Deze versie uitpakken
tar -xvjf fbcc9fa65f56.tar.bz2

# Note these are patches against multiproto changeset 9036
# (http://jusst.de/hg/multiproto/archive/fbcc9fa65f56.tar.bz2)

En dan de rest zo uitvoeren als je eerst ook gedaan hebt

Ik had dat verhaal er neergezet zodat je kon begrijpen hoe patchen werkt. Maar je moet nog even wat langer met linux werken wil je dat allemaal begrijpen.

Veel succes zo moet het je wel lukken wink


@Lamko

Zoals het er nu uitgelegd staat begrijp ik het ook, ik zal het morgen eens gaan testen.

Dat ik meer met Linux moet werken om dit allemaal onder de knie te krijgen daar ben ik mij ook van bewust en zal er zeker ook meer aan doen.

Maar goed, door hier vragen te stellen en met jullie antwoorden aan de slag te gaan is ook weer leerzaam, op die manier maak ik steeds stapjes voorwaards wink

Spiderman

DM800HD ~ OpenPLi

DM7000 ~ OpenPLi

DM500C ~ OpenPLi

WafeFrontier T55

13* - 19,2* - 23,5* - 28,2*

 

Link naar reactie
Delen op andere sites

Dit heeft ook niet zo zeer met Linux te maken, maar meer vanwege door Multiproto. Multiproto is de uitbreiding van de originele video4linux (v4l) onderdeel binnen de Linux kernel.

 

Probleem alleen is, het is ondertussen al 2,5 jaar in ontwikkeling en is - naar mijn mening - nog steeds te veel WIP. De patches die op de linux-dvb mailinglist worden gepost, kunnen na verloop van tijd in één keer niet meer werken. Dit is mijn grootste probleem met Multiproto.

 

Gelukkig(?) voor ons zijn er ook andere die problemen ervaren met Multiproto. Deze personen zijn daarom een alternatief gestart (S2API) en de mensen achter v4l hebben aangekondigd om S2API op te nemen binnen de v4l source-tree.

 

De laatste paar dagen ben ik bezig geweest om de huidige (beta)code van S2API te doorlopen en VDR aan te passen hiervoor. Hier gaat voor mij enorm veel tijd in zitten en dit is ook de reden waarom ik niet veel online ben op sat4all smile

 

Mvg,

 

Niels Wagenaar

Woonkamer : Xubuntu 8.04 met VDR 1.7.4 en WinTV NOVA-HD-S2 icm Reel Extension HD.

Slaapkamer : Een MediaMVP icm de vompserver v0.30 VDR plugin.

Link naar reactie
Delen op andere sites

Origineel bericht van: Lamko
Ik d8 zal wel moeilijk zijn om de oude driver versie weer te vinden maar hij staat er gewoon bij :

De commando regel hg clone moet je niet uitvoeren.
hg clone http://jusst.de/hg/multiproto

Maar je moet wget de oude driver versie pakken en dan
wget http://jusst.de/hg/multiproto/archive/fbcc9fa65f56.tar.bz2
Deze versie uitpakken
tar -xvjf fbcc9fa65f56.tar.bz2

# Note these are patches against multiproto changeset 9036
# (http://jusst.de/hg/multiproto/archive/fbcc9fa65f56.tar.bz2)

En dan de rest zo uitvoeren als je eerst ook gedaan hebt

Ik had dat verhaal er neergezet zodat je kon begrijpen hoe patchen werkt. Maar je moet nog even wat langer met linux werken wil je dat allemaal begrijpen.

Veel succes zo moet het je wel lukken wink


Ik krijg het niet voor elkaar, zou mij iemand hiermee willen helpen?

DM800HD ~ OpenPLi

DM7000 ~ OpenPLi

DM500C ~ OpenPLi

WafeFrontier T55

13* - 19,2* - 23,5* - 28,2*

 

Link naar reactie
Delen op andere sites

Hallo,

 

Ik volg dit draadje met zeer veel interesse en ben ook van plan om een htpc te bouwen.

Ik zie in de wiki Niels dat je een blu-ray dvd gebruikt. Is het ook mogelijk om blu-ray disks met dit systeem te bekijken?

 

Patje.

Dreambox DM500HD met 1 TB externe hardeschijf en een DM600 met 120GB harde schijf op een wavefrontier met astra 1,2 en 3.

Link naar reactie
Delen op andere sites

Bij het compileren (make) van vdr krijg ik de volgende errors, iemand een idee hoe dit op te lossen:

 

Code:
root@vdr-productie:/usr/local/src/vdr-1.7.0# makeg++ -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses -c -DREMOTE_KBD -DLIRC_DEVICE=\"/dev/lircd\" -DRCU_DEVICE=\"/dev/ttyS1\" -D_GNU_SOURCE -DVIDEODIR=\"/media/video\" -DCONFDIR=\"/etc/vdr\" -DPLUGINDIR=\"/usr/lib/vdr/plugins\" -DLOCDIR=\"/usr/share/locale\" -I/usr/include/freetype2 -I/usr/local/src/3650/multiproto/linux/include dvbdevice.cdvbdevice.c: In member function âbool cDvbTuner::SetFrontend()â:dvbdevice.c:254: error: cannot convert âfe_spectral_inversion_tâ to âdvbfe_inversionâ in assignmentdvbdevice.c:273: error: cannot convert âfe_spectral_inversion_tâ to âdvbfe_inversionâ in assignmentdvbdevice.c:284: error: cannot convert âfe_spectral_inversion_tâ to âdvbfe_inversionâ in assignmentmake: *** [dvbdevice.o] Error 1

 

Spiderman

DM800HD ~ OpenPLi

DM7000 ~ OpenPLi

DM500C ~ OpenPLi

WafeFrontier T55

13* - 19,2* - 23,5* - 28,2*

 

Link naar reactie
Delen op andere sites

Wat heeft Niels met je gedaan ?

Want het lijkt er op dat jouw vdr versie jouw dvb module niet leuk vindt of je hebt de dvb dir verkeerd opgegeven hier

-I/usr/local/src/3650/multiproto/linux/include dvbdevice.c

dvbdevice.c: In member function âbool cDvbTuner::SetFrontend()â:

 

Mythbuntu 12.04

Celeron 220 op Mini-ITX D201GLY2, 1 GB Ram,2x1,5 TB HDD, Digitenne op TerraTec Cinergy, CCcam

Link naar reactie
Delen op andere sites

Origineel bericht van: Lamko
Wat heeft Niels met je gedaan ?
Want het lijkt er op dat jouw vdr versie jouw dvb module niet leuk vindt of je hebt de dvb dir verkeerd opgegeven hier
-I/usr/local/src/3650/multiproto/linux/include dvbdevice.c
dvbdevice.c: In member function âbool cDvbTuner::SetFrontend()â:


Zie PM!!

DM800HD ~ OpenPLi

DM7000 ~ OpenPLi

DM500C ~ OpenPLi

WafeFrontier T55

13* - 19,2* - 23,5* - 28,2*

 

Link naar reactie
Delen op andere sites

Vdr multipro en jouw kaart:

http://www.linuxtv.org/pipermail/linux-dvb/2008-March/025050.html

 

Hier worden veel oudere versies gebruikt van multipro en vdr,

die combinatie werkt. Ik weet niet hoe het zit met nieuwere versies en ook kan ik niet veel succesverhalen vinden op het internet.

 

D'r moet waarschijnlijk nog wat in de vdrcode aangepast worden maar ik ben geen coder dus hier houdt het voor mij op.

Mythbuntu 12.04

Celeron 220 op Mini-ITX D201GLY2, 1 GB Ram,2x1,5 TB HDD, Digitenne op TerraTec Cinergy, CCcam

Link naar reactie
Delen op andere sites

Origineel bericht van: satire

Hans(ch) hoe is jouw beeld? als het allemaal goed is heb je dan wat driverinfo?


Ik heb nog geen beeld, want de hardware is nog niet geleverd. De processor was slecht leverbaar, deze is omgewisseld met een die iets langzamer geklokt is. Dit duurde wat extra dagen om geassembleerd te krijgen. Als het goed is wordt hij vandaag opgestuurd en heb ik de spullen morgen.

Voor de drivers staat het nodige op linuxtv.org. Vooral de opmerking over een aparte multiproto driver repository op deze pagina is interessant:
http://www.linuxtv.org/wiki/index.php/Hauppauge_WinTV-HVR-4000

Deze repository zou ook een werkende driver op moeten leveren voor de Hauppage Nova HD S2. Koppeling met VDR voor multiproto zou moeten kunnen via de handleiding van Niels.

Hans

MythBuntu 12.04 LTS (MythTV 0.26) Kernel 3.5.0-19-generic

Hauppage NovaS2 HD DVB-S/S2 TeVii S470 DVB-S2

Asus NVidia 9600 GT

Samsung LE40A552 LCD TV

Link naar reactie
Delen op andere sites

Maak een account aan of log in om te reageren

Je moet een lid zijn om een reactie te kunnen achterlaten

Account aanmaken

Registreer voor een nieuwe account in onze community. Het is erg gemakkelijk!

Registreer een nieuwe account

Inloggen

Heb je reeds een account? Log hier in.

Nu inloggen
  • Wie is er online   0 leden

    • Er zijn geen geregistreerde gebruikers deze pagina aan het bekijken
×
×
  • Nieuwe aanmaken...