tbsdtv / media_build

GNU General Public License v2.0
32 stars 30 forks source link

Simplify Installation Process #53

Closed Bonifatius94 closed 2 months ago

Bonifatius94 commented 2 years ago

Hi everyone,

wouldn't it be nice to deploy your software via some package managers like apt? I'm not an apt packaging expert, but having to compile the source code is really inconvenient.

And another thing. Ubuntu seems to kick your kernel module out every 3 months after their big kernel update. Could you please provide information on how to permanently install your software? I don't want to repair my TV driver several times a year, it's really inconvenient.

Best wishes Marco

Bonifatius94 commented 2 years ago

I've created some scripts. Please have a look at https://github.com/Bonifatius94/tbs_driver_setup

Saentist commented 2 years ago

I've created some scripts. Please have a look at https://github.com/Bonifatius94/tbs_driver_setup

DKMS option is needed.

Bonifatius94 commented 2 years ago

Hey @Saentist 😄

Sorry, I'm not so familiar with kernel module development. Could you please explain to me what you mean by your dkms suggestion? (I've had a quick read telling me that it's about re-installing kernel modules after OS updates, right?) 😉

My scripts were hacked together pretty badly on a single afternoon, so there's no rocket science to be expected 😂

Best wishes, Marco

Hoeze commented 2 years ago

@Bonifatius94 We would need a DKMS package of this like you can see here: https://aur.archlinux.org/cgit/aur.git/tree/?h=tbs-linux_media-git-dkms Basically, whenever the kernel is being updated, DKMS re-compiles the tbsdvb modules against that version. Advantages:


Fun fact: The pain of reinstalling this driver over and over again with each update made me switch to a Sat-IP server (Digibit R1). Now that this one has a defect, I need to switch to my old TBS card until I get a replacement device. Yay, going through all the pain once again... :vomiting_face:

Bonifatius94 commented 2 years ago

We would need a DKMS package of this like you can see here:

@Hoeze Thanks for your reply :smile: Do you know how to set up such a DKMS packaging? This kernel stuff is really out of my scope :sweat_smile: I'm quite good with Bash scripting and setting up CI/CD pipelines, though and wanna contribute to this to learn about it :wink:

Hoeze commented 2 years ago

Unfortunately no, but I think the PKGBUILD file in the linked repo will be a great starting point :) I'm trying the same for my server...

Bonifatius94 commented 2 years ago

@Hoeze Wanna collaborate on Discord?

Hoeze commented 2 years ago

@Bonifatius94 I finally had time to look into it and found a repo that we can build on. I changed some details to it and here is my current progress: https://github.com/Hoeze/TBS_DTV_DKMS

This should do what we want, but unfortunately it fails with this:

make[3]: /bin/sh: Argument list too long
make[3]: *** [scripts/Makefile.build:467: /var/lib/dkms/TBS_DTV_DKMS/github.com_tbsdtv/build/media_build/v4l/modules.order] Error 127
make[2]: *** [Makefile:1881: /var/lib/dkms/TBS_DTV_DKMS/github.com_tbsdtv/build/media_build/v4l] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-5.15.0-47-generic'
make[1]: *** [Makefile:53: default] Error 2
make[1]: Leaving directory '/var/lib/dkms/TBS_DTV_DKMS/github.com_tbsdtv/build/media_build/v4l'
make: *** [Makefile:26: all] Error 2

The reason is that DKMS copies the source files to /var/lib/dkms/TBS_DTV_DKMS/github.com_tbsdtv/build. Using this prefix causes very long file paths and makes the build process fail. If you call cd /usr/src/TBS_DTV_DKMS/ && sh make.sh, the build process succeeds.

Now I am a bit clueless how to solve that issue. If you like, you can have a try and see how to solve this path-too-long issue.

Bonifatius94 commented 2 years ago

@Hoeze Damn, nice work man :smile: I'm going to look into it and see if there's a fix :joy: (what a silly bug ...)

Bonifatius94 commented 2 years ago

Could it be that some bash command is 130k characters? WTF??? https://stackoverflow.com/questions/11475221/why-do-i-get-bin-sh-argument-list-too-long-when-passing-quoted-arguments

Bonifatius94 commented 2 years ago

Idk man, something has gone very wrong here ... :joy: :joy: :joy: :joy: :joy:

Bonifatius94 commented 2 years ago

Yes indeed, the line stated in the error message seems to pass down all args the script is called with which can be a lot: https://github.com/tbsdtv/media_build/blob/9a225f4da01944fd34e1f9cf113da0d0d6f40820/v4l/Makefile#L467

The question is: Why is it producing so many args and why does this 4 characters less root folder name work? :thinking:

Hoeze commented 2 years ago

Seems to be same like here: https://github.com/tbsdtv/media_build/issues/46

@crazycat69 any idea?