Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tbs: updated to kernel-4.14 #39389

Merged
merged 4 commits into from May 4, 2018
Merged

tbs: updated to kernel-4.14 #39389

merged 4 commits into from May 4, 2018

Conversation

ck3d
Copy link
Contributor

@ck3d ck3d commented Apr 23, 2018

  • updated meta data
  • fix concurrent names for fetchFromGitHub derivations
Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

* updated meta data
* fix concurrent names for fetchFromGitHub derivations
@cillianderoiste
Copy link
Member

Hi @ck3d, your changes in #32049 were undone in 6a4cc35. Could you please do another PR, or change this one? Thanks!

@ck3d
Copy link
Contributor Author

ck3d commented Apr 29, 2018

Thanks, I updated this PR.

@cillianderoiste
Copy link
Member

Thanks @ck3d, I tested this with a TBS6981 (with the cx23885 chip) but no /dev/dvb devices are created. I tried configuring the firmware too, but I don't see any mention of it getting loaded in dmesg. Any idea what's going on?

@ck3d
Copy link
Contributor Author

ck3d commented May 1, 2018

I updated the PR and added a missing entry in all-packages.nix. It got lost after the last update.

Sorry, but I can not test the packages any more. My DVB card seems to be broken. My system do not recognize the card any more.

hardeningDisable = [ "pic" "format" ];

nativeBuildInputs = [ patchutils kmod perl perlPackages.ProcProcessTable ]
++ lib.optional (lib.versionAtLeast kernel.version "4.14") [ libelf ];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use ++ kernel.moduleBuildDependencies instead of this conditional.

buildFlags = [ "VER=${kernel.modDirVersion}" ];
installFlags = [ "DESTDIR=$(out)" ];

hardeningDisable = [ "pic" "format" ];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think hardeningDisable = [ "all" ]; is the safest thing to do with kernel modules.

@cillianderoiste
Copy link
Member

@ck3d I found that there's a conflict between the kernel module for dvb-core (dvb-core.ko.cz) and the one contained in this package (dvb-core.ko). The kernel version gets loaded, which is missing the dvb_create_media_graph symbol. I'm testing if xz compressing dvb-core.ko will be enough to fix this.

@cillianderoiste
Copy link
Member

It's working for me (/dev/dvb is created) after adding:

  postInstall = ''
    xz $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/media/dvb-core/dvb-core.ko
    xz $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/media/v4l2-core/videodev.ko
  '';

I'll do some more testing and tidy up some other changes I've made. I must also see if there's a nicer way to add the firmware. Currently I've copied it to /lib/firmware and used the following in my config:

 hardware.firmware = [ 
    (pkgs.stdenv.mkDerivation {
     name = "firmwares";
     src = /lib/firmware;
     phases = [ "installPhase" ];
     installPhase = ''
     mkdir -p $out/lib/firmware
     cp -r $src/* $out/lib/firmware/
     '';
     })
 ];

Otherwise the kernel versions of dvb-core.ko and videodev.ko get
loaded instead of the versions from this package.
@cillianderoiste cillianderoiste merged commit 5c6eb93 into NixOS:master May 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants