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

linux: CONFIG_HIDRAW=y #86598

Merged
merged 1 commit into from May 3, 2020
Merged

linux: CONFIG_HIDRAW=y #86598

merged 1 commit into from May 3, 2020

Conversation

@Valodim
Copy link
Contributor

Valodim commented May 2, 2020

Motivation for this change

The linux kernel arm64 default config doesn't include HIDRAW. The kernel docs list this option as "If unsure, say Y". It's been enabled in x86_64 since [https://github.com/torvalds/linux/commit/622e3f28e50fe30cc199c735440cd7c75e0033b0](12 years ago). It's also been in OpenWRT for 5 years. I'm not sure why it's not on by default for arm64.

Motivation for this change is feature parity between platforms. I was able to do hidraw input on my desktop and on rpi4 (with rpi kernel), but not an rpi3 with linuxPackages built for aarch64.

That said, I'm not very knowledgeable about kernel modules, and the warning on top of common-config.nix sounds scary :) so I'd appreciate someone with more experience weighing in if this is as harmless as it looks, or if we should be more careful with the change.

I tested this by enabling HIDRAW via kernelPatches, works as expected.

Things done
@grahamc
grahamc approved these changes May 2, 2020
@Valodim Valodim force-pushed the Valodim:aarch64-hidraw branch from cf23767 to bdd2d3c May 2, 2020
@lheckemann
Copy link
Member

lheckemann commented May 2, 2020

@ofborg build linux_4_4 linux_latest

@Valodim
Copy link
Contributor Author

Valodim commented May 2, 2020

Ah, unsurprisingly this causes a bunch of rebuilds. Should I rebase this against staging instead?

@lheckemann
Copy link
Member

lheckemann commented May 2, 2020

I think the kernel is still fine for master as far as the number of rebuilds is concerned, would defer to someone more knowledgeable though :)

@prusnak
prusnak approved these changes May 2, 2020
@Valodim
Copy link
Contributor Author

Valodim commented May 2, 2020

looks like the build failed for linux_4_4. bummer :(

...
  LD      drivers/built-in.o
make[1]: *** [Makefile:152: sub-make] Error 2
make: *** [Makefile:24: __sub-make] Error 2
...
builder for '/nix/store/6bb5vxp5q689r46x7dgd9pk1gd13w7l1-linux-4.4.220.drv' failed with exit code 2

only happened for the arm64 build, the x86 went ok. hum.

@lheckemann
Copy link
Member

lheckemann commented May 3, 2020

This may not be a regression, I'm just building the unmodified arm64 4.4 kernel to compare (and the fact that it wasn't in the cache is a strong suggestion that it's broken anyway). In that case I'd be all for merging this.

@lheckemann lheckemann merged commit 88e07d3 into NixOS:master May 3, 2020
19 checks passed
19 checks passed
linux_4_4, linux_latest on aarch64-linux Failure
Details
linux_4_4, linux_latest on x86_64-darwin No attempt
Details
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="bdd2d3c"; rev="bdd2d3ccb29b5369b71eeef955842240cf6b6108"; } ./pkgs/t
Details
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="bdd2d3c"; rev="bdd2d3ccb29b5369b71eeef955842240cf6b6108"; } ./nixos/
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="bdd2d3c"; rev="bdd2d3ccb29b5369b71eeef955842240cf6b6108"; } ./nixos/
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="bdd2d3c"; rev="bdd2d3ccb29b5369b71eeef955842240cf6b6108"; } ./nixos/
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="bdd2d3c"; rev="bdd2d3ccb29b5369b71eeef955842240cf6b6108"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="bdd2d3c"; rev="bdd2d3ccb29b5369b71eeef955842240cf6b6108"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="bdd2d3c"; rev="bdd2d3ccb29b5369b71eeef955842240cf6b6108"; } ./pkgs/t
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
linux, linux.passthru.tests on aarch64-linux Success
Details
linux, linux.passthru.tests on x86_64-linux Success
Details
linux_4_4, linux_latest on x86_64-linux Success
Details
@lheckemann
Copy link
Member

lheckemann commented May 3, 2020

Indeed, the build was failing without this change too.

@Valodim Valodim deleted the Valodim:aarch64-hidraw branch May 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.