[pvrusb2] New driver snapshot: pvrusb2-mci-20100424

Mike Isely isely at isely.net
Sat Apr 24 20:33:57 CDT 2010


On Sat, 24 Apr 2010, JE Geiger wrote:

> Got it.  Makes sense with kmalloc define being missing.
> 
> I did a diff between the April 24 stuff you just published and the
> in-tree pvrusb2 stuff and there were quite a few additions.  Will
> these changes migrate over to the kernel tree after a time?  I guess I
> am not clear on the process, but it looks like there is some editing
> between what is stand alone and what is in-tree.  Off to add the
> include.

The drivers won't be completely identical.  The standalone pvrusb2 
driver has A LOT of additional stuff compared to what the in-kernel 
driver has.  Realize that the in-kernel driver targets just *that* 
version of the kernel while the standalone driver has to work across a 
wide spectrum of kernel versions.  In theory it should still work all 
the way back to 2.6.12.3 (the earliest version I still test-compile 
against).  The standalone driver might also have some additional minor 
features (that I use for debugging) that don't get into the in-kernel 
version.

I have a Perl program that can process the standalone driver source code 
into a form suitable for merging into the v4l-dvb Mercurial repository 
(it's the svn_helper.pl program in the utils subdirectory of the 
standalone driver snaphot).  Basically the program has a list of #define 
macros that get set certain ways - then it just processes all the source 
lines as if those macros were set (or clear), resulting in the stripped 
down code.  The program might also rename a few files along the way.

When the Mercurial repository is merged into the mainline kernel, some 
additional processing is also done on the entire repository - this is 
because the Mercurial repository is also intended to compile against a 
range of kernel while what goes to the main git tree need only 
correspond to the state of the tree at that point in time.

The v4l-dvb developers are moving away from Mercurial however.  There 
are already parallel Mercurial and git trees being maintained.  Since 
the git tree is just simply a clone of the regular kernel tree now with 
additional pending v4l-dvb changes, it's unclear to me how compilable 
that tree is against older kernels.  Anyway, officially the changes are 
still moved between the trees as needed.  Right now I still rely on the 
Mercurial side, but the fact that this 2.6.34-rc5 required pvrusb2 
change isn't in the Mercurial side of the house is a problem.  I 
resynced against Mercurial earlier today before making these changes; 
had that change been there then I would have seen it and migrated it 
back into the standalone driver - and this issue right now would never 
have happened.  This is something I have to deal with.

 -Mike


> 
> On Sat, Apr 24, 2010 at 9:14 PM, Mike Isely <isely at isely.net> wrote:
> >
> > OK, turns out it's only a single line change needed:
> >
> > isely at ivanova:~/work2/pvrusb2/w1/pvrusb2/driver$ svn diff
> > Index: pvrusb2-v4l2.c
> > ===================================================================
> > --- pvrusb2-v4l2.c      (revision 2452)
> > +++ pvrusb2-v4l2.c      (working copy)
> > @@ -22,6 +22,7 @@
> >
> >  #include "pvrusb2-options.h"
> >  #include <linux/kernel.h>
> > +#include <linux/slab.h>
> >  #include <linux/version.h>
> >  #include "pvrusb2-context.h"
> >  #include "pvrusb2-hdw.h"
> >
> >
> > In other words, insert an include of linux/slab.h right after
> > linux/kernel.h in pvrusb2-v4l2.c and you should get a clean build.
> >
> > What fun.
> >
> >  -Mike
> >
> >
> > On Sat, 24 Apr 2010, Mike Isely wrote:
> >
> >>
> >> It looks like indeed there are missing header includes that are needed
> >> for 2.6.34.  The changes are already in the in-kernel pvrusb2 driver but
> >> it seems that the v4l-dvb team is being slow in propagating these back
> >> into the Mercurial repository, which is why I haven't seen them yet.
> >> Rather than additional back and forth steps here, how about anyone who
> >> is interested just jump into #pvrusb2 on IRC and we'll sort this out?
> >>
> >> The fact that the Mercurial v4l-dvb repository, due to this, probably
> >> doesn't compile either for 2.6.34-rc5 - and since I'm guessing that
> >> these changes have probably been in there for a little while now - makes
> >> me worry about how well that repo is being kept up, which may force me
> >> over to git sooner rather than later :-(
> >>
> >> In any case once it's straightened out there will have to be another
> >> standalone driver release to maintain compatibility with 2.6.34.
> >>
> >>   -Mike
> >>
> >>
> >> On Sat, 24 Apr 2010, JE Geiger wrote:
> >>
> >> > Just did a clean reinstall of rc5 from the bz2 image from kernel.org.
> >> >
> >> > Did a complete compile.  I can post the .config if need be, but it
> >> > worked earlier when I was using the in-tree pvrusb2 (and it is the
> >> > same as before, just copied over .config and did a "make oldconfig" on
> >> > the clean rc5 tree).
> >> >
> >> > Then changed to the snapshot driver directory:
> >> >
> >> > same problem with compile:
> >> >
> >> > /home/geiger/Desktop/p/pvrusb2-mci-20100424/driver/pvrusb2-v4l2.c: In
> >> > function ‘pvr2_v4l2_destroy_no_lock’:
> >> > /home/geiger/Desktop/p/pvrusb2-mci-20100424/driver/pvrusb2-v4l2.c:1150:
> >> > error: implicit declaration of function ‘kfree’
> >> > /home/geiger/Desktop/p/pvrusb2-mci-20100424/driver/pvrusb2-v4l2.c: In
> >> > function ‘pvr2_v4l2_open’:
> >> > /home/geiger/Desktop/p/pvrusb2-mci-20100424/driver/pvrusb2-v4l2.c:1274:
> >> > error: implicit declaration of function ‘kzalloc’
> >> > /home/geiger/Desktop/p/pvrusb2-mci-20100424/driver/pvrusb2-v4l2.c:1274:
> >> > warning: assignment makes pointer from integer without a cast
> >> > /home/geiger/Desktop/p/pvrusb2-mci-20100424/driver/pvrusb2-v4l2.c:1314:
> >> > warning: assignment makes pointer from integer without a cast
> >> > /home/geiger/Desktop/p/pvrusb2-mci-20100424/driver/pvrusb2-v4l2.c: In
> >> > function ‘pvr2_v4l2_read’:
> >> > /home/geiger/Desktop/p/pvrusb2-mci-20100424/driver/pvrusb2-v4l2.c:1403:
> >> > error: implicit declaration of function ‘kmalloc’
> >> > /home/geiger/Desktop/p/pvrusb2-mci-20100424/driver/pvrusb2-v4l2.c:1403:
> >> > warning: assignment makes pointer from integer without a cast
> >> > /home/geiger/Desktop/p/pvrusb2-mci-20100424/driver/pvrusb2-v4l2.c: In
> >> > function ‘pvr2_v4l2_create’:
> >> > /home/geiger/Desktop/p/pvrusb2-mci-20100424/driver/pvrusb2-v4l2.c:1610:
> >> > warning: assignment makes pointer from integer without a cast
> >> > /home/geiger/Desktop/p/pvrusb2-mci-20100424/driver/pvrusb2-v4l2.c:1618:
> >> > warning: assignment makes pointer from integer without a cast
> >> > /home/geiger/Desktop/p/pvrusb2-mci-20100424/driver/pvrusb2-v4l2.c:1623:
> >> > warning: assignment makes pointer from integer without a cast
> >> > make[2]: *** [/home/geiger/Desktop/p/pvrusb2-mci-20100424/driver/pvrusb2-v4l2.o]
> >> > Error 1
> >> > make[1]: *** [_module_/home/geiger/Desktop/p/pvrusb2-mci-20100424/driver]
> >> > Error 2
> >> > make[1]: Leaving directory `/usr/src/kernels/linux-2.6.34-rc5'
> >> > _______________________________________________
> >> > pvrusb2 mailing list
> >> > pvrusb2 at isely.net
> >> > http://www.isely.net/cgi-bin/mailman/listinfo/pvrusb2
> >> >
> >>
> >>
> >
> > --
> >
> > Mike Isely
> > isely @ isely (dot) net
> > PGP: 03 54 43 4D 75 E5 CC 92 71 16 01 E2 B5 F5 C1 E8
> > _______________________________________________
> > pvrusb2 mailing list
> > pvrusb2 at isely.net
> > http://www.isely.net/cgi-bin/mailman/listinfo/pvrusb2
> >
> >
> _______________________________________________
> pvrusb2 mailing list
> pvrusb2 at isely.net
> http://www.isely.net/cgi-bin/mailman/listinfo/pvrusb2
> 

-- 

Mike Isely
isely @ isely (dot) net
PGP: 03 54 43 4D 75 E5 CC 92 71 16 01 E2 B5 F5 C1 E8


More information about the pvrusb2 mailing list