dvb_ringbuffer.h and dvb_ringbuffer.c conflict

  • I have a working gp8psk driver (it's part of dvb-usb) compiled in 2.6.18-7.3 environment.
    and it works fine with DM500HD (and similar) receivers.


    I tried to recompile gp8psk driver for a newer kernel version used in DMM images - 2.6.18-7.4.
    And I can not. Compilation aborts on ringbufer functions use.


    Looks like DMM changed dvb_ringbuffer.h and dvb_ringbuffer.c files in this latest kernel version.
    But they provided ONLY header file (dvb_ringbuffer.h).
    New dvb_ringbuffer.h file has different prototypes for the same function used in older dvb_ringbuffer.h.
    As a result, dvb-core.o can not be compiled.
    surely, I can not recompile my gp8psk driver (it depends on dvb-core).


    Is dvb_ringbuffer.c going to be published?
    and possibly all other changes in the code required to compile dvb-core.
    Right now my compilation stops with this error:
    dmxdev.c:101: error: too many arguments to function 'dvb_ringbuffer_read'
    I don't know what else is wrong with the source after that.


    PS: I tried to compile my driver against older dvb-core folder (which I copied from 2.6.18-7.3).
    I was able to compile the driver, and even mount it. But as soon as I started usbtuner, kernel crashed.

    • Offizieller Beitrag

    Hi,


    since 2.6.18-7.4 we use a backport of a more current linux tv api version with S2API tuner support.


    You can found all sources in the OE.


    Look at bitbake_folder/dm500hd/build/tmp/work/dm500hd-oe-linux/v4l-dvb-modules-0.0+hg20100904-r1/v4l-dvb/linux/drivers/media/dvb/dvb-core.


    For compatibility reasons we even have patched the headers in the kernel tree .. in linux-2.6.18/patches you can find some patches for v4l support in 2.6.18.


    I think you make anything wrong.... here all looks ok.


    cu

  • hmm, interesting.
    Thanks for clarification.
    I do see that bitbake_folder/dm500hd/build/tmp/work/dm500hd-oe-linux/v4l-dvb-modules-0.0+hgXXXXXXXXX-r1/v4l-dvb/linux/drivers/media/dvb/dvb-core contains patched dvb_ringbuffer.h and dvb_ringbuffer.h files.


    Th fact that in bitbake_folder/dm500hd/build/tmp/work/dm500hd-oe-linux/linux-dm500hd-2.6.18-r7.1/linux-2.6.18/drivers/media/dvb/dvb-core I see already patched dvb_ringbuffer.h, but dvb_ringbuffer.c is still unpatched through me off my feet.
    Somehow, the source code is partially patched in that folder (it's already not the same as in standard 2.6.18 tree).


    I thought that source files will be patched in that folder (which I used) before the compilation.

  • simple copying of the content of
    bitbake_folder/dm500hd/build/tmp/work/dm500hd-oe-linux/v4l-dvb-modules-0.0+hg20100904-r1/v4l-dvb/linux/drivers/media/dvb/dvb-core
    into
    bitbake_folder/dm500hd/build/tmp/work/dm500hd-oe-linux/linux-dm500hd-2.6.18-r7.1/linux-2.6.18/drivers/media/dvb/dvb-core
    did not help.


    Kconfig are way different and "make menuconfig" does not allow to select a driver anymore.
    Had to fiddle with Kconfig files, hoping to do a "brute force" compiling.


    And now I'm stuck with new functions not defined in standard 2.6.18 yet.
    Like memdup_user() function call (used in dvb-core/dvb_demux.c)
    This function was defined in later kernel versions (and declared in linux/string.h header).


    Looks like string.h was back ported as well. But I can not find it (the one which is in bitbake_folder/dm500hd/build/tmp/work/dm500hd-oe-linux/linux-dm500hd-2.6.18-r7.1/linux-2.6.18/include/linux folder is old).


    Do you have any tips on how to compile a modified dvb driver in YOUR environment?


    added:
    it would be probably more straightforward if I asked the simple question first.
    I used to compile my dvb-usb-gp8psk.ko driver using dvb tree in (in older version, 2.6.18-7.3)
    bitbake_folder/build-dm800/tmp/work/linux-dm500hd-2.6.18-r5/linux-2.6.18/drivers/media/dvb/


    Now I made some backporting into dvb-usb-gp8pskto accommodate new s2api calls (and frontend.h definitions).
    How do I compile it using your new v4l tree?
    I tried to copy it into bitbake_folder/dm500hd/build/tmp/work/dm500hd-oe-linux/linux-dm500hd-2.6.18-r7.1/linux-2.6.18/drivers/
    Obviously, it did not work.
    What's the correct way to do that?

    2 Mal editiert, zuletzt von genpix ()

    • Offizieller Beitrag

    As already pointed out by Ghost, we don't use the in-kernel DVB stack of 2.6.18.


    To get a list of BitBake recipes used to build external kernel modules, run

    Code
    git grep "inherit module"


    If don't have a Makefile yet, you should create one first. There are numerous examples on the net. Start building it for your PC, before trying to cross compile it.


    If you create a proper .bb file for your module, you won't have to care about OpenEmbedded internals or about how our DVB stack gets built.