-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
linuxPackages.gvusb2: init at 2020-07-27-unstable #109560
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
Conversation
I saw that the upstream repository had two licenses in the tree:
I have the license set to GPL. Maybe it should be set to both? I'm not sure what should apply. |
They apply both. |
gvusb2-sound-y := gvusb2-snd.o gvusb2-core.o | ||
gvusb2-video-y := gvusb2-vid.o gvusb2-v4l2.o gvusb2-core.o gvusb2-i2c.o | ||
|
||
+KERNEL_SOURCE_DIR := /lib/modules/$(shell uname -r)/build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this patch? It looks like it changes nothing for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Makefile included with the project doesn't use any environment variables:
❯ git show 811fb0f6ee4ef62e0e346a293bb5e3b61ad10b7d:Makefile
obj-m += gvusb2-sound.o gvusb2-video.o
gvusb2-sound-y := gvusb2-snd.o gvusb2-core.o
gvusb2-video-y := gvusb2-vid.o gvusb2-v4l2.o gvusb2-core.o gvusb2-i2c.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
Without this patch, the build is running the default make -C /lib/modules/5.10.7/build M=/build/source modules
and failing:
❯ nix-build -A linuxPackages_latest.gvusb2
these derivations will be built:
/nix/store/warcxpjpb5kknzkwrnbq21b50wavbz1k-gvusb2-2020-07-27-unstable.drv
building '/nix/store/warcxpjpb5kknzkwrnbq21b50wavbz1k-gvusb2-2020-07-27-unstable.drv'...
unpacking sources
unpacking source archive /nix/store/iwc4l1vs3sqxmf99cq0839dl2zh2xnn1-source
source root is source
patching sources
configuring
no configure script, doing nothing
building
build flags: SHELL=/nix/store/kl6lr3czkbnr6m5crcy8ffwfzbj8a22i-bash-4.4-p23/bin/bash KERNEL_SOURCE_DIR=/nix/store/2kxfgzzdwi1nj6axsi43r05mcd6ncqg4-linux-5.10.7-dev/lib/modules/5.10.7/build INSTALL_MOD_PATH=\$\(out\)
make -C /lib/modules/5.10.7/build M=/build/source modules
make[1]: *** /lib/modules/5.10.7/build: No such file or directory. Stop.
make: *** [Makefile:7: all] Error 2
builder for '/nix/store/warcxpjpb5kknzkwrnbq21b50wavbz1k-gvusb2-2020-07-27-unstable.drv' failed with exit code 2
error: build of '/nix/store/warcxpjpb5kknzkwrnbq21b50wavbz1k-gvusb2-2020-07-27-unstable.drv' failed
I'm using #105899 as a reference along with https://nixos.wiki/wiki/Linux_kernel#Packaging_out-of-tree_kernel_modules.
I'm adding an environment variable KERNEL_SOURCE_DIR
to the Makefile to choose the right directory during the build, using ${kernel.dev}
:
make -C /nix/store/2kxfgzzdwi1nj6axsi43r05mcd6ncqg4-linux-5.10.7-dev/lib/modules/5.10.7/build M=/build/source modules
build flags: SHELL=/nix/store/kl6lr3czkbnr6m5crcy8ffwfzbj8a22i-bash-4.4-p23/bin/bash KERNEL_SOURCE_DIR=/nix/store/2kxfgzzdwi1nj6axsi43r05mcd6ncqg4-linux-5.10.7-dev/lib/modules/5.10.7/build INSTALL_MOD_PATH=\$\(out\)
make -C /nix/store/2kxfgzzdwi1nj6axsi43r05mcd6ncqg4-linux-5.10.7-dev/lib/modules/5.10.7/build M=/build/source modules
I don't have much experience building kernel modules and may be missing some conventions here.
|
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Sorry, I changed |
This is a semi-automatic executed nixpkgs-review which is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch). Result of 2 packages marked as broken and skipped:
2 packages failed to build and are new build failures:
16 packages built:
|
I marked this as stale due to inactivity. → More info |
Reopen and rebase if you're still interested in this. |
Motivation for this change
This is a new linux driver for the I-O DATA GV-USB2 capture card:
Using the driver, I was able to play Super Mario 64 on a CRT with simultaneous playback in VLC / OBS-Studio:
I tested with kernel
5.10.7
:vfl_type_grabber.patch
addresses Isaac-Lozano/GV-USB2-Driver#2 on appropriate kernel versions.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)