Trying to modify the cx231xx-cards.c file to add an idProduct for a Hauppage device sold under a different brand. I am running into issues when trying to get it to make and roll into my /lib/modules/package/osmc/package/drivers directories. I am running a Rbp 3 B+ and OSMC 4.14.34-6. I am a bit of a linux noob, but I try to do as much research as I can with the limited knowledge bases I know about.
this is what I am doing so far (all with sudo)
apt-get update apt-get install build-essential git git clone https://github.com/osmc/osmc #from my Home directory cd /osmc/package/kernel-osmc make rbp2
The make of the will work, and get all the sources and compile the *.ko files.
But when I do
make modules_install
I get an error
make: *** No rule to make target āmodules_installā. Stop.
Doing some research I find that I need to in the linux folder.
So I go to
/osmc/package/kernel-osmc/src/linux-4.14.34
and then run make modules_install again, it runs through this time without error.
From the linux-4.14.34 directory, if I run
make install
I get the error
Aborting due to one or more missing device tree overlays.
run-parts: /etc/kernel/postinst.d/process-vmlinuz-rbp exited with return code 1
arch/arm/boot/Makefile:96: recipe for target 'install' failed
make[1]: *** [install] Error 1
arch/arm/Makefile:340: recipe for target 'install' failed
make: *** [install] Error 2
I am at a loss. I have not even gotten to the point of modifying the .c file, but I need help. So many guides I have tried after doing a fresh install over and over again, and the are all out dated or just donāt work in this application. Any help would be appreciated.
Run make rbp2; wait for compile to finish.
When it does, cp your .c file, to .c.old, make changes and diff -u original new.c and create a patch which you can put under patches/rbp/999-fix-something.patch.
Thanks! It might be beneficial if I can get it working. It is for an Airtv ATSC/QAM tuner that has all the hardware that is the same as the Hauppauge WinTv-HDV-955Q, and in windows it comes up as a HDV-955Q. The Vid is the same of 2040, but the Pid is different as the Airtv is b124 and the 955Q is b123.
I have made a udev .rules file that adds in the new_id for the device, but I am having trouble getting it to register enough to work with TvHeadend. I have the LED lights on the device now lighting up. I will keep at it, and maybe some who read this will have more insight to getting it to work if possible. I think on of the main problems is that it is not grabbing the card=/n that I want it to.
I think I am coming to that conclusion. it is odd that hauppauge has their windows driver listing it as a 955Q, but I guess since it is a manufacture made driver they can make it say whatever they want.
There is zero information on linuxtv about this adapter, but I just did find a great utility on Hauppageās site, and this is the info straight from the device with their utility.
So I made my own osmc fork on github, and I have identified all of the files that i need to modify along with the code segments that need modification. It seems with the newer Hauppage cards that the way they are initialized made it so the new_id method was not going to work. Unless the eeprom is different (have not gotten that far yet), I think we should have a driver working for this $19.99 USD card!
I spoke too soon! on compiling with my patch, it seems that in cx231xx-cards.c there is a integer assignment for the number of cards supportedā¦ I think. I am much a Linux and C noob! const unsigned int cx231xx_bcount = ARRAY_SIZE(cx231xx_boards); around line 900 or so.
drivers/media/usb/cx231xx/cx231xx-cards.c:818:3: error: 'CX231XX_BOARD_AIRTV_955Q' undeclared here (not in a function)
[CX231XX_BOARD_AIRTV_955Q] = {
^~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/usb/cx231xx/cx231xx-cards.c:818:3: error: array index in initializer not of integer type
drivers/media/usb/cx231xx/cx231xx-cards.c:818:3: note: (near initialization for 'cx231xx_boards')
scripts/Makefile.build:328: recipe for target 'drivers/media/usb/cx231xx/cx231xx-cards.o' failed
make[5]: *** [drivers/media/usb/cx231xx/cx231xx-cards.o] Error 1
scripts/Makefile.build:587: recipe for target 'drivers/media/usb/cx231xx' failed
make[4]: *** [drivers/media/usb/cx231xx] Error 2
make[4]: *** Waiting for unfinished jobs....
That is the line where i Ctr+C on the orig 955Q definition and Ctr+V it in after and modified it for the airtv device.
I think i might have figured out a lot of my problems! it seems cx231xx-417.c had #define CX231xx FIRM_IMAGE_NAME set to "v4l-cx23885-enc.fw" instead of the required "v4l-cx231xx-avcore-01.fw" I am in the process of compiling the kernel after the last set of changes when I found the def. Fingers crossed.
Well I am successful on the Pi 3 running Raspbianā¦ it seems with osmc when I would place a .patch in the patched directory, and the terminal when running make rbp2 would show the patch executing fine along with the cx231xx-cards.c file showing the changesā¦but alas the cx231xx-cards.o file I found does not reflect the changes. There is a small section I found with human readable text, and it so happens to be the Pid and Vidsā¦and my changes were not reflected there. All this fighting for the fix on raspbian to be one of my first initial tries on osmcā¦
So how the heck do I build from my modified *.c files with OSMC not scrubbing them?
the log ended up being way too big, and the several times I ran make, and checked the log before it clipped, there was nothing that stood out.
Here are my patches: