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

kernel config: Enable MEDIA_CONTROLLER #31881

Merged
merged 1 commit into from Nov 21, 2017

Conversation

jraygauthier
Copy link
Member

@jraygauthier jraygauthier commented Nov 20, 2017

With this disabled, cameras would not get a /dev/mediaX entry matching
the /dev/videoX which broke any application (e.g: uvcdynctrl -l,
media-ctl -p) depending on this interface.

Should also be applied to 17.09.

Motivation for this change

Broken utilities which work seamlessly on Ubuntu 16.04 but are unusable on Nixos (because of the missing config). Unable to properly setup a camera from "The Imaging Source".

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.

Tested configure seamlessly with all supported kernels:

  linuxPackages_beagleboard.kernel
  linuxPackages_hardened_copperhead.kernel
  linuxPackages_mptcp.kernel
  linuxPackages_rpi.kernel
  linuxPackages_4_4.kernel
  linuxPackages_4_9.kernel
  linuxPackages_4_13.kernel
  linuxPackages_4_14.kernel

Tested complete build with linuxPackages_4_9.kernel, booted with it and now successfully used uvcdynctrl -l, media-ctl -p and broken gstreamer pipelines with my camera. /dev/media0 now show up when I plug my usb camera.

With this disabled, cameras would not get a `/dev/mediaX` entry matching
the `/dev/videoX` which broke any application (e.g: `uvcdynctrl -l`,
`media-ctl -p`) depending on this interface.
@grahamc
Copy link
Member

grahamc commented Nov 21, 2017

@GrahamcOfBorg build linuxPackages_rpi.kernel
linuxPackages_4_4.kernel
linuxPackages_4_9.kernel
linuxPackages_4_13.kernel
linuxPackages_4_14.kernel

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

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

Failure for system: x86_64-darwin

error: assertion failed at /tmp/nix-ofborg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/31881/pkgs/os-specific/linux/kernel/generic.nix:32:1
(use ‘--show-trace’ to show detailed location information)

@NeQuissimus
Copy link
Member

@grahamc Why is it trying to build on darwin? oO

@grahamc
Copy link
Member

grahamc commented Nov 21, 2017

The build fanout is too stupid to not :)

@dezgeg
Copy link
Contributor

dezgeg commented Nov 21, 2017

FWIW, building linuxPackages_rpi probably doesn't go well on x86.

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

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

Failure for system: x86_64-linux

  ^~~~~
cc1: some warnings being treated as errors
make[4]: *** [/tmp/nix-build-linux-4.9.59-1.20171029.drv-0/source/scripts/Makefile.build:300: drivers/video/fbdev/rpisense-fb.o] Error 1
make[3]: *** [/tmp/nix-build-linux-4.9.59-1.20171029.drv-0/source/scripts/Makefile.build:544: drivers/video/fbdev] Error 2
make[2]: *** [/tmp/nix-build-linux-4.9.59-1.20171029.drv-0/source/scripts/Makefile.build:544: drivers/video] Error 2
make[1]: *** [/tmp/nix-build-linux-4.9.59-1.20171029.drv-0/source/Makefile:991: drivers] Error 2
make[1]: Leaving directory '/tmp/nix-build-linux-4.9.59-1.20171029.drv-0/build'
make: *** [Makefile:150: sub-make] Error 2
builder for ‘/nix/store/4xi8b21q16nbajc9x1jxd8278bp2ibn1-linux-4.9.59-1.20171029.drv’ failed with exit code 2
error: build of ‘/nix/store/4xi8b21q16nbajc9x1jxd8278bp2ibn1-linux-4.9.59-1.20171029.drv’ failed

@dezgeg dezgeg merged commit 7cdd12e into NixOS:master Nov 21, 2017
@jraygauthier
Copy link
Member Author

Thanks @dezgeg. Is it possible to backport as well to 17.09?

@dezgeg
Copy link
Contributor

dezgeg commented Nov 21, 2017

Sure. bcbd14e

@jraygauthier
Copy link
Member Author

Nice, thank you.

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

5 participants